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

Status: moderation: reported on 2026/08/14 15:12
Subsystems: kernel
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+229ca105c47bcfac1c53@syzkaller.appspotmail.com
First crash: 5d07h, last: 4d06h
✨ AI Jobs (4)
ID Workflow Result Correct Bug Created Started Finished Revision
d8c84012 repro-c 💥 KASAN: slab-use-after-free Read in __setup_irq 2026/08/15 11:44 2026/08/15 11:44 2026/08/15 18:28 746171ee
ac9b0e08 moderation Actionable: ❌ KASAN: slab-use-after-free Read in __setup_irq 2026/08/15 00:01 2026/08/15 00:01 2026/08/15 00:03 746171ee
64a25f2f repro-c 💥 KASAN: slab-use-after-free Read in __setup_irq 2026/08/14 15:13 2026/08/14 15:13 2026/08/14 22:52 746171ee
07a59ca5 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ✅ VMHostTrigger: ❌ KASAN: slab-use-after-free Read in __setup_irq 2026/08/12 03:28 2026/08/12 03:28 2026/08/12 04:14 f8d35649

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in string_nocheck lib/vsprintf.c:648 [inline]
BUG: KASAN: slab-use-after-free in string+0x471/0x4d0 lib/vsprintf.c:730
Read of size 1 at addr ffff8880275adb60 by task syz.3.625/7287

CPU: 0 UID: 0 PID: 7287 Comm: syz.3.625 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0x13d/0x4b0 mm/kasan/report.c:482
 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
 string_nocheck lib/vsprintf.c:648 [inline]
 string+0x471/0x4d0 lib/vsprintf.c:730
 vsnprintf+0x422/0x1300 lib/vsprintf.c:2945
 vprintk_store+0x3b0/0xbe0 kernel/printk/printk.c:2307
 vprintk_emit+0x139/0x6b0 kernel/printk/printk.c:2455
 _printk+0xcf/0x110 kernel/printk/printk.c:2504
 __setup_irq.cold+0x3be/0x3f1 kernel/irq/manage.c:1820
 request_threaded_irq+0x261/0x3e0 kernel/irq/manage.c:2183
 request_irq include/linux/interrupt.h:176 [inline]
 pcl812_attach+0x1b62/0x2300 drivers/comedi/drivers/pcl812.c:1174
 comedi_device_attach+0x40e/0x6b0 drivers/comedi/drivers.c:1101
 do_devconfig_ioctl+0x1b3/0x6d0 drivers/comedi/comedi_fops.c:930
 comedi_unlocked_ioctl+0x860/0x3310 drivers/comedi/comedi_fops.c:2302
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl fs/ioctl.c:583 [inline]
 __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4b9f39e0d9
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:00007f4ba0266028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f4b9f625fa0 RCX: 00007f4b9f39e0d9
RDX: 0000200000000240 RSI: 0000000040946400 RDI: 0000000000000003
RBP: 00007f4b9f435024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4b9f626038 R14: 00007f4b9f625fa0 R15: 00007fffaba595a8
 </TASK>

