KASAN: use-after-free Read in trace_event_raw_event_irq_handler_entry

Status: premoderation: reported on 2026/10/07 03:08
Reported-by: syzbot+333cb6f7543f4c2bc5d6@syzkaller.appspotmail.com
First crash: 3d01h, last: 3d01h

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in strlen+0x57/0x70 lib/string.c:502
Read of size 1 at addr ffff88810b566910 by task syz.0.819/15038

CPU: 1 PID: 15038 Comm: syz.0.819 Tainted: G        W          syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Call Trace:
 <IRQ>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x71/0x200 mm/kasan/report.c:316
 print_report+0x4a/0x60 mm/kasan/report.c:420
 kasan_report+0x122/0x150 mm/kasan/report.c:524
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:348
 strlen+0x57/0x70 lib/string.c:502
 __fortify_strlen include/linux/fortify-string.h:196 [inline]
 trace_event_get_offsets_irq_handler_entry include/trace/events/irq.h:61 [inline]
 do_trace_event_raw_event_irq_handler_entry include/trace/events/irq.h:53 [inline]
 trace_event_raw_event_irq_handler_entry+0x107/0x280 include/trace/events/irq.h:53
 trace_irq_handler_entry include/trace/events/irq.h:53 [inline]
 __handle_irq_event_percpu+0x4bb/0x680 kernel/irq/handle.c:157
 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
 handle_irq_event+0x8e/0x1f0 kernel/irq/handle.c:210
 handle_edge_irq+0x2ae/0xd50 kernel/irq/chip.c:834
 generic_handle_irq_desc include/linux/irqdesc.h:160 [inline]
 handle_irq arch/x86/kernel/irq.c:233 [inline]
 __common_interrupt+0xa9/0x1d0 arch/x86/kernel/irq.c:252
 common_interrupt+0x5f/0xe0 arch/x86/kernel/irq.c:242
 asm_common_interrupt+0x27/0x40 arch/x86/include/asm/idtentry.h:682
RIP: 0010:variable_ffs arch/x86/include/asm/bitops.h:319 [inline]
RIP: 0010:handle_softirqs+0x144/0x600 kernel/softirq.c:630
Code: 85 e8 40 6e b7 03 65 66 89 1d 38 13 c0 7e 48 c7 c7 c0 0d 69 85 e8 2c 6e b7 03 65 44 89 25 3c 0f bf 7e fb 49 c7 c5 c0 a0 00 87 <44> 89 65 ac b8 ff ff ff ff 0f bc 45 ac 89 c3 ff c3 0f 84 a2 02 00
RSP: 0018:ffffc900001b0f30 EFLAGS: 00000286
RAX: 0000000000000001 RBX: 0000000000000008 RCX: 36bd428d997d4800
RDX: 1ffffffff0f6e808 RSI: ffffffff85690dc0 RDI: ffffffff85ca7160
RBP: ffffc900001b0fc0 R08: ffffffff87b74048 R09: ffffffff87b74058
R10: ffffffff87b74043 R11: 1ffffffff0f6e808 R12: 0000000000000000
R13: ffffffff8700a0c0 R14: 0000000000000008 R15: ffff888139269440
 __do_softirq kernel/softirq.c:680 [inline]
 invoke_softirq kernel/softirq.c:497 [inline]
 __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729
 irq_exit_rcu+0x9/0x10 kernel/softirq.c:741
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
 sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1118
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x55/0x80 kernel/locking/spinlock.c:194
Code: c0 db 0d 87 e8 ec 76 b5 fc 4c 89 f7 48 83 3d b1 58 0c 02 00 74 30 e8 9e 0d 00 00 90 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 <e8> b6 13 4b fc 65 8b 05 97 ea 00 7b 85 c0 74 05 5b 41 5e 5d c3 e8
RSP: 0018:ffffc90002ef7370 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 0000000000000a02 RCX: dffffc0000000000
RDX: ffffc90001279000 RSI: 0000000000000a02 RDI: 0000000000000001
RBP: ffffc90002ef7380 R08: ffff8881001744b7 R09: 1ffff1102002e896
R10: dffffc0000000000 R11: ffffed102002e897 R12: ffffffff878e9cc0
R13: 0000000000000000 R14: ffff8881f6f3c968 R15: 0000000000000001
 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
 free_pcppages_bulk+0x84f/0x880 mm/page_alloc.c:1737
 free_unref_page_commit+0x398/0x6d0 mm/page_alloc.c:3704
 free_unref_page_list+0x611/0x8d0 mm/page_alloc.c:3832
 release_pages+0xc7e/0xce0 mm/swap.c:1053
 __pagevec_release+0x71/0xe0 mm/swap.c:1073
 pagevec_release include/linux/pagevec.h:71 [inline]
 folio_batch_release include/linux/pagevec.h:135 [inline]
 shmem_undo_range+0x564/0x14e0 mm/shmem.c:951
 shmem_truncate_range mm/shmem.c:1067 [inline]
 shmem_evict_inode+0x21f/0x9c0 mm/shmem.c:1176
 evict+0x4c4/0x8c0 fs/inode.c:709
 iput_final fs/inode.c:1845 [inline]
 iput+0x633/0x690 fs/inode.c:1871
 dentry_unlink_inode+0x346/0x3f0 fs/dcache.c:405
 __dentry_kill+0x46c/0x680 fs/dcache.c:611
 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1
 dput+0x42/0x80 fs/dcache.c:918
 __fput+0x5c0/0x8f0 fs/file_table.c:328
 ____fput+0x15/0x20 fs/file_table.c:348
 task_work_run+0x1e1/0x250 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x9b/0xb0 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:303
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1b3195e9ce
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f1b3295bda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 00007f1b3295c6c0 RCX: 00007f1b3195e9ce
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006
R13: 00007f1b3295bee0 R14: 00007f1b3295bea0 R15: 00007f1b27ff8000
 </TASK>

