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

Status: upstream: reported on 2026/09/23 23:13
Subsystems: kernel
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+843bf2f48f4d12e6682e@syzkaller.appspotmail.com
Fix commit: 810d467c11f0 serial: core: shut down initialized port on removal
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu-native-arm64-kvm ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root]
First crash: 90d, last: 29d
▶ ▼ ✨ 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
▶ ▼ Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [kernel?] KASAN: slab-use-after-free Read in __setup_irq 1 (2) 2026/10/15 21:53
[PATCH] serial: core: shut down initialized port on removal 6 (6) 2026/10/13 16:45
▶ ▼ 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 9d13h 47d 0/2 upstream: reported on 2026/09/23 02:54
linux-5.15 KASAN: use-after-free Read in __setup_irq 19 1 5d04h 5d04h 0/3 upstream: reported on 2026/11/04 10:09

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+0x216/0x2d0 lib/vsprintf.c:730
Read of size 1 at addr ffff8880271faf80 by task syz.9.1832/14487

CPU: 1 UID: 0 PID: 14487 Comm: syz.9.1832 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 string_nocheck lib/vsprintf.c:648 [inline]
 string+0x216/0x2d0 lib/vsprintf.c:730
 vsnprintf+0x74a/0xef0 lib/vsprintf.c:2949
 vprintk_store+0x3be/0xd90 kernel/printk/printk.c:2307
 vprintk_emit+0x192/0x560 kernel/printk/printk.c:2455
 _printk+0xdd/0x130 kernel/printk/printk.c:2504
 __setup_irq+0x1015/0x2100 kernel/irq/manage.c:1821
 request_threaded_irq+0x2c1/0x3a0 kernel/irq/manage.c:2184
 request_irq include/linux/interrupt.h:176 [inline]
 pcl812_attach+0x254/0x22b0 drivers/comedi/drivers/pcl812.c:1174
 comedi_device_attach+0x52d/0x720 drivers/comedi/drivers.c:1101
 do_devconfig_ioctl drivers/comedi/comedi_fops.c:930 [inline]
 comedi_unlocked_ioctl+0x8ef/0x1af0 drivers/comedi/comedi_fops.c:2302
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3bd7f9e1d9
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:00007f3bd61f6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f3bd8225fa0 RCX: 00007f3bd7f9e1d9
RDX: 0000200000000a80 RSI: 0000000040946400 RDI: 0000000000000008
RBP: 00007f3bd8035888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f3bd8226038 R14: 00007f3bd8225fa0 R15: 00007fffd8288528
 </TASK>

Allocated by task 14056:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:426
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_node_track_caller_noprof+0x4b4/0x720 mm/slub.c:5545
 __kmemdup_nul mm/util.c:64 [inline]
 kstrdup+0x42/0x100 mm/util.c:84
 __kernfs_new_node+0xa9/0x980 fs/kernfs/dir.c:661
 kernfs_new_node fs/kernfs/dir.c:751 [inline]
 kernfs_create_dir_ns+0xfe/0x230 fs/kernfs/dir.c:1120
 sysfs_create_dir_ns+0x12f/0x2a0 fs/sysfs/dir.c:59
 create_dir lib/kobject.c:73 [inline]
 kobject_add_internal+0x622/0xcd0 lib/kobject.c:240
 kobject_add_varg lib/kobject.c:374 [inline]
 kobject_init_and_add+0x12b/0x1a0 lib/kobject.c:457
 rx_queue_add_kobject net/core/net-sysfs.c:1239 [inline]
 net_rx_queue_update_kobjects+0x247/0x780 net/core/net-sysfs.c:1301
 register_queue_kobjects net/core/net-sysfs.c:2093 [inline]
 netdev_register_kobject+0x23e/0x350 net/core/net-sysfs.c:2344
 register_netdevice+0x1433/0x1eb0 net/core/dev.c:11549
 __ip_tunnel_create+0x3e8/0x550 net/ipv4/ip_tunnel.c:268
 ip_tunnel_init_net+0x2e5/0x820 net/ipv4/ip_tunnel.c:1137
 ops_init+0x35d/0x5d0 net/core/net_namespace.c:137
 setup_net+0x118/0x350 net/core/net_namespace.c:443
 copy_net_ns+0x53b/0x780 net/core/net_namespace.c:582
 create_new_namespaces+0x3f0/0x6b0 kernel/nsproxy.c:132
 unshare_nsproxy_namespaces+0x149/0x190 kernel/nsproxy.c:234
 ksys_unshare+0x5d8/0x970 kernel/fork.c:3297
 __do_sys_unshare kernel/fork.c:3365 [inline]
 __se_sys_unshare kernel/fork.c:3363 [inline]
 __x64_sys_unshare+0x38/0x50 kernel/fork.c:3363
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 24:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:264 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6509 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6802
 kernfs_free_rcu+0x3b/0xd0 fs/kernfs/dir.c:571
 rcu_do_batch kernel/rcu/tree.c:2650 [inline]
 rcu_core+0x926/0x1260 kernel/rcu/tree.c:2919
 handle_softirqs+0x226/0x860 kernel/softirq.c:645
 run_ksoftirqd+0x36/0x60 kernel/softirq.c:1099
 smpboot_thread_fn+0x565/0xa70 kernel/smpboot.c:160
 kthread+0x38b/0x480 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880271faf20 pfn:0x271fa
flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000200 ffff88801c041500 ffffea0000b1eed0 ffffea0001d63490
raw: ffff8880271faf20 0000000000800074 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 5101941425
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab+0x7d/0x620 mm/slub.c:3462
 new_slab mm/slub.c:3513 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7418
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545
 __kmemdup_nul mm/util.c:64 [inline]
 kstrdup+0x42/0x100 mm/util.c:84
 __kernfs_new_node+0xa9/0x980 fs/kernfs/dir.c:661
 kernfs_new_node+0xea/0x140 fs/kernfs/dir.c:751
 kernfs_create_link+0xa7/0x200 fs/kernfs/symlink.c:39
 sysfs_do_create_link_sd+0x83/0x110 fs/sysfs/symlink.c:44
 device_create_sys_dev_entry+0x122/0x190 drivers/base/core.c:3587
 device_add+0x71e/0xb80 drivers/base/core.c:3731
 tty_register_device_attr+0x428/0x9b0 drivers/tty/tty_io.c:3254
 tty_register_device drivers/tty/tty_io.c:3189 [inline]
 tty_register_driver+0x868/0xe50 drivers/tty/tty_io.c:3469
page_owner free stack trace missing

Memory state around the buggy address:
 ffff8880271fae80: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
 ffff8880271faf00: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
>ffff8880271faf80: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
                   ^
 ffff8880271fb000: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc 00 00
 ffff8880271fb080: 00 00 00 00 00 00 00 00 fc fc fc fc 00 00 00 00
==================================================================

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/11 05:51 upstream a5ebb76233b7 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-use-after-free Read in __setup_irq
2026/10/08 07:32 upstream 7b63ef2d55f2 6520ecdb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-use-after-free Read in __setup_irq
2026/10/08 05:22 upstream 7b63ef2d55f2 6520ecdb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in __setup_irq
2026/10/05 14:29 upstream a90ee4305c4a 1995e6c7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in __setup_irq
2026/09/25 02:29 upstream f49a343b305c 3c3cdf19 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in __setup_irq
2026/09/23 23:12 upstream fe2ec83746e5 0a1606bc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in __setup_irq
2026/09/23 21:03 upstream fe2ec83746e5 0a1606bc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-use-after-free Read in __setup_irq
2026/09/23 21:03 upstream fe2ec83746e5 0a1606bc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-use-after-free Read in __setup_irq
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
2026/10/03 17:16 linux-next f0406245cb98 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in __setup_irq
2026/10/03 09:02 linux-next f0406245cb98 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in __setup_irq
2026/09/28 14:37 linux-next f5f84daefcd9 a3c7249d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in __setup_irq
* Struck through repros no longer work on HEAD.