Hay
Date
July 8, 2025, 4:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.011088] ==================================================================
[   20.011279] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   20.011379] Read of size 1 at addr fff00000c6e54a50 by task kunit_try_catch/261
[   20.011485] 
[   20.011521] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   20.011612] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.011641] Hardware name: linux,dummy-virt (DT)
[   20.011675] Call trace:
[   20.011822]  show_stack+0x20/0x38 (C)
[   20.012048]  dump_stack_lvl+0x8c/0xd0
[   20.012235]  print_report+0x118/0x608
[   20.012328]  kasan_report+0xdc/0x128
[   20.012526]  __asan_report_load1_noabort+0x20/0x30
[   20.012582]  strcmp+0xc0/0xc8
[   20.012931]  kasan_strings+0x340/0xb00
[   20.013026]  kunit_try_run_case+0x170/0x3f0
[   20.013101]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.013344]  kthread+0x328/0x630
[   20.013586]  ret_from_fork+0x10/0x20
[   20.013769] 
[   20.013854] Allocated by task 261:
[   20.013942]  kasan_save_stack+0x3c/0x68
[   20.014363]  kasan_save_track+0x20/0x40
[   20.014457]  kasan_save_alloc_info+0x40/0x58
[   20.014600]  __kasan_kmalloc+0xd4/0xd8
[   20.014688]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.014811]  kasan_strings+0xc8/0xb00
[   20.014883]  kunit_try_run_case+0x170/0x3f0
[   20.014972]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.015161]  kthread+0x328/0x630
[   20.015387]  ret_from_fork+0x10/0x20
[   20.015540] 
[   20.015592] Freed by task 261:
[   20.015706]  kasan_save_stack+0x3c/0x68
[   20.015786]  kasan_save_track+0x20/0x40
[   20.016006]  kasan_save_free_info+0x4c/0x78
[   20.016222]  __kasan_slab_free+0x6c/0x98
[   20.016302]  kfree+0x214/0x3c8
[   20.016705]  kasan_strings+0x24c/0xb00
[   20.016793]  kunit_try_run_case+0x170/0x3f0
[   20.017172]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.017303]  kthread+0x328/0x630
[   20.017438]  ret_from_fork+0x10/0x20
[   20.017488] 
[   20.017510] The buggy address belongs to the object at fff00000c6e54a40
[   20.017510]  which belongs to the cache kmalloc-32 of size 32
[   20.017763] The buggy address is located 16 bytes inside of
[   20.017763]  freed 32-byte region [fff00000c6e54a40, fff00000c6e54a60)
[   20.017969] 
[   20.018068] The buggy address belongs to the physical page:
[   20.018284] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e54
[   20.018553] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.018845] page_type: f5(slab)
[   20.018900] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.019200] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.019514] page dumped because: kasan: bad access detected
[   20.020327]  fff00000c6e54b00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.022861]  print_report+0x118/0x608
[   20.024175]  kthread+0x328/0x630
[   20.025000]  __kasan_kmalloc+0xd4/0xd8
[   20.025803]  kthread+0x328/0x630
[   20.026474]  kasan_save_free_info+0x4c/0x78
[   20.026943] The buggy address is located 16 bytes inside of
[   20.026943]  freed 32-byte region [fff00000c6e54a40, fff00000c6e54a60)
[   20.027574] >fff00000c6e54a00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.029974] 
[   20.030011] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   20.031669]  kunit_try_run_case+0x170/0x3f0
[   20.032935]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.033657]  ret_from_fork+0x10/0x20
[   20.036100] 
[   20.036344] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e54
[   20.037877] >fff00000c6e54a00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.040147] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88
[   20.041816]  kasan_report+0xdc/0x128
[   20.043407] 
[   20.043789]  __kasan_kmalloc+0xd4/0xd8
[   20.044557]  kthread+0x328/0x630
[   20.044864] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e54
[   20.045168] 
[   20.045222]  fff00000c6e54900: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.045324] >fff00000c6e54a00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.053257]     not ok 62 kasan_strings
[   20.058355] ==================================================================

