[v6.1] KASAN: use-after-free Read in enqueue_to_backlog

0 views
Skip to first unread message

syzbot

unread,
May 20, 2026, 10:09:24 AM (20 hours ago) May 20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c27210688955 Linux 6.1.173
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10876c2e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0605c5af04d7603
dashboard link: https://syzkaller.appspot.com/bug?extid=7857d6b112e01709e41f
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/92fbc0595a58/disk-c2721068.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/0f281a0d62f7/vmlinux-c2721068.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b17a33c5f1fe/bzImage-c2721068.xz

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

==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
BUG: KASAN: use-after-free in netif_running include/linux/netdevice.h:3590 [inline]
BUG: KASAN: use-after-free in enqueue_to_backlog+0xb4/0xd30 net/core/dev.c:4802
Read of size 8 at addr ffff888054de4038 by task syz.7.3407/18716

CPU: 1 PID: 18716 Comm: syz.7.3407 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x235/0x290 mm/kasan/generic.c:189
instrument_atomic_read include/linux/instrumented.h:72 [inline]
_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
netif_running include/linux/netdevice.h:3590 [inline]
enqueue_to_backlog+0xb4/0xd30 net/core/dev.c:4802
netif_rx_internal+0x131/0x560 net/core/dev.c:5084
netif_rx net/core/dev.c:5137 [inline]
dev_loopback_xmit+0x2d8/0x430 net/core/dev.c:4047
NF_HOOK include/linux/netfilter.h:302 [inline]
ip_mc_output+0x2a1/0x5e0 net/ipv4/ip_output.c:394
dst_output include/net/dst.h:453 [inline]
ip_local_out net/ipv4/ip_output.c:126 [inline]
ip_send_skb+0x129/0x1c0 net/ipv4/ip_output.c:1608
udp_send_skb+0xa88/0x1580 net/ipv4/udp.c:993
udp_push_pending_frames net/ipv4/udp.c:1021 [inline]
udp_sendmsg+0x73f/0x23b0 net/ipv4/udp.c:1313
udp_sendpage+0x146/0x1c0 net/ipv4/udp.c:1374
inet_sendpage+0x1b5/0x340 net/ipv4/af_inet.c:873
kernel_sendpage+0x2cd/0x640 net/socket.c:3605
sock_sendpage+0x7a/0xb0 net/socket.c:1081
pipe_to_sendpage+0x22f/0x320 fs/splice.c:360
splice_from_pipe_feed fs/splice.c:414 [inline]
__splice_from_pipe+0x302/0x820 fs/splice.c:558
splice_from_pipe fs/splice.c:593 [inline]
generic_splice_sendpage+0x111/0x180 fs/splice.c:742
do_splice_from fs/splice.c:763 [inline]
do_splice+0xe4f/0x1630 fs/splice.c:1102
__do_splice fs/splice.c:1167 [inline]
__do_sys_splice fs/splice.c:1374 [inline]
__se_sys_splice+0x34d/0x440 fs/splice.c:1356
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5c13f9ce59
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:00007f5c121f6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f5c14216180 RCX: 00007f5c13f9ce59
RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f5c14032d6f R08: 000000000000714f R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5c14216218 R14: 00007f5c14216180 R15: 00007ffe1af527f8
</TASK>

The buggy address belongs to the physical page:
page:ffffea0001537900 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x54de4
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0000f08208 ffff8880b8e413f0 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 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 0x546dc0(GFP_USER|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP|__GFP_ZERO|__GFP_ACCOUNT), pid 18046, tgid 18046 (syz-executor), ts 1303002468810, free_ts 1359975995695
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2559
prep_new_page mm/page_alloc.c:2566 [inline]
get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4357
__alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5657
__alloc_pages_node include/linux/gfp.h:237 [inline]
alloc_pages_node include/linux/gfp.h:260 [inline]
__kmalloc_large_node+0x8c/0x1e0 mm/slab_common.c:1077
__do_kmalloc_node mm/slab_common.c:924 [inline]
__kmalloc_node+0x10e/0x240 mm/slab_common.c:943
kmalloc_node include/linux/slab.h:589 [inline]
kvmalloc_node+0x6c/0x180 mm/util.c:581
kvmalloc include/linux/slab.h:716 [inline]
kvzalloc include/linux/slab.h:724 [inline]
alloc_netdev_mqs+0x84/0xf00 net/core/dev.c:10770
tun_set_iff+0x536/0xed0 drivers/net/tun.c:2822
__tun_chr_ioctl+0x781/0x1e60 drivers/net/tun.c:3114
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1486 [inline]
free_pcp_prepare mm/page_alloc.c:1536 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3413
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3508
free_large_kmalloc+0xfd/0x190 mm/slab_common.c:913
device_release+0x92/0x1c0 drivers/base/core.c:-1
kobject_cleanup lib/kobject.c:681 [inline]
kobject_release lib/kobject.c:712 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x21d/0x460 lib/kobject.c:729
netdev_run_todo+0xcb3/0xdb0 net/core/dev.c:10560
rtnl_unlock net/core/rtnetlink.c:147 [inline]
rtnetlink_rcv_msg+0xad6/0xfc0 net/core/rtnetlink.c:6158
netlink_rcv_skb+0x1fb/0x450 net/netlink/af_netlink.c:2511
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1872
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
____sys_sendmsg+0x5be/0x970 net/socket.c:2518
___sys_sendmsg+0x2a2/0x360 net/socket.c:2572
__sys_sendmsg net/socket.c:2601 [inline]
__do_sys_sendmsg net/socket.c:2610 [inline]
__se_sys_sendmsg+0x1bb/0x2a0 net/socket.c:2608
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
ffff888054de3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888054de3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888054de4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888054de4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888054de4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


---
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 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