Hay
Date
July 16, 2025, 3:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.814984] ==================================================================
[   18.815040] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   18.815099] Read of size 1 at addr fff00000c595c710 by task kunit_try_catch/259
[   18.815153] 
[   18.815211] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   18.816223] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.816406] Hardware name: linux,dummy-virt (DT)
[   18.816599] Call trace:
[   18.816883]  show_stack+0x20/0x38 (C)
[   18.816983]  dump_stack_lvl+0x8c/0xd0
[   18.817081]  print_report+0x118/0x5d0
[   18.817218]  kasan_report+0xdc/0x128
[   18.817290]  __asan_report_load1_noabort+0x20/0x30
[   18.817649]  strcmp+0xc0/0xc8
[   18.817791]  kasan_strings+0x340/0xb00
[   18.817886]  kunit_try_run_case+0x170/0x3f0
[   18.818029]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.818145]  kthread+0x328/0x630
[   18.818297]  ret_from_fork+0x10/0x20
[   18.818680] 
[   18.818741] Allocated by task 259:
[   18.818828]  kasan_save_stack+0x3c/0x68
[   18.818954]  kasan_save_track+0x20/0x40
[   18.819163]  kasan_save_alloc_info+0x40/0x58
[   18.819236]  __kasan_kmalloc+0xd4/0xd8
[   18.819323]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.819380]  kasan_strings+0xc8/0xb00
[   18.819423]  kunit_try_run_case+0x170/0x3f0
[   18.819624]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.819846]  kthread+0x328/0x630
[   18.819956]  ret_from_fork+0x10/0x20
[   18.820122] 
[   18.820172] Freed by task 259:
[   18.820291]  kasan_save_stack+0x3c/0x68
[   18.820347]  kasan_save_track+0x20/0x40
[   18.820441]  kasan_save_free_info+0x4c/0x78
[   18.820630]  __kasan_slab_free+0x6c/0x98
[   18.820790]  kfree+0x214/0x3c8
[   18.820833]  kasan_strings+0x24c/0xb00
[   18.821210]  kunit_try_run_case+0x170/0x3f0
[   18.821346]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.821510]  kthread+0x328/0x630
[   18.821599]  ret_from_fork+0x10/0x20
[   18.821751] 
[   18.821777] The buggy address belongs to the object at fff00000c595c700
[   18.821777]  which belongs to the cache kmalloc-32 of size 32
[   18.822425] The buggy address is located 16 bytes inside of
[   18.822425]  freed 32-byte region [fff00000c595c700, fff00000c595c720)
[   18.822581] 
[   18.822638] The buggy address belongs to the physical page:
[   18.822743] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10595c
[   18.822817] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.823159] page_type: f5(slab)
[   18.823315] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.823475] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.823572] page dumped because: kasan: bad access detected
[   18.823651] 
[   18.823805] Memory state around the buggy address:
[   18.823844]  fff00000c595c600: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.823897]  fff00000c595c680: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   18.823943] >fff00000c595c700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.824343]                          ^
[   18.824441]  fff00000c595c780: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.824594]  fff00000c595c800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.824693] ==================================================================