Allocated by task 1:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
 ____kasan_kmalloc mm/kasan/common.c:380 [inline]
 __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
 kasan_kmalloc include/linux/kasan.h:212 [inline]
 __do_kmalloc_node mm/slab_common.c:938 [inline]
 __kmalloc_node_track_caller+0xb1/0x1e0 mm/slab_common.c:958
 kvasprintf+0xe8/0x1a0 lib/kasprintf.c:25
 kasprintf+0xdf/0x130 lib/kasprintf.c:59
 uart_add_one_port+0x38b/0x1cf0 drivers/tty/serial/serial_core.c:3117
 serial8250_register_8250_port+0x1368/0x1b70 drivers/tty/serial/8250/8250_core.c:1092
 serial_pnp_probe+0x51e/0x710 drivers/tty/serial/8250/8250_pnp.c:478
 pnp_device_probe+0x312/0x4d0 drivers/pnp/driver.c:111
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2d7/0x9a0 drivers/base/dd.c:639
 __driver_probe_device+0x193/0x270 drivers/base/dd.c:808
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
 __driver_attach+0x41a/0x5d0 drivers/base/dd.c:1224
 bus_for_each_dev+0x18c/0x200 drivers/base/bus.c:303
 driver_attach+0x42/0x50 drivers/base/dd.c:1241
 bus_add_driver+0x322/0x560 drivers/base/bus.c:620
 driver_register+0x335/0x440 drivers/base/driver.c:246
 pnp_register_driver+0x7d/0x90 drivers/pnp/driver.c:273
 serial8250_pnp_init+0x15/0x20 drivers/tty/serial/8250/8250_pnp.c:533
 serial8250_init+0xa0/0x16e drivers/tty/serial/8250/8250_core.c:1191
 do_one_initcall+0x1d6/0x580 init/main.c:1433
 do_initcall_level+0x174/0x2df init/main.c:1506
 do_initcalls+0x50/0x92 init/main.c:1522
 do_basic_setup+0x92/0x99 init/main.c:1541
 kernel_init_freeable+0x2d1/0x42d init/main.c:1761
 kernel_init+0x1d/0x1c0 init/main.c:1649
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Freed by task 15083:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:250
 kasan_slab_free include/linux/kasan.h:178 [inline]
 slab_free_hook mm/slub.c:1750 [inline]
 slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776
 slab_free mm/slub.c:3712 [inline]
 __kmem_cache_free+0xb7/0x1b0 mm/slub.c:3728
 kfree+0x6f/0xf0 mm/slab_common.c:990
 uart_remove_one_port+0x36a/0x720 drivers/tty/serial/serial_core.c:3235
 serial8250_unregister_port+0xad/0x250 drivers/tty/serial/8250/8250_core.c:1154
 serial_pnp_remove+0x6b/0x90 drivers/tty/serial/8250/8250_pnp.c:496
 pnp_device_remove+0x84/0x260 drivers/pnp/driver.c:133
 device_remove drivers/base/dd.c:548 [inline]
 __device_release_driver drivers/base/dd.c:1283 [inline]
 device_release_driver_internal+0x486/0x7e0 drivers/base/dd.c:1309
 device_driver_detach+0x3b/0x40 drivers/base/dd.c:1345
 unbind_store+0x2e5/0x300 drivers/base/bus.c:193
 drv_attr_store+0x88/0xb0 drivers/base/bus.c:77
 sysfs_kf_write+0x137/0x150 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x307/0x470 fs/kernfs/file.c:352
 call_write_iter include/linux/fs.h:2282 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x5ef/0xd00 fs/read_write.c:584
 ksys_write+0x14a/0x260 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:646
 x64_sys_call+0x27b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

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

