KASAN: slab-use-after-free Read in __setup_irq

Status: upstream: reported on 2026/09/23 02:54
Reported-by: syzbot+7985a2a3636d72f8e7b5@syzkaller.appspotmail.com
First crash: 1d14h, last: 1d14h
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in __setup_irq prio:high kernel 19 5 18h07m 18h06m 0/29 upstream: reported on 2026/09/23 23:13

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in string_nocheck lib/vsprintf.c:645 [inline]
BUG: KASAN: slab-use-after-free in string+0x204/0x290 lib/vsprintf.c:727
Read of size 1 at addr ffff88801d38c2d0 by task syz.4.178/6489

CPU: 1 PID: 6489 Comm: syz.4.178 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
 string_nocheck lib/vsprintf.c:645 [inline]
 string+0x204/0x290 lib/vsprintf.c:727
 vsnprintf+0xf72/0x1ba0 lib/vsprintf.c:2823
 vprintk_store+0x3d9/0xd50 kernel/printk/printk.c:2226
 vprintk_emit+0x117/0x610 kernel/printk/printk.c:2322
 _printk+0xde/0x130 kernel/printk/printk.c:2366
 __setup_irq+0xf92/0x1f30 kernel/irq/manage.c:1837
 request_threaded_irq+0x2c1/0x3a0 kernel/irq/manage.c:2205
 request_irq include/linux/interrupt.h:168 [inline]
 pcl812_attach+0x20b/0x2290 drivers/comedi/drivers/pcl812.c:1154
 comedi_device_attach+0x526/0x710 drivers/comedi/drivers.c:1014
 do_devconfig_ioctl drivers/comedi/comedi_fops.c:872 [inline]
 comedi_unlocked_ioctl+0x6c4/0x1170 drivers/comedi/comedi_fops.c:2178
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
 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:0x7fa93d99e159
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:00007fa93e83f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fa93dc26090 RCX: 00007fa93d99e159
RDX: 0000200000000240 RSI: 0000000040946400 RDI: 0000000000000003
RBP: 00007fa93da3506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa93dc26128 R14: 00007fa93dc26090 R15: 00007fffbe704308
 </TASK>

Allocated by task 5780:
 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
 kasan_kmalloc include/linux/kasan.h:198 [inline]
 __do_kmalloc_node mm/slab_common.c:1007 [inline]
 __kmalloc_node+0xb6/0x240 mm/slab_common.c:1014
 kmalloc_node include/linux/slab.h:620 [inline]
 __vmalloc_area_node mm/vmalloc.c:3175 [inline]
 __vmalloc_node_range+0x598/0x1320 mm/vmalloc.c:3370
 __vmalloc_node mm/vmalloc.c:3435 [inline]
 vzalloc+0x79/0x90 mm/vmalloc.c:3508
 alloc_counters+0xcb/0x6c0 net/ipv4/netfilter/ip_tables.c:799
 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:837 [inline]
 get_entries net/ipv6/netfilter/ip6_tables.c:1037 [inline]
 do_ip6t_get_ctl+0xad5/0x1220 net/ipv6/netfilter/ip6_tables.c:1674
 nf_getsockopt+0x262/0x280 net/netfilter/nf_sockopt.c:116
 ipv6_getsockopt+0x233/0x2e0 net/ipv6/ipv6_sockglue.c:1499
 do_sock_getsockopt+0x379/0x450 net/socket.c:2384
 __sys_getsockopt net/socket.c:2413 [inline]
 __do_sys_getsockopt net/socket.c:2423 [inline]
 __se_sys_getsockopt net/socket.c:2420 [inline]
 __x64_sys_getsockopt+0x1d6/0x280 net/socket.c:2420
 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 5780:
 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
 vfree+0x2b0/0x340 mm/vmalloc.c:2904
 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:880 [inline]
 get_entries net/ipv6/netfilter/ip6_tables.c:1037 [inline]
 do_ip6t_get_ctl+0xf01/0x1220 net/ipv6/netfilter/ip6_tables.c:1674
 nf_getsockopt+0x262/0x280 net/netfilter/nf_sockopt.c:116
 ipv6_getsockopt+0x233/0x2e0 net/ipv6/ipv6_sockglue.c:1499
 do_sock_getsockopt+0x379/0x450 net/socket.c:2384
 __sys_getsockopt net/socket.c:2413 [inline]
 __do_sys_getsockopt net/socket.c:2423 [inline]
 __se_sys_getsockopt net/socket.c:2420 [inline]
 __x64_sys_getsockopt+0x1d6/0x280 net/socket.c:2420
 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

The buggy address belongs to the object at ffff88801d38c2d0
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 freed 8-byte region [ffff88801d38c2d0, ffff88801d38c2d8)

The buggy address belongs to the physical page:
page:ffffea000074e300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d38c
flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000800 ffff888017c41280 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000660066 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, tgid 1 (swapper/0), ts 7253811928, free_ts 7252472226
 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_page_interleave+0x24/0x1e0 mm/mempolicy.c:2118
 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
 kstrdup+0x3b/0x80 mm/util.c:62
 __kernfs_new_node+0xaa/0x7f0 fs/kernfs/dir.c:620
 kernfs_new_node+0x14c/0x260 fs/kernfs/dir.c:700
 kernfs_create_dir_ns+0x44/0x120 fs/kernfs/dir.c:1061
 sysfs_create_dir_ns+0x130/0x2a0 fs/sysfs/dir.c:59
 create_dir lib/kobject.c:73 [inline]
 kobject_add_internal+0x617/0xc90 lib/kobject.c:240
 kobject_add_varg lib/kobject.c:374 [inline]
 kobject_add+0x164/0x240 lib/kobject.c:426
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
 mm_free_pgd kernel/fork.c:811 [inline]
 __mmdrop+0xb4/0x3d0 kernel/fork.c:927
 free_bprm+0x144/0x390 fs/exec.c:1514
 kernel_execve+0x3e9/0x980 fs/exec.c:2060
 call_usermodehelper_exec_async+0x20b/0x350 kernel/umh.c:110
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Memory state around the buggy address:
 ffff88801d38c180: fc fc 06 fc fc fc fc 06 fc fc fc fc 06 fc fc fc
 ffff88801d38c200: fc 06 fc fc fc fc 06 fc fc fc fc 00 fc fc fc fc
>ffff88801d38c280: 00 fc fc fc fc 04 fc fc fc fc fa fc fc fc fc 05
                                                 ^
 ffff88801d38c300: fc fc fc fc 05 fc fc fc fc 05 fc fc fc fc 06 fc
 ffff88801d38c380: fc fc fc 05 fc fc fc fc 05 fc fc fc fc 05 fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/23 02:53 linux-6.6.y 79643295eba1 5207b90e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in __setup_irq
* Struck through repros no longer work on HEAD.