Hay
Date
July 10, 2025, 11:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.257391] ==================================================================
[   18.257465] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   18.257831] Read of size 1 at addr fff00000c63569d0 by task kunit_try_catch/259
[   18.258134] 
[   18.258506] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.258969] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.259096] Hardware name: linux,dummy-virt (DT)
[   18.259158] Call trace:
[   18.259602]  show_stack+0x20/0x38 (C)
[   18.259714]  dump_stack_lvl+0x8c/0xd0
[   18.259845]  print_report+0x118/0x608
[   18.259898]  kasan_report+0xdc/0x128
[   18.260145]  __asan_report_load1_noabort+0x20/0x30
[   18.260356]  strcmp+0xc0/0xc8
[   18.260456]  kasan_strings+0x340/0xb00
[   18.260903]  kunit_try_run_case+0x170/0x3f0
[   18.261060]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.261148]  kthread+0x328/0x630
[   18.261255]  ret_from_fork+0x10/0x20
[   18.261637] 
[   18.261737] Allocated by task 259:
[   18.261793]  kasan_save_stack+0x3c/0x68
[   18.262024]  kasan_save_track+0x20/0x40
[   18.262226]  kasan_save_alloc_info+0x40/0x58
[   18.262336]  __kasan_kmalloc+0xd4/0xd8
[   18.262431]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.262511]  kasan_strings+0xc8/0xb00
[   18.262593]  kunit_try_run_case+0x170/0x3f0
[   18.262771]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.263094]  kthread+0x328/0x630
[   18.263175]  ret_from_fork+0x10/0x20
[   18.263215] 
[   18.263237] Freed by task 259:
[   18.263406]  kasan_save_stack+0x3c/0x68
[   18.263565]  kasan_save_track+0x20/0x40
[   18.263717]  kasan_save_free_info+0x4c/0x78
[   18.263814]  __kasan_slab_free+0x6c/0x98
[   18.263928]  kfree+0x214/0x3c8
[   18.264006]  kasan_strings+0x24c/0xb00
[   18.264439]  kunit_try_run_case+0x170/0x3f0
[   18.264535]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.264925]  kthread+0x328/0x630
[   18.265220]  ret_from_fork+0x10/0x20
[   18.265463] 
[   18.265664] The buggy address belongs to the object at fff00000c63569c0
[   18.265664]  which belongs to the cache kmalloc-32 of size 32
[   18.265811] The buggy address is located 16 bytes inside of
[   18.265811]  freed 32-byte region [fff00000c63569c0, fff00000c63569e0)
[   18.265920] 
[   18.265992] The buggy address belongs to the physical page:
[   18.266029] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106356
[   18.266097] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.266487] page_type: f5(slab)
[   18.266589] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.266717] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.266783] page dumped because: kasan: bad access detected
[   18.266852] 
[   18.266971] Memory state around the buggy address:
[   18.267058]  fff00000c6356880: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.267352]  fff00000c6356900: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   18.267557] >fff00000c6356980: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   18.267706]                                                  ^
[   18.267796]  fff00000c6356a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.267916]  fff00000c6356a80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   18.267985] ==================================================================

[   14.607108] ==================================================================
[   14.608115] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   14.608383] Read of size 1 at addr ffff8881039ba750 by task kunit_try_catch/277
[   14.608811] 
[   14.608940] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.608984] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.608995] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.609016] Call Trace:
[   14.609029]  <TASK>
[   14.609045]  dump_stack_lvl+0x73/0xb0
[   14.609077]  print_report+0xd1/0x650
[   14.609101]  ? __virt_addr_valid+0x1db/0x2d0
[   14.609125]  ? strcmp+0xb0/0xc0
[   14.609142]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.609165]  ? strcmp+0xb0/0xc0
[   14.609183]  kasan_report+0x141/0x180
[   14.609204]  ? strcmp+0xb0/0xc0
[   14.609225]  __asan_report_load1_noabort+0x18/0x20
[   14.609250]  strcmp+0xb0/0xc0
[   14.609269]  kasan_strings+0x431/0xe80
[   14.609291]  ? __pfx_kasan_strings+0x10/0x10
[   14.609312]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   14.609345]  ? __pfx_kasan_strings+0x10/0x10
[   14.609384]  kunit_try_run_case+0x1a5/0x480
[   14.609410]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.609506]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.609535]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.609560]  ? __kthread_parkme+0x82/0x180
[   14.609581]  ? preempt_count_sub+0x50/0x80
[   14.609606]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.609631]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.609656]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.609682]  kthread+0x337/0x6f0
[   14.609701]  ? trace_preempt_on+0x20/0xc0
[   14.609725]  ? __pfx_kthread+0x10/0x10
[   14.609746]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.609768]  ? calculate_sigpending+0x7b/0xa0
[   14.609792]  ? __pfx_kthread+0x10/0x10
[   14.609814]  ret_from_fork+0x116/0x1d0
[   14.609834]  ? __pfx_kthread+0x10/0x10
[   14.609854]  ret_from_fork_asm+0x1a/0x30
[   14.609885]  </TASK>
[   14.609896] 
[   14.617259] Allocated by task 277:
[   14.617519]  kasan_save_stack+0x45/0x70
[   14.617722]  kasan_save_track+0x18/0x40
[   14.617914]  kasan_save_alloc_info+0x3b/0x50
[   14.618108]  __kasan_kmalloc+0xb7/0xc0
[   14.618273]  __kmalloc_cache_noprof+0x189/0x420
[   14.618503]  kasan_strings+0xc0/0xe80
[   14.618768]  kunit_try_run_case+0x1a5/0x480
[   14.618946]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.619201]  kthread+0x337/0x6f0
[   14.619343]  ret_from_fork+0x116/0x1d0
[   14.619615]  ret_from_fork_asm+0x1a/0x30
[   14.619773] 
[   14.619844] Freed by task 277:
[   14.620005]  kasan_save_stack+0x45/0x70
[   14.620211]  kasan_save_track+0x18/0x40
[   14.620397]  kasan_save_free_info+0x3f/0x60
[   14.620546]  __kasan_slab_free+0x56/0x70
[   14.620925]  kfree+0x222/0x3f0
[   14.621151]  kasan_strings+0x2aa/0xe80
[   14.621320]  kunit_try_run_case+0x1a5/0x480
[   14.621621]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.621838]  kthread+0x337/0x6f0
[   14.621961]  ret_from_fork+0x116/0x1d0
[   14.622150]  ret_from_fork_asm+0x1a/0x30
[   14.622428] 
[   14.622534] The buggy address belongs to the object at ffff8881039ba740
[   14.622534]  which belongs to the cache kmalloc-32 of size 32
[   14.622987] The buggy address is located 16 bytes inside of
[   14.622987]  freed 32-byte region [ffff8881039ba740, ffff8881039ba760)
[   14.623537] 
[   14.623613] The buggy address belongs to the physical page:
[   14.623786] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ba
[   14.624027] flags: 0x200000000000000(node=0|zone=2)
[   14.624232] page_type: f5(slab)
[   14.624407] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.624746] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.625078] page dumped because: kasan: bad access detected
[   14.625290] 
[   14.625367] Memory state around the buggy address:
[   14.625523]  ffff8881039ba600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.625740]  ffff8881039ba680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.626172] >ffff8881039ba700: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.626512]                                                  ^
[   14.626994]  ffff8881039ba780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.627326]  ffff8881039ba800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.627728] ==================================================================