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

Environment
qemu-arm64
qemu-x86_64

[   18.749032] ==================================================================
[   18.749100] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   18.749156] Read of size 1 at addr fff00000c66fec50 by task kunit_try_catch/259
[   18.749222] 
[   18.749257] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.749345] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.749375] Hardware name: linux,dummy-virt (DT)
[   18.749419] Call trace:
[   18.749445]  show_stack+0x20/0x38 (C)
[   18.749496]  dump_stack_lvl+0x8c/0xd0
[   18.749543]  print_report+0x118/0x5d0
[   18.749591]  kasan_report+0xdc/0x128
[   18.749638]  __asan_report_load1_noabort+0x20/0x30
[   18.749692]  strcmp+0xc0/0xc8
[   18.749734]  kasan_strings+0x340/0xb00
[   18.749780]  kunit_try_run_case+0x170/0x3f0
[   18.749835]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.749891]  kthread+0x328/0x630
[   18.749937]  ret_from_fork+0x10/0x20
[   18.749998] 
[   18.750020] Allocated by task 259:
[   18.750050]  kasan_save_stack+0x3c/0x68
[   18.750101]  kasan_save_track+0x20/0x40
[   18.750143]  kasan_save_alloc_info+0x40/0x58
[   18.750866]  __kasan_kmalloc+0xd4/0xd8
[   18.750924]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.750968]  kasan_strings+0xc8/0xb00
[   18.751006]  kunit_try_run_case+0x170/0x3f0
[   18.751116]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.751168]  kthread+0x328/0x630
[   18.751589]  ret_from_fork+0x10/0x20
[   18.751688] 
[   18.751823] Freed by task 259:
[   18.751913]  kasan_save_stack+0x3c/0x68
[   18.751981]  kasan_save_track+0x20/0x40
[   18.752187]  kasan_save_free_info+0x4c/0x78
[   18.752278]  __kasan_slab_free+0x6c/0x98
[   18.752360]  kfree+0x214/0x3c8
[   18.752499]  kasan_strings+0x24c/0xb00
[   18.752579]  kunit_try_run_case+0x170/0x3f0
[   18.752691]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.752819]  kthread+0x328/0x630
[   18.752935]  ret_from_fork+0x10/0x20
[   18.753081] 
[   18.753152] The buggy address belongs to the object at fff00000c66fec40
[   18.753152]  which belongs to the cache kmalloc-32 of size 32
[   18.753240] The buggy address is located 16 bytes inside of
[   18.753240]  freed 32-byte region [fff00000c66fec40, fff00000c66fec60)
[   18.753426] 
[   18.753674] The buggy address belongs to the physical page:
[   18.753848] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066fe
[   18.753958] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.754076] page_type: f5(slab)
[   18.754141] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.754381] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.754505] page dumped because: kasan: bad access detected
[   18.754581] 
[   18.754740] Memory state around the buggy address:
[   18.754828]  fff00000c66feb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.755040]  fff00000c66feb80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.755123] >fff00000c66fec00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   18.755269]                                                  ^
[   18.755312]  fff00000c66fec80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.755793]  fff00000c66fed00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   18.755919] ==================================================================

