Hay
Date
July 16, 2025, 12:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   32.970879] ==================================================================
[   32.971251] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   32.971344] Read of size 1 at addr fff00000c9bb4890 by task kunit_try_catch/290
[   32.971520] 
[   32.971554] CPU: 0 UID: 0 PID: 290 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   32.972038] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.972132] Hardware name: linux,dummy-virt (DT)
[   32.972178] Call trace:
[   32.972464]  show_stack+0x20/0x38 (C)
[   32.972637]  dump_stack_lvl+0x8c/0xd0
[   32.973015]  print_report+0x118/0x5d0
[   32.973168]  kasan_report+0xdc/0x128
[   32.973358]  __asan_report_load1_noabort+0x20/0x30
[   32.973466]  strcmp+0xc0/0xc8
[   32.973817]  kasan_strings+0x340/0xb00
[   32.973893]  kunit_try_run_case+0x170/0x3f0
[   32.974201]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.974431]  kthread+0x328/0x630
[   32.974887]  ret_from_fork+0x10/0x20
[   32.975177] 
[   32.975261] Allocated by task 290:
[   32.975366]  kasan_save_stack+0x3c/0x68
[   32.975660]  kasan_save_track+0x20/0x40
[   32.975843]  kasan_save_alloc_info+0x40/0x58
[   32.975968]  __kasan_kmalloc+0xd4/0xd8
[   32.976112]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.976159]  kasan_strings+0xc8/0xb00
[   32.976199]  kunit_try_run_case+0x170/0x3f0
[   32.976240]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.976724]  kthread+0x328/0x630
[   32.976795]  ret_from_fork+0x10/0x20
[   32.976974] 
[   32.977233] Freed by task 290:
[   32.977419]  kasan_save_stack+0x3c/0x68
[   32.977557]  kasan_save_track+0x20/0x40
[   32.977773]  kasan_save_free_info+0x4c/0x78
[   32.977917]  __kasan_slab_free+0x6c/0x98
[   32.978060]  kfree+0x214/0x3c8
[   32.978564]  kasan_strings+0x24c/0xb00
[   32.978627]  kunit_try_run_case+0x170/0x3f0
[   32.978964]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.979141]  kthread+0x328/0x630
[   32.979319]  ret_from_fork+0x10/0x20
[   32.979534] 
[   32.979600] The buggy address belongs to the object at fff00000c9bb4880
[   32.979600]  which belongs to the cache kmalloc-32 of size 32
[   32.979808] The buggy address is located 16 bytes inside of
[   32.979808]  freed 32-byte region [fff00000c9bb4880, fff00000c9bb48a0)
[   32.980079] 
[   32.980215] The buggy address belongs to the physical page:
[   32.980297] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bb4
[   32.980392] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.980446] page_type: f5(slab)
[   32.980487] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   32.980902] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   32.981131] page dumped because: kasan: bad access detected
[   32.981383] 
[   32.981459] Memory state around the buggy address:
[   32.981875]  fff00000c9bb4780: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   32.982004]  fff00000c9bb4800: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   32.982243] >fff00000c9bb4880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   32.982361]                          ^
[   32.982520]  fff00000c9bb4900: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   32.982616]  fff00000c9bb4980: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   32.982886] ==================================================================

