syzbot


KASAN: use-after-free Read in enqueue_to_backlog

Status: premoderation: reported on 2026/05/14 07:31
Reported-by: syzbot+ee1436f8296677f85c11@syzkaller.appspotmail.com
First crash: 4d01h, last: 4d01h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in enqueue_to_backlog net 19 6 1366d 1478d 0/29 closed as invalid on 2022/11/15 21:20
linux-4.19 KASAN: use-after-free Write in enqueue_to_backlog 22 1 1585d 1585d 0/1 auto-closed as invalid on 2022/05/13 14:52

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [inline]
BUG: KASAN: use-after-free in test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
BUG: KASAN: use-after-free in netif_running include/linux/netdevice.h:3651 [inline]
BUG: KASAN: use-after-free in enqueue_to_backlog+0x14c/0xb50 net/core/dev.c:4619
Read of size 8 at addr ffff888106d94040 by task syz.0.99/699

CPU: 1 PID: 699 Comm: syz.0.99 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0xe2/0x130 mm/kasan/report.c:452
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189
 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31
 instrument_atomic_read include/linux/instrumented.h:71 [inline]
 test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
 netif_running include/linux/netdevice.h:3651 [inline]
 enqueue_to_backlog+0x14c/0xb50 net/core/dev.c:4619
 netif_rx_internal+0xb3/0x380 net/core/dev.c:4878
 netif_rx_ni+0x2d/0x2a0 net/core/dev.c:4919
 dev_loopback_xmit+0x2d9/0x3e0 net/core/dev.c:3919
 ip_mc_finish_output+0x16d/0x380 net/ipv4/ip_output.c:364
 NF_HOOK include/linux/netfilter.h:299 [inline]
 ip_mc_output+0x24e/0x890 net/ipv4/ip_output.c:403
 dst_output include/net/dst.h:451 [inline]
 ip_local_out net/ipv4/ip_output.c:126 [inline]
 ip_send_skb+0xb2/0x140 net/ipv4/ip_output.c:1594
 udp_send_skb+0x938/0x1240 net/ipv4/udp.c:977
 udp_sendmsg+0x18ac/0x22a0 net/ipv4/udp.c:1265
 inet_sendmsg+0xa5/0xc0 net/ipv4/af_inet.c:830
 sock_sendmsg_nosec net/socket.c:652 [inline]
 __sock_sendmsg net/socket.c:664 [inline]
 ____sys_sendmsg+0x5b7/0x8f0 net/socket.c:2376
 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2430
 __sys_sendmmsg+0x2ab/0x4c0 net/socket.c:2516
 __do_sys_sendmmsg net/socket.c:2545 [inline]
 __se_sys_sendmmsg net/socket.c:2542 [inline]
 __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2542
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fee32d3fe59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fee3179a028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fee32fb8fa0 RCX: 00007fee32d3fe59
RDX: 000000000800001d RSI: 0000200000007fc0 RDI: 0000000000000004
RBP: 00007fee32dd5d6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fee32fb9038 R14: 00007fee32fb8fa0 R15: 00007ffec324e0e8

The buggy address belongs to the page:
page:ffffea00041b6500 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x106d94
flags: 0x4000000000000000()
raw: 4000000000000000 ffffea0004c2e708 ffffea0004775a08 0000000000000000
raw: 0000000000000000 0000000000000002 00000000ffffff7f 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x46dc0(GFP_KERNEL|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP|__GFP_ZERO), pid 281, ts 23901118677, free_ts 84587237793
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x179/0x180 mm/page_alloc.c:2462
 get_page_from_freelist+0x223b/0x23d0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x290/0x620 mm/page_alloc.c:5384
 __alloc_pages include/linux/gfp.h:544 [inline]
 __alloc_pages_node include/linux/gfp.h:557 [inline]
 alloc_pages_node include/linux/gfp.h:571 [inline]
 alloc_pages include/linux/gfp.h:590 [inline]
 kmalloc_order+0x4c/0x160 mm/slab_common.c:843
 kmalloc_order_trace+0x16/0x80 mm/slab_common.c:859
 kmalloc_large include/linux/slab.h:484 [inline]
 __kmalloc+0x1eb/0x330 mm/slub.c:4027
 __kmalloc_node include/linux/slab.h:421 [inline]
 kmalloc_node include/linux/slab.h:578 [inline]
 kvmalloc_node+0x88/0x130 mm/util.c:612
 kvmalloc include/linux/mm.h:833 [inline]
 kvzalloc include/linux/mm.h:841 [inline]
 alloc_netdev_mqs+0x88/0xc80 net/core/dev.c:10540
 tun_set_iff+0x535/0xe00 drivers/net/tun.c:2827
 __tun_chr_ioctl+0x82a/0x1d00 drivers/net/tun.c:3117
 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:3395
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:739
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1349 [inline]
 __free_pages_ok+0x80b/0x830 mm/page_alloc.c:1629
 free_the_page mm/page_alloc.c:5445 [inline]
 __free_pages+0xd8/0x3b0 mm/page_alloc.c:5454
 kfree+0x1e4/0x270 mm/slub.c:4193
 kvfree+0x35/0x40 mm/util.c:647
 netdev_freemem+0x3f/0x60 net/core/dev.c:10494
 netdev_release+0x7f/0xb0 net/core/net-sysfs.c:1886
 device_release+0x96/0x1c0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:713 [inline]
 kobject_release lib/kobject.c:744 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x18a/0x270 lib/kobject.c:761
 netdev_run_todo+0xbbc/0xd50 net/core/dev.c:10365
 rtnl_unlock net/core/rtnetlink.c:112 [inline]
 rtnetlink_rcv_msg+0xb8b/0xcc0 net/core/rtnetlink.c:5614
 netlink_rcv_skb+0x1f5/0x440 net/netlink/af_netlink.c:2503
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5631
 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
 netlink_unicast+0x876/0xa40 net/netlink/af_netlink.c:1340
 netlink_sendmsg+0x89c/0xb50 net/netlink/af_netlink.c:1914
 sock_sendmsg_nosec net/socket.c:652 [inline]
 __sock_sendmsg net/socket.c:664 [inline]
 ____sys_sendmsg+0x5b7/0x8f0 net/socket.c:2376
 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2430

Memory state around the buggy address:
 ffff888106d93f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888106d93f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888106d94000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                           ^
 ffff888106d94080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888106d94100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/14 07:30 android13-5.10-lts 1b32327554da 6ccb967e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in enqueue_to_backlog
* Struck through repros no longer work on HEAD.