Hay
Date
July 8, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   33.512729] ==================================================================
[   33.512783] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   33.512834] Read of size 1 at addr fff00000c9a662d0 by task kunit_try_catch/290
[   33.512885] 
[   33.513845] CPU: 0 UID: 0 PID: 290 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250708 #1 PREEMPT 
[   33.514094] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.514257] Hardware name: linux,dummy-virt (DT)
[   33.514464] Call trace:
[   33.514524]  show_stack+0x20/0x38 (C)
[   33.514626]  dump_stack_lvl+0x8c/0xd0
[   33.514716]  print_report+0x118/0x5d0
[   33.515121]  kasan_report+0xdc/0x128
[   33.515262]  __asan_report_load1_noabort+0x20/0x30
[   33.515348]  strcmp+0xc0/0xc8
[   33.515503]  kasan_strings+0x340/0xb00
[   33.515567]  kunit_try_run_case+0x170/0x3f0
[   33.516034]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.516154]  kthread+0x328/0x630
[   33.516377]  ret_from_fork+0x10/0x20
[   33.516583] 
[   33.516612] Allocated by task 290:
[   33.516680]  kasan_save_stack+0x3c/0x68
[   33.516728]  kasan_save_track+0x20/0x40
[   33.517021]  kasan_save_alloc_info+0x40/0x58
[   33.517173]  __kasan_kmalloc+0xd4/0xd8
[   33.517263]  __kmalloc_cache_noprof+0x16c/0x3c0
[   33.517486]  kasan_strings+0xc8/0xb00
[   33.517667]  kunit_try_run_case+0x170/0x3f0
[   33.517804]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.517854]  kthread+0x328/0x630
[   33.517891]  ret_from_fork+0x10/0x20
[   33.518111] 
[   33.518178] Freed by task 290:
[   33.518353]  kasan_save_stack+0x3c/0x68
[   33.518446]  kasan_save_track+0x20/0x40
[   33.518709]  kasan_save_free_info+0x4c/0x78
[   33.518896]  __kasan_slab_free+0x6c/0x98
[   33.518977]  kfree+0x214/0x3c8
[   33.519061]  kasan_strings+0x24c/0xb00
[   33.519166]  kunit_try_run_case+0x170/0x3f0
[   33.519253]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.519472]  kthread+0x328/0x630
[   33.519661]  ret_from_fork+0x10/0x20
[   33.519773] 
[   33.519850] The buggy address belongs to the object at fff00000c9a662c0
[   33.519850]  which belongs to the cache kmalloc-32 of size 32
[   33.520150] The buggy address is located 16 bytes inside of
[   33.520150]  freed 32-byte region [fff00000c9a662c0, fff00000c9a662e0)
[   33.520335] 
[   33.520377] The buggy address belongs to the physical page:
[   33.520425] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a66
[   33.520566] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.520664] page_type: f5(slab)
[   33.521036] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   33.521107] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   33.521731] >fff00000c9a66280: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   33.524990] Hardware name: linux,dummy-virt (DT)
[   33.525824]  __kasan_kmalloc+0xd4/0xd8
[   33.527676]  kthread+0x328/0x630
[   33.528345] 
[   33.528880] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   33.529725]  fff00000c9a66300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   33.531523] Hardware name: linux,dummy-virt (DT)
[   33.534064]  kthread+0x328/0x630
[   33.534620]  kasan_save_track+0x20/0x40
[   33.536379] The buggy address is located 16 bytes inside of
[   33.536379]  freed 32-byte region [fff00000c9a662c0, fff00000c9a662e0)
[   33.538229] >fff00000c9a66280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   33.540252] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.541902]  __kasan_kmalloc+0xd4/0xd8
[   33.542316]  kasan_save_stack+0x3c/0x68
[   33.542839] The buggy address belongs to the object at fff00000c9a662c0
[   33.542839]  which belongs to the cache kmalloc-32 of size 32
[   33.554870] BUG: KASAN: slab-out-of-bounds in kasan_bitops_modify.constprop.0+0x100/0xbc0
[   33.556511]  kthread+0x328/0x630
[   33.557958]  kthread+0x328/0x630
[   33.558591] The buggy address belongs to the physical page:
[   33.559475]  fff00000c7981600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   33.562164] Call trace:
[   33.562870]  kasan_report+0xdc/0x128
[   33.563808] 
[   33.564106]  __kasan_kmalloc+0xd4/0xd8
[   33.564787]  ret_from_fork+0x10/0x20
[   33.565204] 
[   33.565847] page_type: f5(slab)
[   33.566906]                                                           ^
[   33.567440] ==================================================================

