Hay
Date
June 23, 2025, 1:39 p.m.

Environment
qemu-arm64
qemu-x86_64

[   28.108023] ==================================================================
[   28.108295] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   28.108461] Read of size 1 at addr fff00000c7043110 by task kunit_try_catch/261
[   28.108718] 
[   28.108803] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT 
[   28.109331] Tainted: [B]=BAD_PAGE, [N]=TEST
[   28.109518] Hardware name: linux,dummy-virt (DT)
[   28.110051] Call trace:
[   28.110127]  show_stack+0x20/0x38 (C)
[   28.110265]  dump_stack_lvl+0x8c/0xd0
[   28.110411]  print_report+0x118/0x608
[   28.110535]  kasan_report+0xdc/0x128
[   28.110861]  __asan_report_load1_noabort+0x20/0x30
[   28.110996]  strcmp+0xc0/0xc8
[   28.111125]  kasan_strings+0x340/0xb00
[   28.111255]  kunit_try_run_case+0x170/0x3f0
[   28.111410]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.111545]  kthread+0x328/0x630
[   28.111685]  ret_from_fork+0x10/0x20
[   28.111820] 
[   28.111898] Allocated by task 261:
[   28.111999]  kasan_save_stack+0x3c/0x68
[   28.112137]  kasan_save_track+0x20/0x40
[   28.112401]  kasan_save_alloc_info+0x40/0x58
[   28.112510]  __kasan_kmalloc+0xd4/0xd8
[   28.112786]  __kmalloc_cache_noprof+0x16c/0x3c0
[   28.112905]  kasan_strings+0xc8/0xb00
[   28.113106]  kunit_try_run_case+0x170/0x3f0
[   28.113235]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.113646]  kthread+0x328/0x630
[   28.113944]  ret_from_fork+0x10/0x20
[   28.114185] 
[   28.114360] Freed by task 261:
[   28.114474]  kasan_save_stack+0x3c/0x68
[   28.114590]  kasan_save_track+0x20/0x40
[   28.114914]  kasan_save_free_info+0x4c/0x78
[   28.115203]  __kasan_slab_free+0x6c/0x98
[   28.115402]  kfree+0x214/0x3c8
[   28.115493]  kasan_strings+0x24c/0xb00
[   28.115607]  kunit_try_run_case+0x170/0x3f0
[   28.115727]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.115840]  kthread+0x328/0x630
[   28.115928]  ret_from_fork+0x10/0x20
[   28.116063] 
[   28.116117] The buggy address belongs to the object at fff00000c7043100
[   28.116117]  which belongs to the cache kmalloc-32 of size 32
[   28.116260] The buggy address is located 16 bytes inside of
[   28.116260]  freed 32-byte region [fff00000c7043100, fff00000c7043120)
[   28.116807] 
[   28.117084] The buggy address belongs to the physical page:
[   28.117256] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107043
[   28.117498] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   28.117740] page_type: f5(slab)
[   28.117887] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   28.118264] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   28.118641] page dumped because: kasan: bad access detected
[   28.118877] 
[   28.119043] Memory state around the buggy address:
[   28.119141]  fff00000c7043000: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   28.119310]  fff00000c7043080: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   28.119762] >fff00000c7043100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   28.120270]                          ^
[   28.120556]  fff00000c7043180: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   28.120804]  fff00000c7043200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   28.120950] ==================================================================