The buggy address belongs to the physical page:
page:ffffea00042d5980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10b566
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 0000000000000000 dead000000000001 ffff888100042300
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 2510193330, free_ts 0
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
 allocate_slab mm/slub.c:1967 [inline]
 new_slab+0x98/0x3e0 mm/slub.c:2020
 ___slab_alloc+0x70f/0xb70 mm/slub.c:3177
 __slab_alloc+0x5e/0xa0 mm/slub.c:3263
 slab_alloc_node mm/slub.c:3348 [inline]
 __kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
 __do_kmalloc_node mm/slab_common.c:937 [inline]
 __kmalloc+0xa4/0x1e0 mm/slab_common.c:951
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 acpi_os_allocate_zeroed include/acpi/platform/aclinuxex.h:57 [inline]
 acpi_ns_internalize_name+0x2cd/0x3b0 drivers/acpi/acpica/nsutils.c:331
 acpi_ns_get_node_unlocked drivers/acpi/acpica/nsutils.c:666 [inline]
 acpi_ns_get_node+0x1a7/0x360 drivers/acpi/acpica/nsutils.c:726
 acpi_ns_evaluate+0x35d/0xa20 drivers/acpi/acpica/nseval.c:62
 acpi_evaluate_object+0x588/0xa60 drivers/acpi/acpica/nsxfeval.c:354
 acpi_processor_get_throttling_control drivers/acpi/processor_throttling.c:410 [inline]
 acpi_processor_get_throttling_info+0xf5/0x1c80 drivers/acpi/processor_throttling.c:1176
 acpi_pss_perf_init drivers/acpi/processor_driver.c:146 [inline]
 __acpi_processor_start+0xf7/0x240 drivers/acpi/processor_driver.c:174
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88810b566800: fc fc fc fc 05 fc fc fc fc 05 fc fc fc fc 04 fc
 ffff88810b566880: fc fc fc 05 fc fc fc fc 05 fc fc fc fc 06 fc fc
>ffff88810b566900: fc fc fa fc fc fc fc 05 fc fc fc fc 00 fc fc fc
                         ^
 ffff88810b566980: fc 05 fc fc fc fc 05 fc fc fc fc 05 fc fc fc fc
 ffff88810b566a00: 05 fc fc fc fc 05 fc fc fc fc 05 fc fc fc fc 05
==================================================================
----------------
Code disassembly (best guess):
   0:	85 e8                	test   %ebp,%eax
   2:	40 6e                	rex outsb %ds:(%rsi),(%dx)
   4:	b7 03                	mov    $0x3,%bh
   6:	65 66 89 1d 38 13 c0 	mov    %bx,%gs:0x7ec01338(%rip)        # 0x7ec01346
   d:	7e
   e:	48 c7 c7 c0 0d 69 85 	mov    $0xffffffff85690dc0,%rdi
  15:	e8 2c 6e b7 03       	call   0x3b76e46
  1a:	65 44 89 25 3c 0f bf 	mov    %r12d,%gs:0x7ebf0f3c(%rip)        # 0x7ebf0f5e
  21:	7e
  22:	fb                   	sti
  23:	49 c7 c5 c0 a0 00 87 	mov    $0xffffffff8700a0c0,%r13
* 2a:	44 89 65 ac          	mov    %r12d,-0x54(%rbp) <-- trapping instruction
  2e:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  33:	0f bc 45 ac          	bsf    -0x54(%rbp),%eax
  37:	89 c3                	mov    %eax,%ebx
  39:	ff c3                	inc    %ebx
  3b:	0f                   	.byte 0xf
  3c:	84                   	.byte 0x84
  3d:	a2                   	.byte 0xa2
  3e:	02 00                	add    (%rax),%al

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/07 03:07 android14-6.1 3b0884642a50 f7710056 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in trace_event_raw_event_irq_handler_entry
* Struck through repros no longer work on HEAD.