Hay
Date
May 23, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   31.024458] ==================================================================
[   31.025147] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   31.025437] Read of size 1 at addr fff00000c77a2dd0 by task kunit_try_catch/261
[   31.025734] 
[   31.025850] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT 
[   31.026196] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.026312] Hardware name: linux,dummy-virt (DT)
[   31.026934] Call trace:
[   31.027135]  show_stack+0x20/0x38 (C)
[   31.027411]  dump_stack_lvl+0x8c/0xd0
[   31.027588]  print_report+0x118/0x608
[   31.027734]  kasan_report+0xdc/0x128
[   31.027874]  __asan_report_load1_noabort+0x20/0x30
[   31.028037]  kasan_strings+0x95c/0xb00
[   31.028788]  kunit_try_run_case+0x170/0x3f0
[   31.029344]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.029535]  kthread+0x328/0x630
[   31.029686]  ret_from_fork+0x10/0x20
[   31.029837] 
[   31.029900] Allocated by task 261:
[   31.029986]  kasan_save_stack+0x3c/0x68
[   31.030115]  kasan_save_track+0x20/0x40
[   31.030530]  kasan_save_alloc_info+0x40/0x58
[   31.031392]  __kasan_kmalloc+0xd4/0xd8
[   31.031659]  __kmalloc_cache_noprof+0x15c/0x3c0
[   31.031919]  kasan_strings+0xc8/0xb00
[   31.032532]  kunit_try_run_case+0x170/0x3f0
[   31.032819]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.033393]  kthread+0x328/0x630
[   31.033548]  ret_from_fork+0x10/0x20
[   31.033645] 
[   31.033697] Freed by task 261:
[   31.033774]  kasan_save_stack+0x3c/0x68
[   31.034538]  kasan_save_track+0x20/0x40
[   31.034700]  kasan_save_free_info+0x4c/0x78
[   31.034808]  __kasan_slab_free+0x6c/0x98
[   31.034991]  kfree+0x214/0x3c8
[   31.035151]  kasan_strings+0x24c/0xb00
[   31.035263]  kunit_try_run_case+0x170/0x3f0
[   31.035410]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.035571]  kthread+0x328/0x630
[   31.035682]  ret_from_fork+0x10/0x20
[   31.035802] 
[   31.035868] The buggy address belongs to the object at fff00000c77a2dc0
[   31.035868]  which belongs to the cache kmalloc-32 of size 32
[   31.036618] The buggy address is located 16 bytes inside of
[   31.036618]  freed 32-byte region [fff00000c77a2dc0, fff00000c77a2de0)
[   31.036852] 
[   31.037122] The buggy address belongs to the physical page:
[   31.037249] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077a2
[   31.037650] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.037803] page_type: f5(slab)
[   31.038236] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   31.038528] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000
[   31.038718] page dumped because: kasan: bad access detected
[   31.038832] 
[   31.039090] Memory state around the buggy address:
[   31.039225]  fff00000c77a2c80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   31.039369]  fff00000c77a2d00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   31.039982] >fff00000c77a2d80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   31.040672]                                                  ^
[   31.040797]  fff00000c77a2e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   31.040946]  fff00000c77a2e80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   31.041076] ==================================================================