Allocated by task 5733:
 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
 kasan_save_track+0x14/0x30 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5334 [inline]
 __kmalloc_node_noprof+0x339/0x830 mm/slub.c:5346
 _kmalloc_node_noprof include/linux/slab.h:1197 [inline]
 __vmalloc_area_node mm/vmalloc.c:3893 [inline]
 __vmalloc_node_range_noprof+0x409/0x1630 mm/vmalloc.c:4104
 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:4165
 alloc_counters net/ipv4/netfilter/ip_tables.c:799 [inline]
 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:821 [inline]
 get_entries net/ipv4/netfilter/ip_tables.c:1020 [inline]
 do_ipt_get_ctl+0x7e0/0xbf0 net/ipv4/netfilter/ip_tables.c:1669
 nf_getsockopt+0x7c/0xe0 net/netfilter/nf_sockopt.c:116
 ip_getsockopt+0x192/0x1e0 net/ipv4/ip_sockglue.c:1777
 tcp_getsockopt+0xa1/0x110 net/ipv4/tcp.c:4864
 do_sock_getsockopt+0x50a/0x6e0 net/socket.c:2474
 __sys_getsockopt+0x148/0x260 net/socket.c:2505
 __do_sys_getsockopt net/socket.c:2512 [inline]
 __se_sys_getsockopt net/socket.c:2509 [inline]
 __x64_sys_getsockopt+0xbd/0x160 net/socket.c:2509
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 5733:
 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
 kasan_save_track+0x14/0x30 mm/kasan/common.c:78
 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2677 [inline]
 slab_free mm/slub.c:6377 [inline]
 kfree+0x22b/0x6c0 mm/slub.c:6692
 vfree mm/vmalloc.c:3511 [inline]
 vfree+0x12e/0x750 mm/vmalloc.c:3484
 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:864 [inline]
 get_entries net/ipv4/netfilter/ip_tables.c:1020 [inline]
 do_ipt_get_ctl+0x9d7/0xbf0 net/ipv4/netfilter/ip_tables.c:1669
 nf_getsockopt+0x7c/0xe0 net/netfilter/nf_sockopt.c:116
 ip_getsockopt+0x192/0x1e0 net/ipv4/ip_sockglue.c:1777
 tcp_getsockopt+0xa1/0x110 net/ipv4/tcp.c:4864
 do_sock_getsockopt+0x50a/0x6e0 net/socket.c:2474
 __sys_getsockopt+0x148/0x260 net/socket.c:2505
 __do_sys_getsockopt net/socket.c:2512 [inline]
 __se_sys_getsockopt net/socket.c:2509 [inline]
 __x64_sys_getsockopt+0xbd/0x160 net/socket.c:2509
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x275ad
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801bc42500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800800080 00000000f5000000 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 7693693956, free_ts 0
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304
 alloc_slab_page mm/slub.c:3266 [inline]
 allocate_slab mm/slub.c:3380 [inline]
 new_slab+0xa2/0x640 mm/slub.c:3426
 refill_objects+0xe3/0x410 mm/slub.c:7310
 refill_sheaf mm/slub.c:2804 [inline]
 __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675
 alloc_from_pcs mm/slub.c:4773 [inline]
 slab_alloc_node mm/slub.c:4905 [inline]
 __do_kmalloc_node mm/slub.c:5333 [inline]
 __kmalloc_node_track_caller_noprof+0x679/0x830 mm/slub.c:5471
 __kmemdup_nul mm/util.c:64 [inline]
 kstrdup+0x51/0xe0 mm/util.c:84
 kstrdup_const+0x63/0x80 mm/util.c:104
 __kernfs_new_node+0x9b/0xa10 fs/kernfs/dir.c:661
 kernfs_new_node+0x117/0x150 fs/kernfs/dir.c:751
 kernfs_create_link+0xcc/0x240 fs/kernfs/symlink.c:39
 sysfs_do_create_link_sd+0x90/0x140 fs/sysfs/symlink.c:44
 sysfs_do_create_link fs/sysfs/symlink.c:80 [inline]
 sysfs_create_link+0x61/0xc0 fs/sysfs/symlink.c:92
 device_add_class_symlinks drivers/base/core.c:3516 [inline]
 device_add+0x675/0x1970 drivers/base/core.c:3708
 tty_register_device_attr+0x388/0x7f0 drivers/tty/tty_io.c:3261
page_owner free stack trace missing

Memory state around the buggy address:
 ffff8880275ada00: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc
 ffff8880275ada80: 00 fc fc fc 00 fc fc fc 00 fc fc fc 05 fc fc fc
>ffff8880275adb00: 00 fc fc fc 04 fc fc fc 05 fc fc fc fa fc fc fc
                                                       ^
 ffff8880275adb80: 00 fc fc fc fa fc fc fc 00 fc fc fc 00 fc fc fc
 ffff8880275adc00: 00 fc fc fc fa fc fc fc fa fc fc fc 04 fc fc fc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/11 16:14 upstream f5bbbfec59b4 557a89d3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in __setup_irq
2026/08/10 15:09 upstream db2ddb871435 558388e4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in __setup_irq
* Struck through repros no longer work on HEAD.