[   14.532681] ==================================================================
[   14.533728] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   14.534159] Read of size 1 at addr ffff888103a5c550 by task kunit_try_catch/276
[   14.534446] 
[   14.534561] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.534608] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.534620] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.534641] Call Trace:
[   14.534652]  <TASK>
[   14.534667]  dump_stack_lvl+0x73/0xb0
[   14.534698]  print_report+0xd1/0x610
[   14.534724]  ? __virt_addr_valid+0x1db/0x2d0
[   14.534749]  ? strcmp+0xb0/0xc0
[   14.534780]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.534806]  ? strcmp+0xb0/0xc0
[   14.534824]  kasan_report+0x141/0x180
[   14.534847]  ? strcmp+0xb0/0xc0
[   14.534870]  __asan_report_load1_noabort+0x18/0x20
[   14.534896]  strcmp+0xb0/0xc0
[   14.534916]  kasan_strings+0x431/0xe80
[   14.534936]  ? trace_hardirqs_on+0x37/0xe0
[   14.534962]  ? __pfx_kasan_strings+0x10/0x10
[   14.534984]  ? finish_task_switch.isra.0+0x153/0x700
[   14.535010]  ? __switch_to+0x47/0xf50
[   14.535036]  ? __schedule+0x10cc/0x2b60
[   14.535117]  ? __pfx_read_tsc+0x10/0x10
[   14.535141]  ? ktime_get_ts64+0x86/0x230
[   14.535166]  kunit_try_run_case+0x1a5/0x480
[   14.535201]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.535226]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.535252]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.535279]  ? __kthread_parkme+0x82/0x180
[   14.535300]  ? preempt_count_sub+0x50/0x80
[   14.535325]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.535354]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.535380]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.535408]  kthread+0x337/0x6f0
[   14.535427]  ? trace_preempt_on+0x20/0xc0
[   14.535460]  ? __pfx_kthread+0x10/0x10
[   14.535481]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.535505]  ? calculate_sigpending+0x7b/0xa0
[   14.535531]  ? __pfx_kthread+0x10/0x10
[   14.535553]  ret_from_fork+0x116/0x1d0
[   14.535573]  ? __pfx_kthread+0x10/0x10
[   14.535595]  ret_from_fork_asm+0x1a/0x30
[   14.535626]  </TASK>
[   14.535637] 
[   14.543601] Allocated by task 276:
[   14.543800]  kasan_save_stack+0x45/0x70
[   14.544009]  kasan_save_track+0x18/0x40
[   14.544211]  kasan_save_alloc_info+0x3b/0x50
[   14.544608]  __kasan_kmalloc+0xb7/0xc0
[   14.544828]  __kmalloc_cache_noprof+0x189/0x420
[   14.545150]  kasan_strings+0xc0/0xe80
[   14.545325]  kunit_try_run_case+0x1a5/0x480
[   14.545474]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.545730]  kthread+0x337/0x6f0
[   14.545923]  ret_from_fork+0x116/0x1d0
[   14.546165]  ret_from_fork_asm+0x1a/0x30
[   14.546315] 
[   14.546387] Freed by task 276:
[   14.546500]  kasan_save_stack+0x45/0x70
[   14.546638]  kasan_save_track+0x18/0x40
[   14.546845]  kasan_save_free_info+0x3f/0x60
[   14.547054]  __kasan_slab_free+0x56/0x70
[   14.547260]  kfree+0x222/0x3f0
[   14.547591]  kasan_strings+0x2aa/0xe80
[   14.547797]  kunit_try_run_case+0x1a5/0x480
[   14.547958]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.548370]  kthread+0x337/0x6f0
[   14.548527]  ret_from_fork+0x116/0x1d0
[   14.548665]  ret_from_fork_asm+0x1a/0x30
[   14.548840] 
[   14.548937] The buggy address belongs to the object at ffff888103a5c540
[   14.548937]  which belongs to the cache kmalloc-32 of size 32
[   14.549729] The buggy address is located 16 bytes inside of
[   14.549729]  freed 32-byte region [ffff888103a5c540, ffff888103a5c560)
[   14.550247] 
[   14.550355] The buggy address belongs to the physical page:
[   14.550597] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a5c
[   14.550945] flags: 0x200000000000000(node=0|zone=2)
[   14.551250] page_type: f5(slab)
[   14.551426] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.551672] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.551916] page dumped because: kasan: bad access detected
[   14.552154] 
[   14.552250] Memory state around the buggy address:
[   14.552483]  ffff888103a5c400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.552817]  ffff888103a5c480: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.553405] >ffff888103a5c500: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.553629]                                                  ^
[   14.553917]  ffff888103a5c580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.554373]  ffff888103a5c600: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.554668] ==================================================================