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

Environment
qemu-arm64
qemu-x86_64

[   25.544842] ==================================================================
[   25.545269] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   25.545673] Read of size 1 at addr fff00000c772d090 by task kunit_try_catch/263
[   25.546016] 
[   25.546301] CPU: 1 UID: 0 PID: 263 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT 
[   25.546686] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.546813] Hardware name: linux,dummy-virt (DT)
[   25.546887] Call trace:
[   25.547175]  show_stack+0x20/0x38 (C)
[   25.547330]  dump_stack_lvl+0x8c/0xd0
[   25.547514]  print_report+0x118/0x608
[   25.547681]  kasan_report+0xdc/0x128
[   25.547834]  __asan_report_load1_noabort+0x20/0x30
[   25.548015]  strcmp+0xc0/0xc8
[   25.548223]  kasan_strings+0x340/0xb00
[   25.548664]  kunit_try_run_case+0x170/0x3f0
[   25.548871]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.549178]  kthread+0x328/0x630
[   25.549483]  ret_from_fork+0x10/0x20
[   25.549845] 
[   25.549897] Allocated by task 263:
[   25.550037]  kasan_save_stack+0x3c/0x68
[   25.550138]  kasan_save_track+0x20/0x40
[   25.550515]  kasan_save_alloc_info+0x40/0x58
[   25.550660]  __kasan_kmalloc+0xd4/0xd8
[   25.550749]  __kmalloc_cache_noprof+0x16c/0x3c0
[   25.550839]  kasan_strings+0xc8/0xb00
[   25.550924]  kunit_try_run_case+0x170/0x3f0
[   25.551488]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.551878]  kthread+0x328/0x630
[   25.552292]  ret_from_fork+0x10/0x20
[   25.552573] 
[   25.552649] Freed by task 263:
[   25.552789]  kasan_save_stack+0x3c/0x68
[   25.552892]  kasan_save_track+0x20/0x40
[   25.553082]  kasan_save_free_info+0x4c/0x78
[   25.553194]  __kasan_slab_free+0x6c/0x98
[   25.553325]  kfree+0x214/0x3c8
[   25.553443]  kasan_strings+0x24c/0xb00
[   25.553556]  kunit_try_run_case+0x170/0x3f0
[   25.553687]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.553801]  kthread+0x328/0x630
[   25.553886]  ret_from_fork+0x10/0x20
[   25.554020] 
[   25.554093] The buggy address belongs to the object at fff00000c772d080
[   25.554093]  which belongs to the cache kmalloc-32 of size 32
[   25.554310] The buggy address is located 16 bytes inside of
[   25.554310]  freed 32-byte region [fff00000c772d080, fff00000c772d0a0)
[   25.554528] 
[   25.554584] The buggy address belongs to the physical page:
[   25.554698] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10772d
[   25.554825] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   25.554933] page_type: f5(slab)
[   25.555049] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   25.555171] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.555272] page dumped because: kasan: bad access detected
[   25.555347] 
[   25.555387] Memory state around the buggy address:
[   25.555542]  fff00000c772cf80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   25.555726]  fff00000c772d000: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   25.555900] >fff00000c772d080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.556055]                          ^
[   25.556137]  fff00000c772d100: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   25.556314]  fff00000c772d180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.556475] ==================================================================

