Hello,
syzbot found the following issue on:
HEAD commit: 3594f306da12 Linux 6.1.147
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=10693834580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=30b8ca4950f83e04
dashboard link:
https://syzkaller.appspot.com/bug?extid=800e15dbad458bb691ea
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/5b0395e2ec6c/disk-3594f306.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/c3ec331b7d5b/vmlinux-3594f306.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/bff42068e062/bzImage-3594f306.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+800e15...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0xf7/0x7c50 kernel/locking/lockdep.c:4919
Read of size 8 at addr ffff888018468eb8 by task syz.6.4291/22214
CPU: 0 PID: 22214 Comm: syz.6.4291 Not tainted 6.1.147-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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/0x200 mm/kasan/report.c:418
kasan_report+0x10b/0x140 mm/kasan/report.c:522
__lock_acquire+0xf7/0x7c50 kernel/locking/lockdep.c:4919
lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
remove_wait_queue+0x20/0x120 kernel/sched/wait.c:54
free_poll_entry fs/select.c:132 [inline]
poll_freewait+0x99/0x210 fs/select.c:141
do_select+0x1761/0x1850 fs/select.c:609
core_sys_select+0x6ad/0x8b0 fs/select.c:678
do_pselect fs/select.c:760 [inline]
__do_sys_pselect6 fs/select.c:801 [inline]
__se_sys_pselect6+0x2ed/0x3a0 fs/select.c:792
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:0x7f4a94f8eb69
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:00007f4a95d8a038 EFLAGS: 00000246 ORIG_RAX: 000000000000010e
RAX: ffffffffffffffda RBX: 00007f4a951b6080 RCX: 00007f4a94f8eb69
RDX: 0000000000000000 RSI: 0000200000000280 RDI: 0000000000000040
RBP: 00007f4a95011df1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000200000000180 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f4a951b6080 R15: 00007ffc69959678
</TASK>
Allocated by task 22077:
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]
__comedi_device_postconfig_async drivers/comedi/drivers.c:666 [inline]
__comedi_device_postconfig drivers/comedi/drivers.c:723 [inline]
comedi_device_postconfig+0x496/0xc50 drivers/comedi/drivers.c:758
comedi_device_attach+0x52f/0x650 drivers/comedi/drivers.c:1000
do_devconfig_ioctl drivers/comedi/comedi_fops.c:851 [inline]
comedi_unlocked_ioctl+0x5ec/0xf20 drivers/comedi/comedi_fops.c:2151
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
Freed by task 22215:
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:1724 [inline]
slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1750
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0xb6/0x1f0 mm/slub.c:3674
comedi_device_detach_cleanup drivers/comedi/drivers.c:171 [inline]
comedi_device_detach+0x35f/0x6e0 drivers/comedi/drivers.c:207
do_devconfig_ioctl drivers/comedi/comedi_fops.c:829 [inline]
comedi_unlocked_ioctl+0xb6b/0xf20 drivers/comedi/comedi_fops.c:2151
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
kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405
drop_sysctl_table+0x2fa/0x430 fs/proc/proc_sysctl.c:1731
drop_sysctl_table+0x2e9/0x430 fs/proc/proc_sysctl.c:1734
unregister_sysctl_table+0x85/0x130 fs/proc/proc_sysctl.c:1769
neigh_sysctl_unregister+0x74/0x90 net/core/neighbour.c:3871
addrconf_sysctl_unregister net/ipv6/addrconf.c:7208 [inline]
addrconf_ifdown+0x1711/0x1a10 net/ipv6/addrconf.c:3952
addrconf_notify+0x405/0xf40 net/ipv6/addrconf.c:-1
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]
unregister_netdevice_many+0xfdc/0x1840 net/core/dev.c:10978
default_device_exit_batch+0x9c3/0xa50 net/core/dev.c:11491
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x77b/0xb80 net/core/net_namespace.c:640
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
Second to 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
kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405
drop_sysctl_table+0x2fa/0x430 fs/proc/proc_sysctl.c:1731
drop_sysctl_table+0x2e9/0x430 fs/proc/proc_sysctl.c:1734
unregister_sysctl_table+0x85/0x130 fs/proc/proc_sysctl.c:1769
__devinet_sysctl_unregister net/ipv4/devinet.c:2636 [inline]
devinet_sysctl_unregister net/ipv4/devinet.c:2664 [inline]
inetdev_destroy net/ipv4/devinet.c:329 [inline]
inetdev_event+0x6db/0x1410 net/ipv4/devinet.c:1616
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]
unregister_netdevice_many+0xfdc/0x1840 net/core/dev.c:10978
ip_tunnel_delete_nets+0x318/0x360 net/ipv4/ip_tunnel.c:1171
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x77b/0xb80 net/core/net_namespace.c:640
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
The buggy address belongs to the object at ffff888018468e00
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 184 bytes inside of
256-byte region [ffff888018468e00, ffff888018468f00)
The buggy address belongs to the physical page:
page:ffffea0000611a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x18468
head:ffffea0000611a00 order:1 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea000063ac00 dead000000000002 ffff888017441b40
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 2459303555, free_ts 0
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_page_interleave+0x24/0x1e0 mm/mempolicy.c:2115
alloc_slab_page+0x5d/0x160 mm/slub.c:1794
allocate_slab mm/slub.c:1939 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1992
___slab_alloc+0xbc6/0x1220 mm/slub.c:3180
__slab_alloc mm/slub.c:3279 [inline]
slab_alloc_node mm/slub.c:3364 [inline]
__kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3437
__do_kmalloc_node mm/slab_common.c:935 [inline]
__kmalloc_node_track_caller+0x9e/0x230 mm/slab_common.c:956
__do_krealloc mm/slab_common.c:1336 [inline]
krealloc+0x6a/0x100 mm/slab_common.c:1369
add_sysfs_param+0xe8/0x930 kernel/params.c:651
kernel_add_sysfs_param+0xaf/0x11b kernel/params.c:812
param_sysfs_builtin+0x1f6/0x27c kernel/params.c:851
param_sysfs_init+0x66/0x6a kernel/params.c:972
do_one_initcall+0x214/0x7a0 init/main.c:1298
do_initcall_level+0x137/0x1e4 init/main.c:1371
page_owner free stack trace missing
Memory state around the buggy address:
ffff888018468d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888018468e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888018468e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888018468f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888018468f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc