Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   21.611368] ==================================================================
[   21.611452] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   21.611576] Read of size 1 at addr fff00000c56a2110 by task kunit_try_catch/259
[   21.611718] 
[   21.611825] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   21.611948] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.612267] Hardware name: linux,dummy-virt (DT)
[   21.612466] Call trace:
[   21.612637]  show_stack+0x20/0x38 (C)
[   21.612724]  dump_stack_lvl+0x8c/0xd0
[   21.612909]  print_report+0x118/0x608
[   21.613182]  kasan_report+0xdc/0x128
[   21.613364]  __asan_report_load1_noabort+0x20/0x30
[   21.613506]  strcmp+0xc0/0xc8
[   21.613593]  kasan_strings+0x340/0xb00
[   21.613640]  kunit_try_run_case+0x170/0x3f0
[   21.613854]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.614065]  kthread+0x328/0x630
[   21.614144]  ret_from_fork+0x10/0x20
[   21.614313] 
[   21.614371] Allocated by task 259:
[   21.614497]  kasan_save_stack+0x3c/0x68
[   21.614574]  kasan_save_track+0x20/0x40
[   21.614782]  kasan_save_alloc_info+0x40/0x58
[   21.615145]  __kasan_kmalloc+0xd4/0xd8
[   21.615307]  __kmalloc_cache_noprof+0x16c/0x3c0
[   21.615416]  kasan_strings+0xc8/0xb00
[   21.615524]  kunit_try_run_case+0x170/0x3f0
[   21.615614]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.615665]  kthread+0x328/0x630
[   21.615700]  ret_from_fork+0x10/0x20
[   21.615748] 
[   21.615937] Freed by task 259:
[   21.616165]  kasan_save_stack+0x3c/0x68
[   21.616317]  kasan_save_track+0x20/0x40
[   21.616395]  kasan_save_free_info+0x4c/0x78
[   21.616547]  __kasan_slab_free+0x6c/0x98
[   21.616637]  kfree+0x214/0x3c8
[   21.616956]  kasan_strings+0x24c/0xb00
[   21.617163]  kunit_try_run_case+0x170/0x3f0
[   21.617326]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.617424]  kthread+0x328/0x630
[   21.617562]  ret_from_fork+0x10/0x20
[   21.617661] 
[   21.617724] The buggy address belongs to the object at fff00000c56a2100
[   21.617724]  which belongs to the cache kmalloc-32 of size 32
[   21.617953] The buggy address is located 16 bytes inside of
[   21.617953]  freed 32-byte region [fff00000c56a2100, fff00000c56a2120)
[   21.618113] 
[   21.618190] The buggy address belongs to the physical page:
[   21.618256] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1056a2
[   21.618446] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.618512] page_type: f5(slab)
[   21.618554] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   21.618608] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   21.618660] page dumped because: kasan: bad access detected
[   21.618693] 
[   21.618726] Memory state around the buggy address:
[   21.618779]  fff00000c56a2000: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   21.618826]  fff00000c56a2080: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   21.618871] >fff00000c56a2100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.618911]                          ^
[   21.618941]  fff00000c56a2180: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   21.618984]  fff00000c56a2200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.619034] ==================================================================

