Hello,
syzbot found the following issue on:
HEAD commit: 8b73de7da85f Linux 6.6.156
git tree: linux-6.6.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=16e69f9e580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=7be9809cedd6b69c
dashboard link:
https://syzkaller.appspot.com/bug?extid=f5591c356bcb15fd020f
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/d7e87682fef0/disk-8b73de7d.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/096830afc063/vmlinux-8b73de7d.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/89c175e4560d/bzImage-8b73de7d.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+f5591c...@syzkaller.appspotmail.com
CIFS: Attempting to mount //
127.0.0.1/share
==================================================================
BUG: KASAN: slab-use-after-free in cifs_free_hash+0xcc/0x100 fs/smb/client/misc.c:1207
Write of size 8 at addr ffff88807b0ac468 by task syz.3.1743/12980
CPU: 0 PID: 12980 Comm: syz.3.1743 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
cifs_free_hash+0xcc/0x100 fs/smb/client/misc.c:1207
cifs_crypto_secmech_release+0x32/0x110 fs/smb/client/cifsencrypt.c:847
cifs_put_tcp_session+0x20b/0x320 fs/smb/client/connect.c:1699
cifs_mount_put_conns+0xb4/0x280 fs/smb/client/connect.c:3439
cifs_mount+0xdc/0x650 fs/smb/client/connect.c:3750
cifs_smb3_do_mount+0x2e5/0x710 fs/smb/client/cifsfs.c:950
smb3_get_tree_common fs/smb/client/fs_context.c:785 [inline]
smb3_get_tree+0x5a5/0xa90 fs/smb/client/fs_context.c:805
vfs_get_tree+0x8c/0x280 fs/super.c:1772
do_new_mount+0x24a/0xa40 fs/namespace.c:3386
do_mount fs/namespace.c:3726 [inline]
__do_sys_mount fs/namespace.c:3935 [inline]
__se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3912
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f26b719e159
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:00007f26b8136028 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f26b7425fa0 RCX: 00007f26b719e159
RDX: 0000200000000200 RSI: 0000200000000100 RDI: 0000200000000500
RBP: 00007f26b723503b R08: 0000200000000300 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f26b7426038 R14: 00007f26b7425fa0 R15: 00007fff32e2c0f8
</TASK>
Allocated by task 12980:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
kmalloc include/linux/slab.h:600 [inline]
kzalloc include/linux/slab.h:721 [inline]
cifs_get_tcp_session+0xb5/0x1a10 fs/smb/client/connect.c:1724
cifs_mount_get_session+0xae/0x440 fs/smb/client/connect.c:3464
get_session fs/smb/client/dfs.c:62 [inline]
dfs_mount_share+0x1e9/0x7b0 fs/smb/client/dfs.c:285
cifs_mount+0xbc/0x650 fs/smb/client/connect.c:3720
cifs_smb3_do_mount+0x2e5/0x710 fs/smb/client/cifsfs.c:950
smb3_get_tree_common fs/smb/client/fs_context.c:785 [inline]
smb3_get_tree+0x5a5/0xa90 fs/smb/client/fs_context.c:805
vfs_get_tree+0x8c/0x280 fs/super.c:1772
do_new_mount+0x24a/0xa40 fs/namespace.c:3386
do_mount fs/namespace.c:3726 [inline]
__do_sys_mount fs/namespace.c:3935 [inline]
__se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3912
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 12981:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3843
clean_demultiplex_info+0xb63/0xd60 fs/smb/client/connect.c:1078
cifs_demultiplex_thread+0x274e/0x2a70 fs/smb/client/connect.c:1373
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
The buggy address belongs to the object at ffff88807b0ac000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 1128 bytes inside of
freed 4096-byte region [ffff88807b0ac000, ffff88807b0ad000)
The buggy address belongs to the physical page:
page:ffffea0001ec2a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b0a8
head:ffffea0001ec2a00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017c42140 0000000000000000 dead000000000001
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 0x1d2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 1132, tgid 1132 (kworker/u4:6), ts 1353627500252, free_ts 1353177274051
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
prep_new_page mm/page_alloc.c:1589 [inline]
get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
__alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
alloc_slab_page+0x5d/0x180 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2d0 mm/slub.c:2081
___slab_alloc+0xc5c/0x12f0 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x11f/0x250 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc_node_track_caller+0xa4/0x230 mm/slab_common.c:1027
kmalloc_reserve+0x116/0x240 net/core/skbuff.c:584
__alloc_skb+0x138/0x2c0 net/core/skbuff.c:653
alloc_skb include/linux/skbuff.h:1316 [inline]
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:748 [inline]
nsim_dev_trap_report drivers/net/netdevsim/dev.c:805 [inline]
nsim_dev_trap_report_work+0x253/0xa90 drivers/net/netdevsim/dev.c:851
process_one_work kernel/workqueue.c:2657 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1182 [inline]
free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2459
discard_slab mm/slub.c:2127 [inline]
__unfreeze_partials+0x1cf/0x210 mm/slub.c:2667
put_cpu_partial+0x17c/0x250 mm/slub.c:2743
__slab_free+0x319/0x400 mm/slub.c:3700
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:306
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x6a/0x4d0 mm/slab.h:770
slab_alloc_node mm/slub.c:3495 [inline]
slab_alloc mm/slub.c:3503 [inline]
__kmem_cache_alloc_lru mm/slub.c:3510 [inline]
kmem_cache_alloc+0x17e/0x2c0 mm/slub.c:3519
getname_flags+0xbb/0x500 fs/namei.c:140
user_path_at_empty+0x2c/0x60 fs/namei.c:2959
do_readlinkat+0xdd/0x490 fs/stat.c:494
__do_sys_readlink fs/stat.c:527 [inline]
__se_sys_readlink fs/stat.c:524 [inline]
__x64_sys_readlink+0x7f/0x90 fs/stat.c:524
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Memory state around the buggy address:
ffff88807b0ac300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807b0ac380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807b0ac400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807b0ac480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807b0ac500: 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