[   25.215012] ==================================================================
[   25.215924] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   25.216384] Read of size 1 at addr ffff8881053b8d50 by task kunit_try_catch/308
[   25.216645] 
[   25.216772] CPU: 0 UID: 0 PID: 308 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   25.216830] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.216843] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.216866] Call Trace:
[   25.216881]  <TASK>
[   25.216903]  dump_stack_lvl+0x73/0xb0
[   25.216935]  print_report+0xd1/0x610
[   25.216964]  ? __virt_addr_valid+0x1db/0x2d0
[   25.216990]  ? strcmp+0xb0/0xc0
[   25.217011]  ? kasan_complete_mode_report_info+0x64/0x200
[   25.217037]  ? strcmp+0xb0/0xc0
[   25.217072]  kasan_report+0x141/0x180
[   25.217094]  ? strcmp+0xb0/0xc0
[   25.217119]  __asan_report_load1_noabort+0x18/0x20
[   25.217142]  strcmp+0xb0/0xc0
[   25.217164]  kasan_strings+0x431/0xe80
[   25.217184]  ? trace_hardirqs_on+0x37/0xe0
[   25.217210]  ? __pfx_kasan_strings+0x10/0x10
[   25.217230]  ? finish_task_switch.isra.0+0x153/0x700
[   25.217253]  ? __switch_to+0x47/0xf80
[   25.217281]  ? __schedule+0x10c6/0x2b60
[   25.217316]  ? __pfx_read_tsc+0x10/0x10
[   25.217338]  ? ktime_get_ts64+0x86/0x230
[   25.217364]  kunit_try_run_case+0x1a5/0x480
[   25.217390]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.217412]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.217436]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.217458]  ? __kthread_parkme+0x82/0x180
[   25.217479]  ? preempt_count_sub+0x50/0x80
[   25.217500]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.217523]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.217550]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.217576]  kthread+0x337/0x6f0
[   25.217697]  ? trace_preempt_on+0x20/0xc0
[   25.217720]  ? __pfx_kthread+0x10/0x10
[   25.217741]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.217761]  ? calculate_sigpending+0x7b/0xa0
[   25.217786]  ? __pfx_kthread+0x10/0x10
[   25.217808]  ret_from_fork+0x116/0x1d0
[   25.217827]  ? __pfx_kthread+0x10/0x10
[   25.217847]  ret_from_fork_asm+0x1a/0x30
[   25.217916]  </TASK>
[   25.217929] 
[   25.225598] Allocated by task 308:
[   25.225780]  kasan_save_stack+0x45/0x70
[   25.226093]  kasan_save_track+0x18/0x40
[   25.226292]  kasan_save_alloc_info+0x3b/0x50
[   25.226505]  __kasan_kmalloc+0xb7/0xc0
[   25.226680]  __kmalloc_cache_noprof+0x189/0x420
[   25.227115]  kasan_strings+0xc0/0xe80
[   25.227249]  kunit_try_run_case+0x1a5/0x480
[   25.227402]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.227747]  kthread+0x337/0x6f0
[   25.227966]  ret_from_fork+0x116/0x1d0
[   25.228188]  ret_from_fork_asm+0x1a/0x30
[   25.228384] 
[   25.228468] Freed by task 308:
[   25.228606]  kasan_save_stack+0x45/0x70
[   25.228815]  kasan_save_track+0x18/0x40
[   25.229116]  kasan_save_free_info+0x3f/0x60
[   25.229336]  __kasan_slab_free+0x56/0x70
[   25.229502]  kfree+0x222/0x3f0
[   25.229713]  kasan_strings+0x2aa/0xe80
[   25.229862]  kunit_try_run_case+0x1a5/0x480
[   25.230066]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.230274]  kthread+0x337/0x6f0
[   25.230427]  ret_from_fork+0x116/0x1d0
[   25.230583]  ret_from_fork_asm+0x1a/0x30
[   25.230793] 
[   25.230859] The buggy address belongs to the object at ffff8881053b8d40
[   25.230859]  which belongs to the cache kmalloc-32 of size 32
[   25.231211] The buggy address is located 16 bytes inside of
[   25.231211]  freed 32-byte region [ffff8881053b8d40, ffff8881053b8d60)
[   25.231609] 
[   25.231705] The buggy address belongs to the physical page:
[   25.232378] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053b8
[   25.232793] flags: 0x200000000000000(node=0|zone=2)
[   25.233308] page_type: f5(slab)
[   25.233441] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.233943] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.234269] page dumped because: kasan: bad access detected
[   25.234496] 
[   25.234567] Memory state around the buggy address:
[   25.234769]  ffff8881053b8c00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.234985]  ffff8881053b8c80: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   25.235305] >ffff8881053b8d00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.235663]                                                  ^
[   25.235937]  ffff8881053b8d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.236208]  ffff8881053b8e00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.236559] ==================================================================