KASAN: use-after-free Read in __setup_irq

Status: upstream: reported on 2026/11/04 10:09
Reported-by: syzbot+8bcc3eabff28a4094eee@syzkaller.appspotmail.com
First crash: 5d05h, last: 5d05h
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 KASAN: slab-use-after-free Read in __setup_irq 19 4 9d14h 47d 0/2 upstream: reported on 2026/09/23 02:54
upstream KASAN: slab-use-after-free Read in __setup_irq prio:high kernel 19 13 29d 46d 26/29 upstream: reported on 2026/09/23 23:13

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in string_nocheck lib/vsprintf.c:642 [inline]
BUG: KASAN: use-after-free in string+0x204/0x290 lib/vsprintf.c:724
Read of size 1 at addr ffff888020f310c8 by task syz.0.513/6292

CPU: 1 PID: 6292 Comm: syz.0.513 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 string_nocheck lib/vsprintf.c:642 [inline]
 string+0x204/0x290 lib/vsprintf.c:724
 vsnprintf+0x10db/0x1c20 lib/vsprintf.c:2811
 vprintk_store+0x378/0x11b0 kernel/printk/printk.c:2164
 vprintk_emit+0x85/0x150 kernel/printk/printk.c:2258
 _printk+0xda/0x130 kernel/printk/printk.c:2299
 __setup_irq+0xe7e/0x1d60 kernel/irq/manage.c:1833
 request_threaded_irq+0x2bd/0x3a0 kernel/irq/manage.c:2206
 request_irq include/linux/interrupt.h:168 [inline]
 aio_iiro_16_attach+0x114/0x750 drivers/comedi/drivers/aio_iiro_16.c:183
 comedi_device_attach+0x522/0x710 drivers/comedi/drivers.c:1015
 do_devconfig_ioctl drivers/comedi/comedi_fops.c:868 [inline]
 comedi_unlocked_ioctl+0x674/0x1240 drivers/comedi/comedi_fops.c:2173
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f58c16bfb19
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:00007f58bf916028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f58c1945fa0 RCX: 00007f58c16bfb19
RDX: 0000200000000200 RSI: 0000000040946400 RDI: 0000000000000003
RBP: 00007f58c1757b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f58c1946038 R14: 00007f58c1945fa0 R15: 00007ffdb7873cd8
 </TASK>

Allocated by task 4188:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc mm/kasan/common.c:513 [inline]
 __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522
 kmalloc_node include/linux/slab.h:630 [inline]
 __vmalloc_area_node mm/vmalloc.c:2951 [inline]
 __vmalloc_node_range+0x2dd/0x8b0 mm/vmalloc.c:3070
 __vmalloc_node mm/vmalloc.c:3120 [inline]
 vzalloc+0x75/0x80 mm/vmalloc.c:3190
 alloc_counters+0xcc/0x750 net/ipv4/netfilter/arp_tables.c:671
 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:844 [inline]
 get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline]
 do_ip6t_get_ctl+0xa3e/0x1130 net/ipv6/netfilter/ip6_tables.c:1681
 nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116
 ipv6_getsockopt+0x43f/0x2390 net/ipv6/ipv6_sockglue.c:1492
 tcp_getsockopt+0x209/0x25e0 net/ipv4/tcp.c:4325
 __sys_getsockopt+0x1b0/0x230 net/socket.c:2257
 __do_sys_getsockopt net/socket.c:2272 [inline]
 __se_sys_getsockopt net/socket.c:2269 [inline]
 __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2269
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Freed by task 4188:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
 kasan_slab_free include/linux/kasan.h:230 [inline]
 slab_free_hook mm/slub.c:1710 [inline]
 slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736
 slab_free mm/slub.c:3504 [inline]
 kfree+0xef/0x2a0 mm/slub.c:4564
 __vunmap+0x9d4/0xa80 mm/vmalloc.c:2667
 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:887 [inline]
 get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline]
 do_ip6t_get_ctl+0xe4b/0x1130 net/ipv6/netfilter/ip6_tables.c:1681
 nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116
 ipv6_getsockopt+0x43f/0x2390 net/ipv6/ipv6_sockglue.c:1492
 tcp_getsockopt+0x209/0x25e0 net/ipv4/tcp.c:4325
 __sys_getsockopt+0x1b0/0x230 net/socket.c:2257
 __do_sys_getsockopt net/socket.c:2272 [inline]
 __se_sys_getsockopt net/socket.c:2269 [inline]
 __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2269
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff888020f310c8
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 8-byte region [ffff888020f310c8, ffff888020f310d0)
The buggy address belongs to the page:
page:ffffea000083cc40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20f31
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea000092ca40 0000001100000011 ffff888017841280
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, ts 6085382657, free_ts 0
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031
 alloc_slab_page mm/slub.c:1780 [inline]
 allocate_slab mm/slub.c:1917 [inline]
 new_slab+0xc0/0x4b0 mm/slub.c:1980
 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013
 __slab_alloc mm/slub.c:3100 [inline]
 slab_alloc_node mm/slub.c:3191 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 __kmalloc_track_caller+0x11b/0x330 mm/slub.c:4930
 kstrdup mm/util.c:60 [inline]
 kstrdup_const+0x51/0x90 mm/util.c:83
 __kernfs_new_node+0xa8/0x6b0 fs/kernfs/dir.c:589
 kernfs_new_node+0x148/0x250 fs/kernfs/dir.c:669
 kernfs_create_link+0xa3/0x200 fs/kernfs/symlink.c:39
 sysfs_do_create_link_sd+0x83/0x110 fs/sysfs/symlink.c:44
 device_create_sys_dev_entry+0x11b/0x180 drivers/base/core.c:3237
 device_add+0xb24/0x1050 drivers/base/core.c:3379
 tty_register_device_attr+0x42a/0x9a0 drivers/tty/tty_io.c:3278
 tty_register_device drivers/tty/tty_io.c:3213 [inline]
 tty_register_driver+0x5d4/0xb80 drivers/tty/tty_io.c:3471
 legacy_pty_init+0x3c1/0x600 drivers/tty/pty.c:581
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888020f30f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888020f31000: 06 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 04
>ffff888020f31080: fc fc fc fc fa fc fc fc fc fa fc fc fc fc 04 fc
                                              ^
 ffff888020f31100: fc fc fc 04 fc fc fc fc 04 fc fc fc fc 04 fc fc
 ffff888020f31180: fc fc 04 fc fc fc fc 04 fc fc fc fc 04 fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/04 10:08 linux-5.15.y 700e62ea909a 5af5b6c6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in __setup_irq
* Struck through repros no longer work on HEAD.