syzbot


KASAN: use-after-free Read in __sock_queue_rcv_skb (2)

Status: upstream: reported on 2026/07/18 15:23
Reported-by: syzbot+acbaa95d40249dd75f9c@syzkaller.appspotmail.com
First crash: 4d20h, last: 4d20h
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in __sock_queue_rcv_skb 19 4 730d 777d 0/3 auto-obsoleted due to no activity on 2024/10/31 03:14
linux-5.15 KASAN: use-after-free Read in __sock_queue_rcv_skb 19 1 610d 610d 0/3 auto-obsoleted due to no activity on 2025/02/28 09:53
upstream KASAN: slab-use-after-free Read in __sock_queue_rcv_skb (2) bluetooth 19 1 531d 531d 0/29 closed as invalid on 2025/03/17 11:18
upstream KASAN: slab-use-after-free Read in __sock_queue_rcv_skb bluetooth 19 7 752d 758d 0/29 auto-obsoleted due to no activity on 2024/10/09 10:28

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
BUG: KASAN: use-after-free in do_raw_spin_lock+0x283/0x2f0 kernel/locking/spinlock_debug.c:114
Read of size 4 at addr ffff88807a6731cc by task syz.1.46/4561

CPU: 1 PID: 4561 Comm: syz.1.46 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
 do_raw_spin_lock+0x283/0x2f0 kernel/locking/spinlock_debug.c:114
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline]
 _raw_spin_lock_irqsave+0xbc/0x100 kernel/locking/spinlock.c:162
 __sock_queue_rcv_skb+0x472/0x960 net/core/sock.c:479
 mgmt_cmd_status+0x24a/0x470 net/bluetooth/mgmt_util.c:123
 cmd_status_rsp net/bluetooth/mgmt.c:1298 [inline]
 cmd_complete_rsp+0xd6/0x170 net/bluetooth/mgmt.c:1313
 mgmt_pending_foreach+0xc1/0x110 net/bluetooth/mgmt_util.c:226
 mgmt_index_removed+0x125/0x2a0 net/bluetooth/mgmt.c:8554
 hci_sock_bind+0xa77/0xe00 net/bluetooth/hci_sock.c:1246
 __sys_bind+0x2e9/0x3e0 net/socket.c:1730
 __do_sys_bind net/socket.c:1741 [inline]
 __se_sys_bind net/socket.c:1739 [inline]
 __x64_sys_bind+0x76/0x80 net/socket.c:1739
 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:0x7f5eff366e99
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:00007f5efd5bf028 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 00007f5eff5eefa0 RCX: 00007f5eff366e99
RDX: 0000000000000006 RSI: 00002000000000c0 RDI: 0000000000000004
RBP: 00007f5eff3fceaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5eff5ef038 R14: 00007f5eff5eefa0 R15: 00007fff7d62ee58
 </TASK>

Allocated by task 4468:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc mm/kasan/common.c:513 [inline]
 __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522
 kmalloc include/linux/slab.h:612 [inline]
 sk_prot_alloc+0xe7/0x210 net/core/sock.c:1866
 sk_alloc+0x2f/0x310 net/core/sock.c:1922
 bt_sock_alloc+0x37/0x350 net/bluetooth/af_bluetooth.c:146
 hci_sock_create+0x9f/0x180 net/bluetooth/hci_sock.c:2094
 bt_sock_create+0x155/0x220 net/bluetooth/af_bluetooth.c:130
 __sock_create+0x473/0x910 net/socket.c:1496
 sock_create net/socket.c:1552 [inline]
 __sys_socket+0xe2/0x170 net/socket.c:1594
 __do_sys_socket net/socket.c:1603 [inline]
 __se_sys_socket net/socket.c:1601 [inline]
 __x64_sys_socket+0x76/0x80 net/socket.c:1601
 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 4205:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
 kasan_slab_free include/linux/kasan.h:230 [inline]
 slab_free_hook mm/slub.c:1710 [inline]
 slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736
 slab_free mm/slub.c:3504 [inline]
 kfree+0xef/0x2a0 mm/slub.c:4564
 sk_prot_free net/core/sock.c:1905 [inline]
 __sk_destruct+0x580/0x840 net/core/sock.c:1991
 sock_put include/net/sock.h:1990 [inline]
 mgmt_pending_free net/bluetooth/mgmt_util.c:261 [inline]
 mgmt_pending_remove+0x13d/0x1a0 net/bluetooth/mgmt_util.c:269
 hci_power_on+0x2b0/0x5f0 net/bluetooth/hci_core.c:2286
 process_one_work+0x867/0xff0 kernel/workqueue.c:2310
 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
 kthread+0x42e/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

The buggy address belongs to the object at ffff88807a673000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 460 bytes inside of
 2048-byte region [ffff88807a673000, ffff88807a673800)
The buggy address belongs to the page:
page:ffffea0001e99c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a670
head:ffffea0001e99c00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 0000000100000001 ffff888016c42000
raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 1324, ts 60470033765, free_ts 60465833087
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
 alloc_slab_page mm/slub.c:1780 [inline]
 allocate_slab mm/slub.c:1917 [inline]
 new_slab+0xc0/0x4b0 mm/slub.c:1980
 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013
 __slab_alloc mm/slub.c:3100 [inline]
 slab_alloc_node mm/slub.c:3191 [inline]
 __kmalloc_node_track_caller+0x13d/0x3a0 mm/slub.c:4963
 kmalloc_reserve net/core/skbuff.c:356 [inline]
 __alloc_skb+0x22c/0x750 net/core/skbuff.c:427
 alloc_skb include/linux/skbuff.h:1162 [inline]
 mld_newpack+0x12f/0xba0 net/ipv6/mcast.c:1745
 add_grhead net/ipv6/mcast.c:1856 [inline]
 add_grec+0x12de/0x1780 net/ipv6/mcast.c:1994
 mld_send_initial_cr+0x22d/0x4c0 net/ipv6/mcast.c:2241
 mld_dad_work+0x39/0x510 net/ipv6/mcast.c:2267
 process_one_work+0x867/0xff0 kernel/workqueue.c:2310
 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
 kthread+0x42e/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396
 free_slab mm/slub.c:2020 [inline]
 discard_slab mm/slub.c:2026 [inline]
 __unfreeze_partials+0x188/0x1e0 mm/slub.c:2512
 put_cpu_partial+0x12d/0x190 mm/slub.c:2592
 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3225 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 kmem_cache_alloc+0x15d/0x280 mm/slub.c:3238
 vm_area_dup+0x1e/0xb0 kernel/fork.c:359
 __split_vma+0xb1/0x410 mm/mmap.c:2730
 __do_munmap+0x40b/0xe10 mm/mmap.c:2865
 __vm_munmap+0x13f/0x240 mm/mmap.c:2952
 __do_sys_munmap mm/mmap.c:2978 [inline]
 __se_sys_munmap mm/mmap.c:2974 [inline]
 __x64_sys_munmap+0x67/0x70 mm/mmap.c:2974
 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

Memory state around the buggy address:
 ffff88807a673080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88807a673100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807a673180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff88807a673200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88807a673280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/18 15:23 linux-5.15.y c86c4726e7f0 72524a66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in __sock_queue_rcv_skb
* Struck through repros no longer work on HEAD.