Hay
Date
July 18, 2025, 1:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   33.835055] ==================================================================
[   33.835615] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   33.835695] Read of size 1 at addr fff00000c907cb50 by task kunit_try_catch/290
[   33.836178] 
[   33.836246] CPU: 0 UID: 0 PID: 290 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   33.836349] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.836397] Hardware name: linux,dummy-virt (DT)
[   33.836583] Call trace:
[   33.836650]  show_stack+0x20/0x38 (C)
[   33.836708]  dump_stack_lvl+0x8c/0xd0
[   33.836758]  print_report+0x118/0x5e8
[   33.836804]  kasan_report+0xdc/0x128
[   33.836848]  __asan_report_load1_noabort+0x20/0x30
[   33.837396]  strcmp+0xc0/0xc8
[   33.837487]  kasan_strings+0x340/0xb00
[   33.837571]  kunit_try_run_case+0x170/0x3f0
[   33.837746]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.837841]  kthread+0x328/0x630
[   33.837886]  ret_from_fork+0x10/0x20
[   33.838265] 
[   33.838330] Allocated by task 290:
[   33.838421]  kasan_save_stack+0x3c/0x68
[   33.838566]  kasan_save_track+0x20/0x40
[   33.838651]  kasan_save_alloc_info+0x40/0x58
[   33.838718]  __kasan_kmalloc+0xd4/0xd8
[   33.838870]  __kmalloc_cache_noprof+0x16c/0x3c0
[   33.838925]  kasan_strings+0xc8/0xb00
[   33.839286]  kunit_try_run_case+0x170/0x3f0
[   33.839373]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.839490]  kthread+0x328/0x630
[   33.839600]  ret_from_fork+0x10/0x20
[   33.839736] 
[   33.839779] Freed by task 290:
[   33.839808]  kasan_save_stack+0x3c/0x68
[   33.839860]  kasan_save_track+0x20/0x40
[   33.839904]  kasan_save_free_info+0x4c/0x78
[   33.839944]  __kasan_slab_free+0x6c/0x98
[   33.840303]  kfree+0x214/0x3c8
[   33.840412]  kasan_strings+0x24c/0xb00
[   33.840480]  kunit_try_run_case+0x170/0x3f0
[   33.840825]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.840989]  kthread+0x328/0x630
[   33.841066]  ret_from_fork+0x10/0x20
[   33.841225] 
[   33.841278] The buggy address belongs to the object at fff00000c907cb40
[   33.841278]  which belongs to the cache kmalloc-32 of size 32
[   33.841670] The buggy address is located 16 bytes inside of
[   33.841670]  freed 32-byte region [fff00000c907cb40, fff00000c907cb60)
[   33.841854] 
[   33.841913] The buggy address belongs to the physical page:
[   33.841997] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10907c
[   33.842112] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.842201] page_type: f5(slab)
[   33.842346] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   33.842398] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   33.842689] page dumped because: kasan: bad access detected
[   33.842807] 
[   33.842881] Memory state around the buggy address:
[   33.842958]  fff00000c907ca00: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   33.843110]  fff00000c907ca80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   33.843167] >fff00000c907cb00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   33.843253]                                                  ^
[   33.843508]  fff00000c907cb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   33.843560]  fff00000c907cc00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   33.843784] ==================================================================