[   14.933954] ==================================================================
[   14.935029] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   14.935331] Read of size 1 at addr ffff888103a693d0 by task kunit_try_catch/276
[   14.935629] 
[   14.935735] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.935779] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.935790] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.935812] Call Trace:
[   14.935824]  <TASK>
[   14.935839]  dump_stack_lvl+0x73/0xb0
[   14.935866]  print_report+0xd1/0x610
[   14.935891]  ? __virt_addr_valid+0x1db/0x2d0
[   14.935914]  ? strcmp+0xb0/0xc0
[   14.935931]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.935955]  ? strcmp+0xb0/0xc0
[   14.935972]  kasan_report+0x141/0x180
[   14.935994]  ? strcmp+0xb0/0xc0
[   14.936015]  __asan_report_load1_noabort+0x18/0x20
[   14.936041]  strcmp+0xb0/0xc0
[   14.936060]  kasan_strings+0x431/0xe80
[   14.936079]  ? trace_hardirqs_on+0x37/0xe0
[   14.936103]  ? __pfx_kasan_strings+0x10/0x10
[   14.936124]  ? finish_task_switch.isra.0+0x153/0x700
[   14.936148]  ? __switch_to+0x47/0xf50
[   14.936173]  ? __schedule+0x10cc/0x2b60
[   14.936196]  ? __pfx_read_tsc+0x10/0x10
[   14.936217]  ? ktime_get_ts64+0x86/0x230
[   14.936241]  kunit_try_run_case+0x1a5/0x480
[   14.936277]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.936300]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.936325]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.936350]  ? __kthread_parkme+0x82/0x180
[   14.936370]  ? preempt_count_sub+0x50/0x80
[   14.936393]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.936418]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.936443]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.936469]  kthread+0x337/0x6f0
[   14.936488]  ? trace_preempt_on+0x20/0xc0
[   14.936511]  ? __pfx_kthread+0x10/0x10
[   14.936531]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.936552]  ? calculate_sigpending+0x7b/0xa0
[   14.936577]  ? __pfx_kthread+0x10/0x10
[   14.936598]  ret_from_fork+0x116/0x1d0
[   14.936616]  ? __pfx_kthread+0x10/0x10
[   14.936637]  ret_from_fork_asm+0x1a/0x30
[   14.936669]  </TASK>
[   14.936679] 
[   14.943477] Allocated by task 276:
[   14.943604]  kasan_save_stack+0x45/0x70
[   14.943775]  kasan_save_track+0x18/0x40
[   14.943968]  kasan_save_alloc_info+0x3b/0x50
[   14.944181]  __kasan_kmalloc+0xb7/0xc0
[   14.944379]  __kmalloc_cache_noprof+0x189/0x420
[   14.944615]  kasan_strings+0xc0/0xe80
[   14.944802]  kunit_try_run_case+0x1a5/0x480
[   14.945021]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.945289]  kthread+0x337/0x6f0
[   14.945458]  ret_from_fork+0x116/0x1d0
[   14.945622]  ret_from_fork_asm+0x1a/0x30
[   14.945798] 
[   14.945868] Freed by task 276:
[   14.945977]  kasan_save_stack+0x45/0x70
[   14.946112]  kasan_save_track+0x18/0x40
[   14.946246]  kasan_save_free_info+0x3f/0x60
[   14.946442]  __kasan_slab_free+0x56/0x70
[   14.946638]  kfree+0x222/0x3f0
[   14.946805]  kasan_strings+0x2aa/0xe80
[   14.946991]  kunit_try_run_case+0x1a5/0x480
[   14.947198]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.947454]  kthread+0x337/0x6f0
[   14.947575]  ret_from_fork+0x116/0x1d0
[   14.947708]  ret_from_fork_asm+0x1a/0x30
[   14.947847] 
[   14.947917] The buggy address belongs to the object at ffff888103a693c0
[   14.947917]  which belongs to the cache kmalloc-32 of size 32
[   14.948417] The buggy address is located 16 bytes inside of
[   14.948417]  freed 32-byte region [ffff888103a693c0, ffff888103a693e0)
[   14.948937] 
[   14.949036] The buggy address belongs to the physical page:
[   14.949295] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a69
[   14.949651] flags: 0x200000000000000(node=0|zone=2)
[   14.949839] page_type: f5(slab)
[   14.950003] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.950309] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.950612] page dumped because: kasan: bad access detected
[   14.950787] 
[   14.950854] Memory state around the buggy address:
[   14.952791]  ffff888103a69280: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.953025]  ffff888103a69300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.953244] >ffff888103a69380: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.953475]                                                  ^
[   14.953692]  ffff888103a69400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.954003]  ffff888103a69480: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.954341] ==================================================================