Hay
Date
June 17, 2025, 3:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   24.630133] ==================================================================
[   24.630489] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   24.632042] Read of size 1 at addr fff00000c73a8610 by task kunit_try_catch/261
[   24.632279] 
[   24.632371] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT 
[   24.632567] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.632630] Hardware name: linux,dummy-virt (DT)
[   24.632697] Call trace:
[   24.632762]  show_stack+0x20/0x38 (C)
[   24.632896]  dump_stack_lvl+0x8c/0xd0
[   24.633002]  print_report+0x118/0x608
[   24.633104]  kasan_report+0xdc/0x128
[   24.633192]  __asan_report_load1_noabort+0x20/0x30
[   24.633288]  strcmp+0xc0/0xc8
[   24.633377]  kasan_strings+0x340/0xb00
[   24.633484]  kunit_try_run_case+0x170/0x3f0
[   24.633580]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.633684]  kthread+0x328/0x630
[   24.635878]  ret_from_fork+0x10/0x20
[   24.636000] 
[   24.636044] Allocated by task 261:
[   24.636147]  kasan_save_stack+0x3c/0x68
[   24.636236]  kasan_save_track+0x20/0x40
[   24.636323]  kasan_save_alloc_info+0x40/0x58
[   24.636412]  __kasan_kmalloc+0xd4/0xd8
[   24.636496]  __kmalloc_cache_noprof+0x16c/0x3c0
[   24.636589]  kasan_strings+0xc8/0xb00
[   24.636667]  kunit_try_run_case+0x170/0x3f0
[   24.636777]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.636886]  kthread+0x328/0x630
[   24.636972]  ret_from_fork+0x10/0x20
[   24.637052] 
[   24.637098] Freed by task 261:
[   24.637163]  kasan_save_stack+0x3c/0x68
[   24.637253]  kasan_save_track+0x20/0x40
[   24.637335]  kasan_save_free_info+0x4c/0x78
[   24.637435]  __kasan_slab_free+0x6c/0x98
[   24.637524]  kfree+0x214/0x3c8
[   24.637598]  kasan_strings+0x24c/0xb00
[   24.637686]  kunit_try_run_case+0x170/0x3f0
[   24.639138]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.639277]  kthread+0x328/0x630
[   24.639371]  ret_from_fork+0x10/0x20
[   24.639503] 
[   24.639552] The buggy address belongs to the object at fff00000c73a8600
[   24.639552]  which belongs to the cache kmalloc-32 of size 32
[   24.639698] The buggy address is located 16 bytes inside of
[   24.639698]  freed 32-byte region [fff00000c73a8600, fff00000c73a8620)
[   24.639945] 
[   24.640024] The buggy address belongs to the physical page:
[   24.640148] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1073a8
[   24.640344] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.640522] page_type: f5(slab)
[   24.640661] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   24.640802] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   24.640883] page dumped because: kasan: bad access detected
[   24.640951] 
[   24.640989] Memory state around the buggy address:
[   24.641070]  fff00000c73a8500: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.641226]  fff00000c73a8580: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.641331] >fff00000c73a8600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   24.641414]                          ^
[   24.641484]  fff00000c73a8680: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.641578]  fff00000c73a8700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   24.641671] ==================================================================

