[Android 5.15] KASAN: use-after-free Read in __ipv6_addr_type

3 views
Skip to first unread message

syzbot

unread,
Sep 16, 2026, 8:02:38 AM (3 days ago) Sep 16
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 5bfe2b8c1439 Revert "mmc: sdhci: make tuning_err a signed ..
git tree: android13-5.15-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=12276115580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b0ecca01ee1a007b
dashboard link: https://syzkaller.appspot.com/bug?extid=9154a38789a5ff67b7d9
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=175913f9580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14b83925580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/81375cb90832/disk-5bfe2b8c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/0b0d46275f98/vmlinux-5bfe2b8c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9690dca8e184/bzImage-5bfe2b8c.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+9154a3...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in __ipv6_addr_type+0x272/0x2f0 net/ipv6/addrconf_core.c:42
Read of size 4 at addr ffff888126f23048 by task syz-executor367/304

CPU: 0 PID: 304 Comm: syz-executor367 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/08/2026
Call Trace:
<TASK>
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0x10f/0x150 mm/kasan/report.c:444
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
__ipv6_addr_type+0x272/0x2f0 net/ipv6/addrconf_core.c:42
ipv6_addr_type include/net/ipv6.h:465 [inline]
ip6_forward+0xdb2/0x1ba0 net/ipv6/ip6_output.c:602
dst_input include/net/dst.h:463 [inline]
ip6_rcv_finish+0x18f/0x360 net/ipv6/ip6_input.c:79
NF_HOOK include/linux/netfilter.h:305 [inline]
ipv6_rcv+0xed/0x230 net/ipv6/ip6_input.c:300
__netif_receive_skb_one_core net/core/dev.c:5559 [inline]
__netif_receive_skb+0xc8/0x280 net/core/dev.c:5673
netif_receive_skb_internal net/core/dev.c:5759 [inline]
netif_receive_skb+0x98/0x3e0 net/core/dev.c:5818
tun_rx_batched+0x600/0x750 drivers/net/tun.c:-1
tun_get_user+0x284f/0x34c0 drivers/net/tun.c:1989
tun_chr_write_iter+0x1ed/0x2f0 drivers/net/tun.c:2019
call_write_iter include/linux/fs.h:2212 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x831/0xfd0 fs/read_write.c:594
ksys_write+0x14a/0x260 fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__x64_sys_write+0x7b/0x90 fs/read_write.c:656
x64_sys_call+0x8ef/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fbedee825c9
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd3d336a78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fbedeee3500 RCX: 00007fbedee825c9
RDX: 000000000000ffdd RSI: 0000200000000000 RDI: 0000000000000005
RBP: 00007fbedeee34d0 R08: 00007ffd3d336aa0 R09: 00007ffd3d336aa0
R10: 00007ffd3d336aa0 R11: 0000000000000246 R12: 00007fbedeee3438
R13: 0000000000000001 R14: 00007ffd3d336ad0 R15: 0000000000000003
</TASK>

Allocated by task 304:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:433 [inline]
____kasan_kmalloc mm/kasan/common.c:512 [inline]
__kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:521
kasan_kmalloc include/linux/kasan.h:227 [inline]
__kmalloc_track_caller+0x13c/0x2c0 mm/slub.c:4959
kmalloc_reserve net/core/skbuff.c:357 [inline]
__alloc_skb+0x210/0x730 net/core/skbuff.c:428
alloc_skb include/linux/skbuff.h:1183 [inline]
alloc_skb_with_frags+0xa8/0x620 net/core/skbuff.c:6220
sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2541
tun_alloc_skb drivers/net/tun.c:1510 [inline]
tun_get_user+0xaa2/0x34c0 drivers/net/tun.c:1822
tun_chr_write_iter+0x1ed/0x2f0 drivers/net/tun.c:2019
call_write_iter include/linux/fs.h:2212 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x831/0xfd0 fs/read_write.c:594
ksys_write+0x14a/0x260 fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__x64_sys_write+0x7b/0x90 fs/read_write.c:656
x64_sys_call+0x8ef/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0