[   15.849503] ==================================================================
[   15.850229] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   15.850428] Read of size 1 at addr ffff8881039f3390 by task kunit_try_catch/279
[   15.851378] 
[   15.851653] CPU: 1 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT(voluntary) 
[   15.851822] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.851838] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.851861] Call Trace:
[   15.851878]  <TASK>
[   15.851900]  dump_stack_lvl+0x73/0xb0
[   15.851936]  print_report+0xd1/0x650
[   15.851963]  ? __virt_addr_valid+0x1db/0x2d0
[   15.851986]  ? strcmp+0xb0/0xc0
[   15.852004]  ? kasan_complete_mode_report_info+0x64/0x200
[   15.852027]  ? strcmp+0xb0/0xc0
[   15.852045]  kasan_report+0x141/0x180
[   15.852068]  ? strcmp+0xb0/0xc0
[   15.852090]  __asan_report_load1_noabort+0x18/0x20
[   15.852110]  strcmp+0xb0/0xc0
[   15.852129]  kasan_strings+0x431/0xe80
[   15.852150]  ? trace_hardirqs_on+0x37/0xe0
[   15.852172]  ? __pfx_kasan_strings+0x10/0x10
[   15.852192]  ? finish_task_switch.isra.0+0x153/0x700
[   15.852217]  ? __switch_to+0x5d9/0xf60
[   15.852238]  ? dequeue_task_fair+0x166/0x4e0
[   15.852262]  ? __schedule+0x10cc/0x2b30
[   15.852284]  ? __pfx_read_tsc+0x10/0x10
[   15.852304]  ? ktime_get_ts64+0x86/0x230
[   15.852329]  kunit_try_run_case+0x1a5/0x480
[   15.852353]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.852374]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.852396]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.852418]  ? __kthread_parkme+0x82/0x180
[   15.852439]  ? preempt_count_sub+0x50/0x80
[   15.852462]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.852483]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.852505]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.852527]  kthread+0x337/0x6f0
[   15.852543]  ? trace_preempt_on+0x20/0xc0
[   15.852583]  ? __pfx_kthread+0x10/0x10
[   15.852603]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.852623]  ? calculate_sigpending+0x7b/0xa0
[   15.852645]  ? __pfx_kthread+0x10/0x10
[   15.852663]  ret_from_fork+0x41/0x80
[   15.852684]  ? __pfx_kthread+0x10/0x10
[   15.852701]  ret_from_fork_asm+0x1a/0x30
[   15.852730]  </TASK>
[   15.852742] 
[   15.860411] Allocated by task 279:
[   15.860526]  kasan_save_stack+0x45/0x70
[   15.860649]  kasan_save_track+0x18/0x40
[   15.860741]  kasan_save_alloc_info+0x3b/0x50
[   15.860833]  __kasan_kmalloc+0xb7/0xc0
[   15.860917]  __kmalloc_cache_noprof+0x189/0x420
[   15.861015]  kasan_strings+0xc0/0xe80
[   15.861099]  kunit_try_run_case+0x1a5/0x480
[   15.861190]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.861294]  kthread+0x337/0x6f0
[   15.861370]  ret_from_fork+0x41/0x80
[   15.861453]  ret_from_fork_asm+0x1a/0x30
[   15.861540] 
[   15.861762] Freed by task 279:
[   15.861842]  kasan_save_stack+0x45/0x70
[   15.861934]  kasan_save_track+0x18/0x40
[   15.862020]  kasan_save_free_info+0x3f/0x60
[   15.862111]  __kasan_slab_free+0x56/0x70
[   15.863637]  kfree+0x222/0x3f0
[   15.865351]  kasan_strings+0x2aa/0xe80
[   15.865755]  kunit_try_run_case+0x1a5/0x480
[   15.866356]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.866690]  kthread+0x337/0x6f0
[   15.866996]  ret_from_fork+0x41/0x80
[   15.867357]  ret_from_fork_asm+0x1a/0x30
[   15.868005] 
[   15.869520] The buggy address belongs to the object at ffff8881039f3380
[   15.869520]  which belongs to the cache kmalloc-32 of size 32
[   15.870451] The buggy address is located 16 bytes inside of
[   15.870451]  freed 32-byte region [ffff8881039f3380, ffff8881039f33a0)
[   15.871098] 
[   15.871352] The buggy address belongs to the physical page:
[   15.871755] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039f3
[   15.871969] flags: 0x200000000000000(node=0|zone=2)
[   15.872384] page_type: f5(slab)
[   15.872509] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   15.872901] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   15.873581] page dumped because: kasan: bad access detected
[   15.873897] 
[   15.874125] Memory state around the buggy address:
[   15.874335]  ffff8881039f3280: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.874739]  ffff8881039f3300: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   15.875622] >ffff8881039f3380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   15.875833]                          ^
[   15.876098]  ffff8881039f3400: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.876387]  ffff8881039f3480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   15.877089] ==================================================================