[   22.356087] ==================================================================
[   22.357645] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   22.358681] Read of size 1 at addr ffff888102ef0050 by task kunit_try_catch/279
[   22.359850] 
[   22.360099] CPU: 1 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT(voluntary) 
[   22.360566] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.360638] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.360705] Call Trace:
[   22.360745]  <TASK>
[   22.360829]  dump_stack_lvl+0x73/0xb0
[   22.360961]  print_report+0xd1/0x650
[   22.361066]  ? __virt_addr_valid+0x1db/0x2d0
[   22.361145]  ? strcmp+0xb0/0xc0
[   22.361208]  ? kasan_complete_mode_report_info+0x64/0x200
[   22.361281]  ? strcmp+0xb0/0xc0
[   22.361365]  kasan_report+0x141/0x180
[   22.361440]  ? strcmp+0xb0/0xc0
[   22.361631]  __asan_report_load1_noabort+0x18/0x20
[   22.361672]  strcmp+0xb0/0xc0
[   22.361704]  kasan_strings+0x431/0xe80
[   22.361741]  ? trace_hardirqs_on+0x37/0xe0
[   22.361780]  ? __pfx_kasan_strings+0x10/0x10
[   22.361813]  ? finish_task_switch.isra.0+0x153/0x700
[   22.361850]  ? __switch_to+0x5d9/0xf60
[   22.361881]  ? dequeue_task_fair+0x166/0x4e0
[   22.361918]  ? __schedule+0x10cc/0x2b60
[   22.362015]  ? __pfx_read_tsc+0x10/0x10
[   22.362097]  ? ktime_get_ts64+0x86/0x230
[   22.362169]  kunit_try_run_case+0x1a5/0x480
[   22.362215]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.362250]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.362311]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.362353]  ? __kthread_parkme+0x82/0x180
[   22.362390]  ? preempt_count_sub+0x50/0x80
[   22.362426]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.362464]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.362500]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.362537]  kthread+0x337/0x6f0
[   22.362563]  ? trace_preempt_on+0x20/0xc0
[   22.362599]  ? __pfx_kthread+0x10/0x10
[   22.362630]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.362664]  ? calculate_sigpending+0x7b/0xa0
[   22.362700]  ? __pfx_kthread+0x10/0x10
[   22.362728]  ret_from_fork+0x41/0x80
[   22.362764]  ? __pfx_kthread+0x10/0x10
[   22.362792]  ret_from_fork_asm+0x1a/0x30
[   22.362840]  </TASK>
[   22.362855] 
[   22.385844] Allocated by task 279:
[   22.386820]  kasan_save_stack+0x45/0x70
[   22.387429]  kasan_save_track+0x18/0x40
[   22.387871]  kasan_save_alloc_info+0x3b/0x50
[   22.388522]  __kasan_kmalloc+0xb7/0xc0
[   22.388936]  __kmalloc_cache_noprof+0x189/0x420
[   22.389488]  kasan_strings+0xc0/0xe80
[   22.389894]  kunit_try_run_case+0x1a5/0x480
[   22.391038]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.391459]  kthread+0x337/0x6f0
[   22.392115]  ret_from_fork+0x41/0x80
[   22.392574]  ret_from_fork_asm+0x1a/0x30
[   22.393019] 
[   22.393374] Freed by task 279:
[   22.393761]  kasan_save_stack+0x45/0x70
[   22.394223]  kasan_save_track+0x18/0x40
[   22.395088]  kasan_save_free_info+0x3f/0x60
[   22.395819]  __kasan_slab_free+0x56/0x70
[   22.396154]  kfree+0x222/0x3f0
[   22.396534]  kasan_strings+0x2aa/0xe80
[   22.396938]  kunit_try_run_case+0x1a5/0x480
[   22.397618]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.398005]  kthread+0x337/0x6f0
[   22.398411]  ret_from_fork+0x41/0x80
[   22.399369]  ret_from_fork_asm+0x1a/0x30
[   22.399812] 
[   22.400086] The buggy address belongs to the object at ffff888102ef0040
[   22.400086]  which belongs to the cache kmalloc-32 of size 32
[   22.401031] The buggy address is located 16 bytes inside of
[   22.401031]  freed 32-byte region [ffff888102ef0040, ffff888102ef0060)
[   22.402078] 
[   22.402273] The buggy address belongs to the physical page:
[   22.402985] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ef0
[   22.404472] flags: 0x200000000000000(node=0|zone=2)
[   22.405212] page_type: f5(slab)
[   22.405567] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   22.406339] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   22.406942] page dumped because: kasan: bad access detected
[   22.407830] 
[   22.408102] Memory state around the buggy address:
[   22.408543]  ffff888102eeff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.409565]  ffff888102eeff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.410464] >ffff888102ef0000: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   22.410991]                                                  ^
[   22.411562]  ffff888102ef0080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   22.412854]  ffff888102ef0100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   22.413727] ==================================================================