[   25.337015] ==================================================================
[   25.338986] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   25.339681] Read of size 1 at addr ffff88810627a650 by task kunit_try_catch/307
[   25.341008] 
[   25.341248] CPU: 1 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250708 #1 PREEMPT(voluntary) 
[   25.341310] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.341324] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.341349] Call Trace:
[   25.341363]  <TASK>
[   25.341385]  dump_stack_lvl+0x73/0xb0
[   25.341457]  print_report+0xd1/0x610
[   25.341486]  ? __virt_addr_valid+0x1db/0x2d0
[   25.341513]  ? strcmp+0xb0/0xc0
[   25.341535]  ? kasan_complete_mode_report_info+0x64/0x200
[   25.341566]  ? strcmp+0xb0/0xc0
[   25.341588]  kasan_report+0x141/0x180
[   25.341611]  ? strcmp+0xb0/0xc0
[   25.341637]  __asan_report_load1_noabort+0x18/0x20
[   25.341664]  strcmp+0xb0/0xc0
[   25.341689]  kasan_strings+0x431/0xe80
[   25.341712]  ? trace_hardirqs_on+0x37/0xe0
[   25.341739]  ? __pfx_kasan_strings+0x10/0x10
[   25.341819]  ? __kasan_check_write+0x18/0x20
[   25.341847]  ? queued_spin_lock_slowpath+0x116/0xb40
[   25.341869]  ? irqentry_exit+0x2a/0x60
[   25.341891]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   25.341915]  ? trace_hardirqs_on+0x37/0xe0
[   25.341939]  ? __pfx_read_tsc+0x10/0x10
[   25.341965]  ? ktime_get_ts64+0x86/0x230
[   25.341993]  kunit_try_run_case+0x1a5/0x480
[   25.342018]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.342040]  ? queued_spin_lock_slowpath+0x116/0xb40
[   25.342062]  ? __kthread_parkme+0x82/0x180
[   25.342084]  ? preempt_count_sub+0x50/0x80
[   25.342109]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.342131]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.342159]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.342186]  kthread+0x337/0x6f0
[   25.342207]  ? trace_preempt_on+0x20/0xc0
[   25.342232]  ? __pfx_kthread+0x10/0x10
[   25.342268]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.342295]  ? calculate_sigpending+0x7b/0xa0
[   25.342324]  ? __pfx_kthread+0x10/0x10
[   25.342348]  ret_from_fork+0x116/0x1d0
[   25.342369]  ? __pfx_kthread+0x10/0x10
[   25.342391]  ret_from_fork_asm+0x1a/0x30
[   25.342426]  </TASK>
[   25.342439] 
[   25.356088] Allocated by task 307:
[   25.356422]  kasan_save_stack+0x45/0x70
[   25.356582]  kasan_save_track+0x18/0x40
[   25.356713]  kasan_save_alloc_info+0x3b/0x50
[   25.357149]  __kasan_kmalloc+0xb7/0xc0
[   25.357561]  __kmalloc_cache_noprof+0x189/0x420
[   25.358050]  kasan_strings+0xc0/0xe80
[   25.358401]  kunit_try_run_case+0x1a5/0x480
[   25.358790]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.359286]  kthread+0x337/0x6f0
[   25.359413]  ret_from_fork+0x116/0x1d0
[   25.359541]  ret_from_fork_asm+0x1a/0x30
[   25.359679] 
[   25.359745] Freed by task 307:
[   25.360495]  kasan_save_stack+0x45/0x70
[   25.360878]  kasan_save_track+0x18/0x40
[   25.361351]  kasan_save_free_info+0x3f/0x60
[   25.361743]  __kasan_slab_free+0x56/0x70
[   25.362166]  kfree+0x222/0x3f0
[   25.362476]  kasan_strings+0x2aa/0xe80
[   25.362887]  kunit_try_run_case+0x1a5/0x480
[   25.363199]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.363387]  kthread+0x337/0x6f0
[   25.363507]  ret_from_fork+0x116/0x1d0
[   25.363636]  ret_from_fork_asm+0x1a/0x30
[   25.363779] 
[   25.363848] The buggy address belongs to the object at ffff88810627a640
[   25.363848]  which belongs to the cache kmalloc-32 of size 32
[   25.364482] The buggy address is located 16 bytes inside of
[   25.364482]  freed 32-byte region [ffff88810627a640, ffff88810627a660)
[   25.364909] 
[   25.365006] The buggy address belongs to the physical page:
[   25.365259] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10627a
[   25.365742] flags: 0x200000000000000(node=0|zone=2)
[   25.365964] page_type: f5(slab)
[   25.366136] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.366566] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.366984] page dumped because: kasan: bad access detected
[   25.367250] 
[   25.367341] Memory state around the buggy address:
[   25.367564]  ffff88810627a500: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   25.367824]  ffff88810627a580: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   25.368034] >ffff88810627a600: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.368362]                                                  ^
[   25.368622]  ffff88810627a680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.369064]  ffff88810627a700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.369388] ==================================================================