Freed by task 304:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
kasan_slab_free include/linux/kasan.h:193 [inline]
slab_free_hook mm/slub.c:1728 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754
slab_free mm/slub.c:3526 [inline]
kfree+0xc4/0x270 mm/slub.c:4588
skb_free_head net/core/skbuff.c:656 [inline]
pskb_expand_head+0x394/0x1280 net/core/skbuff.c:1767
__pskb_pull_tail+0xba/0x1570 net/core/skbuff.c:2282
pskb_may_pull include/linux/skbuff.h:2490 [inline]
decode_session6 net/xfrm/xfrm_policy.c:3394 [inline]
__xfrm_decode_session+0x5b0/0x1de0 net/xfrm/xfrm_policy.c:3488
xfrm_decode_session include/net/xfrm.h:1166 [inline]
__xfrm_route_forward+0x115/0x540 net/xfrm/xfrm_policy.c:3696
xfrm_route_forward include/net/xfrm.h:1187 [inline]
xfrm6_route_forward include/net/xfrm.h:1197 [inline]
ip6_forward+0xca5/0x1ba0 net/ipv6/ip6_output.c:565
dst_input include/net/dst.h:463 [inline]
ip6_rcv_finish+0x18f/0x360 net/ipv6/ip6_input.c:79
NF_HOOK include/linux/netfilter.h:305 [inline]
ipv6_rcv+0xed/0x230 net/ipv6/ip6_input.c:300
__netif_receive_skb_one_core net/core/dev.c:5559 [inline]
__netif_receive_skb+0xc8/0x280 net/core/dev.c:5673
netif_receive_skb_internal net/core/dev.c:5759 [inline]
netif_receive_skb+0x98/0x3e0 net/core/dev.c:5818
tun_rx_batched+0x600/0x750 drivers/net/tun.c:-1
tun_get_user+0x284f/0x34c0 drivers/net/tun.c:1989
tun_chr_write_iter+0x1ed/0x2f0 drivers/net/tun.c:2019
call_write_iter include/linux/fs.h:2212 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x831/0xfd0 fs/read_write.c:594
ksys_write+0x14a/0x260 fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__x64_sys_write+0x7b/0x90 fs/read_write.c:656
x64_sys_call+0x8ef/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff888126f23000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 72 bytes inside of
512-byte region [ffff888126f23000, ffff888126f23200)
The buggy address belongs to the page:
page:ffffea00049bc800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x126f20
head:ffffea00049bc800 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 dead000000000122 ffff888100042f00
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 301, ts 26474764513, free_ts 26471849861
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607
prep_new_page+0x1c/0x110 mm/page_alloc.c:2613
get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487
__alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1937 [inline]
new_slab+0xa0/0x4d0 mm/slub.c:2000
___slab_alloc+0x3ac/0x840 mm/slub.c:3033
__slab_alloc+0x49/0x90 mm/slub.c:3120
slab_alloc_node mm/slub.c:3211 [inline]
slab_alloc mm/slub.c:3255 [inline]
__kmalloc_track_caller+0x169/0x2c0 mm/slub.c:4954
kmalloc_reserve net/core/skbuff.c:357 [inline]
__alloc_skb+0x210/0x730 net/core/skbuff.c:428
alloc_skb include/linux/skbuff.h:1183 [inline]
netlink_alloc_large_skb net/netlink/af_netlink.c:1182 [inline]
netlink_sendmsg+0x611/0xb80 net/netlink/af_netlink.c:1898
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
____sys_sendmsg+0x5be/0x8f0 net/socket.c:2436
___sys_sendmsg+0x236/0x2e0 net/socket.c:2490
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg net/socket.c:2526 [inline]
__x64_sys_sendmsg+0x201/0x2d0 net/socket.c:2526
x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1474 [inline]
free_pcp_prepare mm/page_alloc.c:1546 [inline]
free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3536
free_unref_page+0xae/0x540 mm/page_alloc.c:3618
free_the_page mm/page_alloc.c:805 [inline]
__free_pages+0x6c/0x100 mm/page_alloc.c:5900
free_pages+0x82/0x90 mm/page_alloc.c:5911
__stack_depot_save+0x453/0x480 lib/stackdepot.c:358
kasan_save_stack mm/kasan/common.c:39 [inline]
kasan_set_track+0x5b/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
kasan_slab_free include/linux/kasan.h:193 [inline]
slab_free_hook mm/slub.c:1728 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754
slab_free mm/slub.c:3526 [inline]
kfree+0xc4/0x270 mm/slub.c:4588
skb_free_head net/core/skbuff.c:656 [inline]
skb_release_data+0x7bd/0xa20 net/core/skbuff.c:678
skb_release_all net/core/skbuff.c:743 [inline]
__kfree_skb net/core/skbuff.c:757 [inline]
consume_skb+0xab/0x1f0 net/core/skbuff.c:930
wg_packet_consume_data_done drivers/net/wireguard/receive.c:442 [inline]
wg_packet_rx_poll+0x1131/0x1b40 drivers/net/wireguard/receive.c:481
__napi_poll+0xbb/0x580 net/core/dev.c:7109
napi_poll net/core/dev.c:7176 [inline]
net_rx_action+0x37f/0x910 net/core/dev.c:7266

Memory state around the buggy address:
ffff888126f22f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888126f22f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888126f23000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888126f23080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888126f23100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages