Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   24.109226] ==================================================================
[   24.109996] BUG: KASAN: slab-use-after-free in kasan_strings+0x894/0x938
[   24.110698] Read of size 1 at addr fff00000c41f1950 by task kunit_try_catch/247
[   24.111463] 
[   24.112729] CPU: 1 UID: 0 PID: 247 Comm: kunit_try_catch Tainted: G    B            N 6.12.33-rc1 #1
[   24.112980] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.113067] Hardware name: linux,dummy-virt (DT)
[   24.113159] Call trace:
[   24.113236]  dump_backtrace+0x9c/0x128
[   24.113355]  show_stack+0x20/0x38
[   24.113464]  dump_stack_lvl+0x8c/0xd0
[   24.113528]  print_report+0x118/0x5f0
[   24.113577]  kasan_report+0xdc/0x128
[   24.113627]  __asan_report_load1_noabort+0x20/0x30
[   24.113680]  kasan_strings+0x894/0x938
[   24.113730]  kunit_try_run_case+0x170/0x3f0
[   24.113778]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.113835]  kthread+0x24c/0x2d0
[   24.113883]  ret_from_fork+0x10/0x20
[   24.113934] 
[   24.121141] Allocated by task 247:
[   24.121549]  kasan_save_stack+0x3c/0x68
[   24.122322]  kasan_save_track+0x20/0x40
[   24.123544]  kasan_save_alloc_info+0x40/0x58
[   24.124397]  __kasan_kmalloc+0xd4/0xd8
[   24.125018]  __kmalloc_cache_noprof+0x154/0x320
[   24.125572]  kasan_strings+0xb0/0x938
[   24.126171]  kunit_try_run_case+0x170/0x3f0
[   24.126744]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.127462]  kthread+0x24c/0x2d0
[   24.128342]  ret_from_fork+0x10/0x20
[   24.128752] 
[   24.128936] Freed by task 247:
[   24.129488]  kasan_save_stack+0x3c/0x68
[   24.130074]  kasan_save_track+0x20/0x40
[   24.130617]  kasan_save_free_info+0x4c/0x78
[   24.131133]  __kasan_slab_free+0x6c/0x98
[   24.131577]  kfree+0x110/0x3b8
[   24.132068]  kasan_strings+0x128/0x938
[   24.133215]  kunit_try_run_case+0x170/0x3f0
[   24.133860]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.134545]  kthread+0x24c/0x2d0
[   24.135111]  ret_from_fork+0x10/0x20
[   24.136079] 
[   24.136444] The buggy address belongs to the object at fff00000c41f1940
[   24.136444]  which belongs to the cache kmalloc-32 of size 32
[   24.137895] The buggy address is located 16 bytes inside of
[   24.137895]  freed 32-byte region [fff00000c41f1940, fff00000c41f1960)
[   24.139007] 
[   24.139325] The buggy address belongs to the physical page:
[   24.140488] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1041f1
[   24.141300] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.142338] page_type: f5(slab)
[   24.142742] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   24.143799] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   24.145154] page dumped because: kasan: bad access detected
[   24.145897] 
[   24.146372] Memory state around the buggy address:
[   24.147070]  fff00000c41f1800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.148070]  fff00000c41f1880: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.148807] >fff00000c41f1900: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   24.149516]                                                  ^
[   24.150229]  fff00000c41f1980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.151020]  fff00000c41f1a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.151867] ==================================================================