[   14.534813] ==================================================================
[   14.535115] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   14.535376] Read of size 1 at addr ffff888102714790 by task kunit_try_catch/278
[   14.535654] 
[   14.535756] CPU: 0 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT(voluntary) 
[   14.535800] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.535813] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.535834] Call Trace:
[   14.535846]  <TASK>
[   14.535862]  dump_stack_lvl+0x73/0xb0
[   14.535889]  print_report+0xd1/0x650
[   14.535911]  ? __virt_addr_valid+0x1db/0x2d0
[   14.535933]  ? kasan_strings+0xcbc/0xe80
[   14.535953]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.535977]  ? kasan_strings+0xcbc/0xe80
[   14.535998]  kasan_report+0x141/0x180
[   14.536021]  ? kasan_strings+0xcbc/0xe80
[   14.536047]  __asan_report_load1_noabort+0x18/0x20
[   14.536068]  kasan_strings+0xcbc/0xe80
[   14.536088]  ? trace_hardirqs_on+0x37/0xe0
[   14.536111]  ? __pfx_kasan_strings+0x10/0x10
[   14.536132]  ? finish_task_switch.isra.0+0x153/0x700
[   14.536155]  ? __switch_to+0x5d9/0xf60
[   14.536176]  ? dequeue_task_fair+0x156/0x4e0
[   14.536200]  ? __schedule+0x10cc/0x2b30
[   14.536222]  ? __pfx_read_tsc+0x10/0x10
[   14.536241]  ? ktime_get_ts64+0x86/0x230
[   14.536267]  kunit_try_run_case+0x1a5/0x480
[   14.536290]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.536322]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.536345]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.536367]  ? __kthread_parkme+0x82/0x180
[   14.536389]  ? preempt_count_sub+0x50/0x80
[   14.536414]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.536437]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.536460]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.536482]  kthread+0x337/0x6f0
[   14.536499]  ? trace_preempt_on+0x20/0xc0
[   14.536521]  ? __pfx_kthread+0x10/0x10
[   14.536540]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.536560]  ? calculate_sigpending+0x7b/0xa0
[   14.536581]  ? __pfx_kthread+0x10/0x10
[   14.536599]  ret_from_fork+0x41/0x80
[   14.536619]  ? __pfx_kthread+0x10/0x10
[   14.536637]  ret_from_fork_asm+0x1a/0x30
[   14.536667]  </TASK>
[   14.536677] 
[   14.543744] Allocated by task 278:
[   14.543871]  kasan_save_stack+0x45/0x70
[   14.544018]  kasan_save_track+0x18/0x40
[   14.544213]  kasan_save_alloc_info+0x3b/0x50
[   14.544454]  __kasan_kmalloc+0xb7/0xc0
[   14.544653]  __kmalloc_cache_noprof+0x189/0x420
[   14.544868]  kasan_strings+0xc0/0xe80
[   14.545057]  kunit_try_run_case+0x1a5/0x480
[   14.545245]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.545473]  kthread+0x337/0x6f0
[   14.545646]  ret_from_fork+0x41/0x80
[   14.545817]  ret_from_fork_asm+0x1a/0x30
[   14.545976] 
[   14.546071] Freed by task 278:
[   14.546222]  kasan_save_stack+0x45/0x70
[   14.546401]  kasan_save_track+0x18/0x40
[   14.546583]  kasan_save_free_info+0x3f/0x60
[   14.546794]  __kasan_slab_free+0x56/0x70
[   14.546975]  kfree+0x222/0x3f0
[   14.547130]  kasan_strings+0x2aa/0xe80
[   14.547291]  kunit_try_run_case+0x1a5/0x480
[   14.547529]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.547736]  kthread+0x337/0x6f0
[   14.547856]  ret_from_fork+0x41/0x80
[   14.547987]  ret_from_fork_asm+0x1a/0x30
[   14.548125] 
[   14.548196] The buggy address belongs to the object at ffff888102714780
[   14.548196]  which belongs to the cache kmalloc-32 of size 32
[   14.548719] The buggy address is located 16 bytes inside of
[   14.548719]  freed 32-byte region [ffff888102714780, ffff8881027147a0)
[   14.549235] 
[   14.549339] The buggy address belongs to the physical page:
[   14.549616] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102714
[   14.549914] flags: 0x200000000000000(node=0|zone=2)
[   14.550082] page_type: f5(slab)
[   14.550207] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.550591] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.550941] page dumped because: kasan: bad access detected
[   14.551198] 
[   14.551293] Memory state around the buggy address:
[   14.551521]  ffff888102714680: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.551816]  ffff888102714700: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   14.552107] >ffff888102714780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.552394]                          ^
[   14.552596]  ffff888102714800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.552840]  ffff888102714880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.553056] ==================================================================