================================================================== 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 ffff888034dfa8b0 by task syz.3.609/9324 CPU: 0 UID: 0 PID: 9324 Comm: syz.3.609 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:0x7fd7cd98ebe9 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:00007fd7ce83c038 EFLAGS: 00000246 ORIG_RAX: 000000000000010e RAX: ffffffffffffffda RBX: 00007fd7cdbb6090 RCX: 00007fd7cd98ebe9 RDX: 0000000000000000 RSI: 00002000000001c0 RDI: 0000000000000040 RBP: 00007fd7cda11e19 R08: 0000000000000000 R09: 0000000000000000 R10: 00002000000002c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd7cdbb6128 R14: 00007fd7cdbb6090 R15: 00007ffd205db118 Allocated by task 8416: 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 9332: 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 ffff888034dfa800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 176 bytes inside of freed 256-byte region [ffff888034dfa800, ffff888034dfa900) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x34dfa head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801a441b40 ffffea0000c8c300 dead000000000004 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801a441b40 ffffea0000c8c300 dead000000000004 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000001 ffffea0000d37e81 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5206, tgid 5206 (udevd), ts 103400143798, free_ts 103373406782 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] __kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4354 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] smk_fetch+0x95/0x140 security/smack/smack_lsm.c:285 smack_d_instantiate+0x7db/0x940 security/smack/smack_lsm.c:3635 security_d_instantiate+0x10a/0x200 security/security.c:4079 d_splice_alias+0x6e/0x330 fs/dcache.c:2997 __lookup_slow+0x297/0x3d0 fs/namei.c:1817 lookup_slow+0x53/0x70 fs/namei.c:1834 walk_component+0x2d2/0x400 fs/namei.c:2138 lookup_last fs/namei.c:2639 [inline] path_lookupat+0x163/0x430 fs/namei.c:2663 filename_lookup+0x212/0x570 fs/namei.c:2692 page last free pid 5834 tgid 5834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc65/0xe60 mm/page_alloc.c:2706 __slab_free+0x326/0x400 mm/slub.c:4554 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4204 getname_kernel+0x5a/0x2f0 fs/namei.c:249 kern_path+0x1d/0x50 fs/namei.c:2824 tomoyo_mount_acl security/tomoyo/mount.c:136 [inline] tomoyo_mount_permission+0x776/0x970 security/tomoyo/mount.c:237 security_sb_mount+0xec/0x350 security/security.c:1570 path_mount+0xbc/0xfe0 fs/namespace.c:4168 do_mount fs/namespace.c:4239 [inline] __do_sys_mount fs/namespace.c:4450 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4427 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 Memory state around the buggy address: ffff888034dfa780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888034dfa800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888034dfa880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888034dfa900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888034dfa980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================