Hello,
syzbot found the following issue on:
HEAD commit: 8e6e2188d949 Linux 6.1.157
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=11411b04580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=7eb38bd5021fec61
dashboard link:
https://syzkaller.appspot.com/bug?extid=5ec1eaafd9b1322b819e
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/dcc01324de1b/disk-8e6e2188.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/a93dd5469c70/vmlinux-8e6e2188.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/04635e384401/bzImage-8e6e2188.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+5ec1ea...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in cfusbl_device_notify+0x135/0x600 net/caif/caif_usb.c:141
Read of size 8 at addr ffff8880788b2680 by task syz.5.1076/11926
CPU: 1 PID: 11926 Comm: syz.5.1076 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x22e 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
cfusbl_device_notify+0x135/0x600 net/caif/caif_usb.c:141
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
call_netdevice_notifiers net/core/dev.c:2053 [inline]
register_netdevice+0x1271/0x1aa0 net/core/dev.c:10199
register_netdev+0x37/0x50 net/core/dev.c:10332
bnep_add_connection+0x6cb/0xbc0 net/bluetooth/bnep/core.c:624
do_bnep_sock_ioctl+0x40b/0x630 net/bluetooth/bnep/sock.c:83
sock_do_ioctl+0xd3/0x2f0 net/socket.c:1204
sock_ioctl+0x4ed/0x6e0 net/socket.c:1321
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:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fba44b8efc9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fba45ad7038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fba44de5fa0 RCX: 00007fba44b8efc9
RDX: 00002000000001c0 RSI: 00000000400442c8 RDI: 0000000000000006
RBP: 00007fba44c11f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fba44de6038 R14: 00007fba44de5fa0 R15: 00007ffd6651ce28
</TASK>
Allocated by task 4267:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
hci_conn_add+0xb7/0x1390 net/bluetooth/hci_conn.c:990
hci_conn_request_evt+0x4fe/0xb10 net/bluetooth/hci_event.c:3354
hci_event_func net/bluetooth/hci_event.c:7381 [inline]
hci_event_packet+0x7e9/0x1210 net/bluetooth/hci_event.c:7433
hci_rx_work+0x3eb/0xd40 net/bluetooth/hci_core.c:4083
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Freed by task 11927:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700
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
hci_conn_cleanup+0x575/0x730 net/bluetooth/hci_conn.c:172
hci_conn_del+0x515/0x720 net/bluetooth/hci_conn.c:1152
hci_conn_hash_flush+0x203/0x290 net/bluetooth/hci_conn.c:2511
hci_dev_do_reset net/bluetooth/hci_core.c:575 [inline]
hci_dev_reset+0x3fe/0x5f0 net/bluetooth/hci_core.c:619
sock_do_ioctl+0xd3/0x2f0 net/socket.c:1204
sock_ioctl+0x4ed/0x6e0 net/socket.c:1321
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:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
insert_work+0x54/0x3c0 kernel/workqueue.c:1361
__queue_work+0xba3/0xfb0 kernel/workqueue.c:1520
queue_delayed_work_on+0x126/0x1e0 kernel/workqueue.c:1704
l2cap_chan_del+0x2d8/0x620 net/bluetooth/l2cap_core.c:696
l2cap_conn_del+0x3c4/0x6a0 net/bluetooth/l2cap_core.c:1954
hci_disconn_cfm include/net/bluetooth/hci_core.h:1823 [inline]
hci_conn_hash_flush+0x113/0x290 net/bluetooth/hci_conn.c:2504
hci_dev_do_reset net/bluetooth/hci_core.c:575 [inline]
hci_dev_reset+0x3fe/0x5f0 net/bluetooth/hci_core.c:619
sock_do_ioctl+0xd3/0x2f0 net/socket.c:1204
sock_ioctl+0x4ed/0x6e0 net/socket.c:1321
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:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff8880788b2000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 1664 bytes inside of
4096-byte region [ffff8880788b2000, ffff8880788b3000)
The buggy address belongs to the physical page:
page:ffffea0001e22c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x788b0
head:ffffea0001e22c00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888017442140
raw: 0000000000000000 0000000000040004 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 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 10073, tgid 10073 (kworker/u4:39), ts 764318609956, free_ts 764186867634
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
alloc_slab_page+0x5d/0x160 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1997
___slab_alloc+0xbc6/0x1230 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
__kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
tomoyo_dump_page+0xe5/0x660 security/tomoyo/domain.c:909
tomoyo_environ security/tomoyo/domain.c:637 [inline]
tomoyo_find_next_domain+0x10ea/0x1a40 security/tomoyo/domain.c:882
tomoyo_bprm_check_security+0x100/0x150 security/tomoyo/tomoyo.c:101
security_bprm_check+0x5e/0x90 security/security.c:869
search_binary_handler fs/exec.c:1752 [inline]
exec_binprm fs/exec.c:1805 [inline]
bprm_execve+0xa77/0x18a0 fs/exec.c:1874
kernel_execve+0x8b9/0x9c0 fs/exec.c:2039
call_usermodehelper_exec_async+0x207/0x350 kernel/umh.c:113
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
free_slab mm/slub.c:2036 [inline]
discard_slab mm/slub.c:2042 [inline]
__unfreeze_partials+0x1a5/0x200 mm/slub.c:2591
put_cpu_partial+0x17c/0x250 mm/slub.c:2667
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
slab_alloc_node mm/slub.c:3359 [inline]
slab_alloc mm/slub.c:3367 [inline]
__kmem_cache_alloc_lru mm/slub.c:3374 [inline]
kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3383
getname_flags+0xb7/0x500 fs/namei.c:139
user_path_at_empty+0x28/0x60 fs/namei.c:2912
do_readlinkat+0xd4/0x480 fs/stat.c:468
__do_sys_readlink fs/stat.c:501 [inline]
__se_sys_readlink fs/stat.c:498 [inline]
__x64_sys_readlink+0x7b/0x90 fs/stat.c:498
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Memory state around the buggy address:
ffff8880788b2580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880788b2600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880788b2680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880788b2700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880788b2780: 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 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