[   20.118589] ==================================================================
[   20.120461] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   20.121014] Read of size 1 at addr ffff88810a08ac10 by task kunit_try_catch/280
[   20.122098] 
[   20.122401] CPU: 1 UID: 0 PID: 280 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT(voluntary) 
[   20.122554] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.122595] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   20.122675] Call Trace:
[   20.122714]  <TASK>
[   20.122758]  dump_stack_lvl+0x73/0xb0
[   20.122857]  print_report+0xd1/0x650
[   20.122962]  ? __virt_addr_valid+0x1db/0x2d0
[   20.123034]  ? strcmp+0xb0/0xc0
[   20.123094]  ? kasan_complete_mode_report_info+0x64/0x200
[   20.123153]  ? strcmp+0xb0/0xc0
[   20.123181]  kasan_report+0x141/0x180
[   20.123235]  ? strcmp+0xb0/0xc0
[   20.123290]  __asan_report_load1_noabort+0x18/0x20
[   20.123326]  strcmp+0xb0/0xc0
[   20.123356]  kasan_strings+0x431/0xe80
[   20.123387]  ? trace_hardirqs_on+0x37/0xe0
[   20.123422]  ? __pfx_kasan_strings+0x10/0x10
[   20.123452]  ? finish_task_switch.isra.0+0x153/0x700
[   20.123484]  ? __switch_to+0x5d9/0xf60
[   20.123512]  ? dequeue_task_fair+0x166/0x4e0
[   20.123544]  ? __schedule+0x10cc/0x2b60
[   20.123576]  ? __pfx_read_tsc+0x10/0x10
[   20.123627]  ? ktime_get_ts64+0x86/0x230
[   20.123670]  kunit_try_run_case+0x1a5/0x480
[   20.123710]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.123746]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   20.123782]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   20.123815]  ? __kthread_parkme+0x82/0x180
[   20.123847]  ? preempt_count_sub+0x50/0x80
[   20.123883]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.123919]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.123953]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   20.123987]  kthread+0x337/0x6f0
[   20.124010]  ? trace_preempt_on+0x20/0xc0
[   20.124043]  ? __pfx_kthread+0x10/0x10
[   20.124067]  ? _raw_spin_unlock_irq+0x47/0x80
[   20.124098]  ? calculate_sigpending+0x7b/0xa0
[   20.124130]  ? __pfx_kthread+0x10/0x10
[   20.124154]  ret_from_fork+0x41/0x80
[   20.124185]  ? __pfx_kthread+0x10/0x10
[   20.124211]  ret_from_fork_asm+0x1a/0x30
[   20.124281]  </TASK>
[   20.124297] 
[   20.141136] Allocated by task 280:
[   20.141579]  kasan_save_stack+0x45/0x70
[   20.141995]  kasan_save_track+0x18/0x40
[   20.142481]  kasan_save_alloc_info+0x3b/0x50
[   20.142863]  __kasan_kmalloc+0xb7/0xc0
[   20.143338]  __kmalloc_cache_noprof+0x189/0x420
[   20.143835]  kasan_strings+0xc0/0xe80
[   20.144164]  kunit_try_run_case+0x1a5/0x480
[   20.144720]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.145334]  kthread+0x337/0x6f0
[   20.145769]  ret_from_fork+0x41/0x80
[   20.146106]  ret_from_fork_asm+0x1a/0x30
[   20.146647] 
[   20.146881] Freed by task 280:
[   20.147288]  kasan_save_stack+0x45/0x70
[   20.147758]  kasan_save_track+0x18/0x40
[   20.148101]  kasan_save_free_info+0x3f/0x60
[   20.148633]  __kasan_slab_free+0x56/0x70
[   20.149132]  kfree+0x222/0x3f0
[   20.149481]  kasan_strings+0x2aa/0xe80
[   20.149917]  kunit_try_run_case+0x1a5/0x480
[   20.150421]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.150896]  kthread+0x337/0x6f0
[   20.151306]  ret_from_fork+0x41/0x80
[   20.151749]  ret_from_fork_asm+0x1a/0x30
[   20.152131] 
[   20.152438] The buggy address belongs to the object at ffff88810a08ac00
[   20.152438]  which belongs to the cache kmalloc-32 of size 32
[   20.153379] The buggy address is located 16 bytes inside of
[   20.153379]  freed 32-byte region [ffff88810a08ac00, ffff88810a08ac20)
[   20.154384] 
[   20.154667] The buggy address belongs to the physical page:
[   20.155196] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a08a
[   20.155906] flags: 0x200000000000000(node=0|zone=2)
[   20.156450] page_type: f5(slab)
[   20.156882] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   20.157544] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.158259] page dumped because: kasan: bad access detected
[   20.158766] 
[   20.159007] Memory state around the buggy address:
[   20.159430]  ffff88810a08ab00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.160178]  ffff88810a08ab80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.161838] >ffff88810a08ac00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.162781]                          ^
[   20.163179]  ffff88810a08ac80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.163868]  ffff88810a08ad00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.164485] ==================================================================