[   26.773667] ==================================================================
[   26.774633] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   26.774943] Read of size 1 at addr ffff8881053c84d0 by task kunit_try_catch/307
[   26.775324] 
[   26.775501] CPU: 0 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   26.775557] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.775570] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.775594] Call Trace:
[   26.775607]  <TASK>
[   26.775627]  dump_stack_lvl+0x73/0xb0
[   26.775660]  print_report+0xd1/0x640
[   26.775687]  ? __virt_addr_valid+0x1db/0x2d0
[   26.775714]  ? strcmp+0xb0/0xc0
[   26.775732]  ? kasan_complete_mode_report_info+0x64/0x200
[   26.775758]  ? strcmp+0xb0/0xc0
[   26.775776]  kasan_report+0x141/0x180
[   26.775798]  ? strcmp+0xb0/0xc0
[   26.775832]  __asan_report_load1_noabort+0x18/0x20
[   26.775855]  strcmp+0xb0/0xc0
[   26.775875]  kasan_strings+0x431/0xe80
[   26.775895]  ? trace_hardirqs_on+0x37/0xe0
[   26.775921]  ? __pfx_kasan_strings+0x10/0x10
[   26.775941]  ? finish_task_switch.isra.0+0x153/0x700
[   26.775963]  ? __switch_to+0x47/0xf80
[   26.775991]  ? __schedule+0x10da/0x2b60
[   26.776013]  ? __pfx_read_tsc+0x10/0x10
[   26.776035]  ? ktime_get_ts64+0x86/0x230
[   26.776060]  kunit_try_run_case+0x1a5/0x480
[   26.776087]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.776109]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.776142]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.776175]  ? __kthread_parkme+0x82/0x180
[   26.776194]  ? preempt_count_sub+0x50/0x80
[   26.776218]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.776241]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.776263]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.776299]  kthread+0x337/0x6f0
[   26.776319]  ? trace_preempt_on+0x20/0xc0
[   26.776340]  ? __pfx_kthread+0x10/0x10
[   26.776360]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.776389]  ? calculate_sigpending+0x7b/0xa0
[   26.776413]  ? __pfx_kthread+0x10/0x10
[   26.776433]  ret_from_fork+0x116/0x1d0
[   26.776452]  ? __pfx_kthread+0x10/0x10
[   26.776471]  ret_from_fork_asm+0x1a/0x30
[   26.776502]  </TASK>
[   26.776513] 
[   26.784025] Allocated by task 307:
[   26.784156]  kasan_save_stack+0x45/0x70
[   26.784308]  kasan_save_track+0x18/0x40
[   26.784471]  kasan_save_alloc_info+0x3b/0x50
[   26.784673]  __kasan_kmalloc+0xb7/0xc0
[   26.784850]  __kmalloc_cache_noprof+0x189/0x420
[   26.785063]  kasan_strings+0xc0/0xe80
[   26.785241]  kunit_try_run_case+0x1a5/0x480
[   26.785512]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.785851]  kthread+0x337/0x6f0
[   26.785979]  ret_from_fork+0x116/0x1d0
[   26.786209]  ret_from_fork_asm+0x1a/0x30
[   26.786424] 
[   26.786503] Freed by task 307:
[   26.786626]  kasan_save_stack+0x45/0x70
[   26.786787]  kasan_save_track+0x18/0x40
[   26.787000]  kasan_save_free_info+0x3f/0x60
[   26.787168]  __kasan_slab_free+0x56/0x70
[   26.787333]  kfree+0x222/0x3f0
[   26.787490]  kasan_strings+0x2aa/0xe80
[   26.787677]  kunit_try_run_case+0x1a5/0x480
[   26.787899]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.788102]  kthread+0x337/0x6f0
[   26.788280]  ret_from_fork+0x116/0x1d0
[   26.788411]  ret_from_fork_asm+0x1a/0x30
[   26.788602] 
[   26.788689] The buggy address belongs to the object at ffff8881053c84c0
[   26.788689]  which belongs to the cache kmalloc-32 of size 32
[   26.789165] The buggy address is located 16 bytes inside of
[   26.789165]  freed 32-byte region [ffff8881053c84c0, ffff8881053c84e0)
[   26.789637] 
[   26.789718] The buggy address belongs to the physical page:
[   26.789951] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053c8
[   26.790590] flags: 0x200000000000000(node=0|zone=2)
[   26.790897] page_type: f5(slab)
[   26.791028] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   26.791309] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   26.791638] page dumped because: kasan: bad access detected
[   26.791980] 
[   26.792050] Memory state around the buggy address:
[   26.792202]  ffff8881053c8380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   26.792513]  ffff8881053c8400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   26.792820] >ffff8881053c8480: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   26.793081]                                                  ^
[   26.793295]  ffff8881053c8500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   26.793609]  ffff8881053c8580: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   26.793892] ==================================================================