================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 Read of size 1 at addr ffff888034147cb0 by task syz.1.675/8605 CPU: 0 UID: 0 PID: 8605 Comm: syz.1.675 Not tainted 6.16.0-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 __kasan_check_byte+0x2a/0x40 mm/kasan/common.c:557 kasan_check_byte include/linux/kasan.h:399 [inline] lock_acquire+0x8d/0x360 kernel/locking/lockdep.c:5845 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 remove_wait_queue+0x24/0x120 kernel/sched/wait.c:54 free_poll_entry fs/select.c:132 [inline] poll_freewait+0xb1/0x240 fs/select.c:141 do_select+0x172f/0x17e0 fs/select.c:608 core_sys_select+0x6dd/0xa20 fs/select.c:677 do_pselect fs/select.c:759 [inline] __do_sys_pselect6 fs/select.c:802 [inline] __se_sys_pselect6+0x27a/0x300 fs/select.c:793 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4e9918ebe9 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:00007f4e9a0a4038 EFLAGS: 00000246 ORIG_RAX: 000000000000010e RAX: ffffffffffffffda RBX: 00007f4e993b6090 RCX: 00007f4e9918ebe9 RDX: 0000000000000000 RSI: 0000200000003800 RDI: 0000000000000040 RBP: 00007f4e99211e19 R08: 0000200000000240 R09: 0000000000000000 R10: 0000200000003880 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f4e993b6128 R14: 00007f4e993b6090 R15: 00007ffdcd5bffd8 Allocated by task 7486: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4359 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] __comedi_device_postconfig_async drivers/comedi/drivers.c:667 [inline] __comedi_device_postconfig drivers/comedi/drivers.c:724 [inline] comedi_device_postconfig+0x4a8/0xc90 drivers/comedi/drivers.c:759 comedi_device_attach+0x53a/0x670 drivers/comedi/drivers.c:1001 do_devconfig_ioctl drivers/comedi/comedi_fops.c:855 [inline] comedi_unlocked_ioctl+0x686/0xfc0 drivers/comedi/comedi_fops.c:2156 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 8611: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x18e/0x440 mm/slub.c:4842 comedi_device_detach_cleanup drivers/comedi/drivers.c:171 [inline] comedi_device_detach+0x372/0x720 drivers/comedi/drivers.c:208 do_devconfig_ioctl drivers/comedi/comedi_fops.c:833 [inline] comedi_unlocked_ioctl+0xbd2/0xfc0 drivers/comedi/comedi_fops.c:2156 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888034147c00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 176 bytes inside of freed 256-byte region [ffff888034147c00, ffff888034147d00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888034147800 pfn:0x34146 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801a441b40 ffffea0000cbd390 ffffea0000cbe590 raw: ffff888034147800 000000000010000a 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801a441b40 ffffea0000cbd390 ffffea0000cbe590 head: ffff888034147800 000000000010000a 00000000f5000000 0000000000000000 head: 00fff00000000001 ffffea0000d05181 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 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 28990033243, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21d5/0x22b0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_node_track_caller_noprof+0x2f8/0x4e0 mm/slub.c:4347 __do_krealloc mm/slub.c:4905 [inline] krealloc_noprof+0x124/0x340 mm/slub.c:4958 add_sysfs_param+0xc9/0xa20 kernel/params.c:654 kernel_add_sysfs_param+0xb4/0x130 kernel/params.c:811 param_sysfs_builtin+0x1de/0x290 kernel/params.c:850 param_sysfs_builtin_init+0x32/0x40 kernel/params.c:986 do_one_initcall+0x233/0x820 init/main.c:1274 do_initcall_level+0x137/0x1f0 init/main.c:1336 do_initcalls+0x69/0xd0 init/main.c:1352 kernel_init_freeable+0x3d9/0x570 init/main.c:1584 page_owner free stack trace missing Memory state around the buggy address: ffff888034147b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888034147c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888034147c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888034147d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888034147d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================