[   20.831137] ==================================================================
[   20.832096] BUG: KASAN: slab-use-after-free in kasan_strings+0xa0f/0xb60
[   20.832553] Read of size 1 at addr ffff888102af74d0 by task kunit_try_catch/264
[   20.833321] 
[   20.833942] CPU: 1 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G    B            N 6.12.33-rc1 #1
[   20.834166] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.834186] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   20.834238] Call Trace:
[   20.834291]  <TASK>
[   20.834344]  dump_stack_lvl+0x73/0xb0
[   20.834427]  print_report+0xd1/0x640
[   20.834614]  ? __virt_addr_valid+0x1db/0x2d0
[   20.834674]  ? kasan_strings+0xa0f/0xb60
[   20.834743]  ? kasan_complete_mode_report_info+0x64/0x200
[   20.834816]  ? kasan_strings+0xa0f/0xb60
[   20.834893]  kasan_report+0x140/0x180
[   20.834968]  ? kasan_strings+0xa0f/0xb60
[   20.835057]  __asan_report_load1_noabort+0x18/0x20
[   20.835131]  kasan_strings+0xa0f/0xb60
[   20.835208]  ? __pfx_kasan_strings+0x10/0x10
[   20.835355]  ? __schedule+0xc49/0x27a0
[   20.835425]  ? __pfx_read_tsc+0x10/0x10
[   20.835515]  ? ktime_get_ts64+0x84/0x230
[   20.835572]  kunit_try_run_case+0x1a6/0x480
[   20.835608]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.835638]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   20.835667]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   20.835704]  ? __kthread_parkme+0x82/0x160
[   20.835734]  ? preempt_count_sub+0x50/0x80
[   20.835766]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.835795]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   20.835852]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.835936]  kthread+0x257/0x310
[   20.835992]  ? __pfx_kthread+0x10/0x10
[   20.836046]  ret_from_fork+0x41/0x80
[   20.836105]  ? __pfx_kthread+0x10/0x10
[   20.836162]  ret_from_fork_asm+0x1a/0x30
[   20.836256]  </TASK>
[   20.836292] 
[   20.856291] Allocated by task 264:
[   20.856875]  kasan_save_stack+0x45/0x70
[   20.857279]  kasan_save_track+0x18/0x40
[   20.858130]  kasan_save_alloc_info+0x3b/0x50
[   20.858785]  __kasan_kmalloc+0xb7/0xc0
[   20.859828]  __kmalloc_cache_noprof+0x168/0x350
[   20.860258]  kasan_strings+0xb3/0xb60
[   20.861095]  kunit_try_run_case+0x1a6/0x480
[   20.861416]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.862325]  kthread+0x257/0x310
[   20.863033]  ret_from_fork+0x41/0x80
[   20.863574]  ret_from_fork_asm+0x1a/0x30
[   20.863975] 
[   20.864932] Freed by task 264:
[   20.865488]  kasan_save_stack+0x45/0x70
[   20.866191]  kasan_save_track+0x18/0x40
[   20.867097]  kasan_save_free_info+0x3f/0x60
[   20.867464]  __kasan_slab_free+0x56/0x70
[   20.868026]  kfree+0x123/0x3d0
[   20.868719]  kasan_strings+0x13a/0xb60
[   20.869708]  kunit_try_run_case+0x1a6/0x480
[   20.870525]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.871463]  kthread+0x257/0x310
[   20.872252]  ret_from_fork+0x41/0x80
[   20.872967]  ret_from_fork_asm+0x1a/0x30
[   20.873581] 
[   20.873920] The buggy address belongs to the object at ffff888102af74c0
[   20.873920]  which belongs to the cache kmalloc-32 of size 32
[   20.875712] The buggy address is located 16 bytes inside of
[   20.875712]  freed 32-byte region [ffff888102af74c0, ffff888102af74e0)
[   20.876581] 
[   20.876778] The buggy address belongs to the physical page:
[   20.878014] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102af7
[   20.878532] flags: 0x200000000000000(node=0|zone=2)
[   20.879293] page_type: f5(slab)
[   20.879936] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   20.881370] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   20.882291] page dumped because: kasan: bad access detected
[   20.882701] 
[   20.883193] Memory state around the buggy address:
[   20.883602]  ffff888102af7380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.884449]  ffff888102af7400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.885551] >ffff888102af7480: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.886249]                                                  ^
[   20.887045]  ffff888102af7500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.887812]  ffff888102af7580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.888307] ==================================================================