[   14.941906] ==================================================================
[   14.944192] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   14.944427] Read of size 1 at addr ffff888102b12e50 by task kunit_try_catch/276
[   14.945000] 
[   14.945242] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.945292] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.945305] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.945328] Call Trace:
[   14.945340]  <TASK>
[   14.945359]  dump_stack_lvl+0x73/0xb0
[   14.945387]  print_report+0xd1/0x650
[   14.945412]  ? __virt_addr_valid+0x1db/0x2d0
[   14.945436]  ? strcmp+0xb0/0xc0
[   14.945452]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.945477]  ? strcmp+0xb0/0xc0
[   14.945503]  kasan_report+0x141/0x180
[   14.945525]  ? strcmp+0xb0/0xc0
[   14.945547]  __asan_report_load1_noabort+0x18/0x20
[   14.945574]  strcmp+0xb0/0xc0
[   14.945592]  kasan_strings+0x431/0xe80
[   14.945612]  ? trace_hardirqs_on+0x37/0xe0
[   14.945635]  ? __pfx_kasan_strings+0x10/0x10
[   14.945655]  ? finish_task_switch.isra.0+0x153/0x700
[   14.945677]  ? __switch_to+0x47/0xf50
[   14.945704]  ? __schedule+0x10cc/0x2b60
[   14.945726]  ? __pfx_read_tsc+0x10/0x10
[   14.945746]  ? ktime_get_ts64+0x86/0x230
[   14.945771]  kunit_try_run_case+0x1a5/0x480
[   14.945795]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.945816]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.945840]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.945862]  ? __kthread_parkme+0x82/0x180
[   14.945882]  ? preempt_count_sub+0x50/0x80
[   14.945905]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.945928]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.945951]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.945973]  kthread+0x337/0x6f0
[   14.945992]  ? trace_preempt_on+0x20/0xc0
[   14.946013]  ? __pfx_kthread+0x10/0x10
[   14.946033]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.946063]  ? calculate_sigpending+0x7b/0xa0
[   14.946088]  ? __pfx_kthread+0x10/0x10
[   14.946108]  ret_from_fork+0x116/0x1d0
[   14.946126]  ? __pfx_kthread+0x10/0x10
[   14.946146]  ret_from_fork_asm+0x1a/0x30
[   14.946177]  </TASK>
[   14.946188] 
[   14.955344] Allocated by task 276:
[   14.955487]  kasan_save_stack+0x45/0x70
[   14.955697]  kasan_save_track+0x18/0x40
[   14.955882]  kasan_save_alloc_info+0x3b/0x50
[   14.956029]  __kasan_kmalloc+0xb7/0xc0
[   14.956311]  __kmalloc_cache_noprof+0x189/0x420
[   14.956550]  kasan_strings+0xc0/0xe80
[   14.956746]  kunit_try_run_case+0x1a5/0x480
[   14.956929]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.957278]  kthread+0x337/0x6f0
[   14.957435]  ret_from_fork+0x116/0x1d0
[   14.957576]  ret_from_fork_asm+0x1a/0x30
[   14.957714] 
[   14.957840] Freed by task 276:
[   14.957998]  kasan_save_stack+0x45/0x70
[   14.958201]  kasan_save_track+0x18/0x40
[   14.958390]  kasan_save_free_info+0x3f/0x60
[   14.958589]  __kasan_slab_free+0x56/0x70
[   14.958726]  kfree+0x222/0x3f0
[   14.958842]  kasan_strings+0x2aa/0xe80
[   14.959166]  kunit_try_run_case+0x1a5/0x480
[   14.959394]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.959672]  kthread+0x337/0x6f0
[   14.959841]  ret_from_fork+0x116/0x1d0
[   14.960005]  ret_from_fork_asm+0x1a/0x30
[   14.960232] 
[   14.960307] The buggy address belongs to the object at ffff888102b12e40
[   14.960307]  which belongs to the cache kmalloc-32 of size 32
[   14.960771] The buggy address is located 16 bytes inside of
[   14.960771]  freed 32-byte region [ffff888102b12e40, ffff888102b12e60)
[   14.961263] 
[   14.961456] The buggy address belongs to the physical page:
[   14.961759] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b12
[   14.962004] flags: 0x200000000000000(node=0|zone=2)
[   14.962186] page_type: f5(slab)
[   14.962310] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.962649] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000
[   14.962987] page dumped because: kasan: bad access detected
[   14.963526] 
[   14.963631] Memory state around the buggy address:
[   14.963797]  ffff888102b12d00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.964015]  ffff888102b12d80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.964583] >ffff888102b12e00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.965010]                                                  ^
[   14.965320]  ffff888102b12e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.965649]  ffff888102b12f00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.965865] ==================================================================