[   13.220144] ==================================================================
[   13.222631] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   13.223342] Read of size 1 at addr ffff88810360c050 by task kunit_try_catch/279
[   13.223926] 
[   13.224030] CPU: 0 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT(voluntary) 
[   13.224081] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.224094] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.224117] Call Trace:
[   13.224131]  <TASK>
[   13.224148]  dump_stack_lvl+0x73/0xb0
[   13.224177]  print_report+0xd1/0x650
[   13.224203]  ? __virt_addr_valid+0x1db/0x2d0
[   13.224228]  ? strcmp+0xb0/0xc0
[   13.224247]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.224271]  ? strcmp+0xb0/0xc0
[   13.224291]  kasan_report+0x141/0x180
[   13.224315]  ? strcmp+0xb0/0xc0
[   13.224338]  __asan_report_load1_noabort+0x18/0x20
[   13.224360]  strcmp+0xb0/0xc0
[   13.224382]  kasan_strings+0x431/0xe80
[   13.224403]  ? trace_hardirqs_on+0x37/0xe0
[   13.224428]  ? __pfx_kasan_strings+0x10/0x10
[   13.224450]  ? finish_task_switch.isra.0+0x153/0x700
[   13.224476]  ? __switch_to+0x5d9/0xf60
[   13.224497]  ? dequeue_task_fair+0x166/0x4e0
[   13.224522]  ? __schedule+0x10cc/0x2b60
[   13.224547]  ? __pfx_read_tsc+0x10/0x10
[   13.224567]  ? ktime_get_ts64+0x86/0x230
[   13.224594]  kunit_try_run_case+0x1a5/0x480
[   13.224616]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.224636]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.224661]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.224685]  ? __kthread_parkme+0x82/0x180
[   13.224721]  ? preempt_count_sub+0x50/0x80
[   13.224746]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.224767]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.224804]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.224828]  kthread+0x337/0x6f0
[   13.224846]  ? trace_preempt_on+0x20/0xc0
[   13.224868]  ? __pfx_kthread+0x10/0x10
[   13.224907]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.224930]  ? calculate_sigpending+0x7b/0xa0
[   13.224952]  ? __pfx_kthread+0x10/0x10
[   13.224971]  ret_from_fork+0x41/0x80
[   13.224993]  ? __pfx_kthread+0x10/0x10
[   13.225012]  ret_from_fork_asm+0x1a/0x30
[   13.225044]  </TASK>
[   13.225056] 
[   13.236049] Allocated by task 279:
[   13.236586]  kasan_save_stack+0x45/0x70
[   13.237144]  kasan_save_track+0x18/0x40
[   13.237302]  kasan_save_alloc_info+0x3b/0x50
[   13.237824]  __kasan_kmalloc+0xb7/0xc0
[   13.238051]  __kmalloc_cache_noprof+0x189/0x420
[   13.238635]  kasan_strings+0xc0/0xe80
[   13.238816]  kunit_try_run_case+0x1a5/0x480
[   13.239324]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.239730]  kthread+0x337/0x6f0
[   13.239908]  ret_from_fork+0x41/0x80
[   13.240274]  ret_from_fork_asm+0x1a/0x30
[   13.240635] 
[   13.240716] Freed by task 279:
[   13.241176]  kasan_save_stack+0x45/0x70
[   13.241352]  kasan_save_track+0x18/0x40
[   13.241676]  kasan_save_free_info+0x3f/0x60
[   13.241883]  __kasan_slab_free+0x56/0x70
[   13.242341]  kfree+0x222/0x3f0
[   13.242641]  kasan_strings+0x2aa/0xe80
[   13.243104]  kunit_try_run_case+0x1a5/0x480
[   13.243276]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.243855]  kthread+0x337/0x6f0
[   13.244231]  ret_from_fork+0x41/0x80
[   13.244431]  ret_from_fork_asm+0x1a/0x30
[   13.244751] 
[   13.244921] The buggy address belongs to the object at ffff88810360c040
[   13.244921]  which belongs to the cache kmalloc-32 of size 32
[   13.245612] The buggy address is located 16 bytes inside of
[   13.245612]  freed 32-byte region [ffff88810360c040, ffff88810360c060)
[   13.246499] 
[   13.246596] The buggy address belongs to the physical page:
[   13.247067] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10360c
[   13.247504] flags: 0x200000000000000(node=0|zone=2)
[   13.247758] page_type: f5(slab)
[   13.248147] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.248446] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.248796] page dumped because: kasan: bad access detected
[   13.249243] 
[   13.249349] Memory state around the buggy address:
[   13.249757]  ffff88810360bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.250251]  ffff88810360bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.250606] >ffff88810360c000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.251061]                                                  ^
[   13.251415]  ffff88810360c080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.251865]  ffff88810360c100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   13.252337] ==================================================================