Hay
Date
June 17, 2025, 3:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   24.653089] ==================================================================
[   24.653244] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   24.653441] Read of size 1 at addr fff00000c73a8610 by task kunit_try_catch/261
[   24.653616] 
[   24.653713] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT 
[   24.654139] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.654256] Hardware name: linux,dummy-virt (DT)
[   24.654364] Call trace:
[   24.654601]  show_stack+0x20/0x38 (C)
[   24.654908]  dump_stack_lvl+0x8c/0xd0
[   24.655055]  print_report+0x118/0x608
[   24.655179]  kasan_report+0xdc/0x128
[   24.655292]  __asan_report_load1_noabort+0x20/0x30
[   24.655416]  strlen+0xa8/0xb0
[   24.655531]  kasan_strings+0x418/0xb00
[   24.655655]  kunit_try_run_case+0x170/0x3f0
[   24.655784]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.655916]  kthread+0x328/0x630
[   24.656081]  ret_from_fork+0x10/0x20
[   24.656231] 
[   24.656278] Allocated by task 261:
[   24.656354]  kasan_save_stack+0x3c/0x68
[   24.656748]  kasan_save_track+0x20/0x40
[   24.657048]  kasan_save_alloc_info+0x40/0x58
[   24.657227]  __kasan_kmalloc+0xd4/0xd8
[   24.657317]  __kmalloc_cache_noprof+0x16c/0x3c0
[   24.657417]  kasan_strings+0xc8/0xb00
[   24.657738]  kunit_try_run_case+0x170/0x3f0
[   24.657934]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.658202]  kthread+0x328/0x630
[   24.658723]  ret_from_fork+0x10/0x20
[   24.658845] 
[   24.658960] Freed by task 261:
[   24.659106]  kasan_save_stack+0x3c/0x68
[   24.659276]  kasan_save_track+0x20/0x40
[   24.659407]  kasan_save_free_info+0x4c/0x78
[   24.659865]  __kasan_slab_free+0x6c/0x98
[   24.659989]  kfree+0x214/0x3c8
[   24.660209]  kasan_strings+0x24c/0xb00
[   24.660588]  kunit_try_run_case+0x170/0x3f0
[   24.660863]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.661048]  kthread+0x328/0x630
[   24.661173]  ret_from_fork+0x10/0x20
[   24.661328] 
[   24.661392] The buggy address belongs to the object at fff00000c73a8600
[   24.661392]  which belongs to the cache kmalloc-32 of size 32
[   24.661583] The buggy address is located 16 bytes inside of
[   24.661583]  freed 32-byte region [fff00000c73a8600, fff00000c73a8620)
[   24.661750] 
[   24.661999] The buggy address belongs to the physical page:
[   24.662318] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1073a8
[   24.662527] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.662654] page_type: f5(slab)
[   24.662750] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   24.662878] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   24.662986] page dumped because: kasan: bad access detected
[   24.663065] 
[   24.663111] Memory state around the buggy address:
[   24.663241]  fff00000c73a8500: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.663409]  fff00000c73a8580: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.663516] >fff00000c73a8600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   24.663652]                          ^
[   24.663781]  fff00000c73a8680: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.663961]  fff00000c73a8700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   24.664101] ==================================================================

[   22.468507] ==================================================================
[   22.469160] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   22.470722] Read of size 1 at addr ffff888102ef0050 by task kunit_try_catch/279
[   22.471537] 
[   22.471823] CPU: 1 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT(voluntary) 
[   22.472019] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.472086] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.472148] Call Trace:
[   22.472200]  <TASK>
[   22.472250]  dump_stack_lvl+0x73/0xb0
[   22.472371]  print_report+0xd1/0x650
[   22.472453]  ? __virt_addr_valid+0x1db/0x2d0
[   22.472511]  ? strlen+0x8f/0xb0
[   22.472542]  ? kasan_complete_mode_report_info+0x64/0x200
[   22.472580]  ? strlen+0x8f/0xb0
[   22.472607]  kasan_report+0x141/0x180
[   22.472643]  ? strlen+0x8f/0xb0
[   22.472699]  __asan_report_load1_noabort+0x18/0x20
[   22.472737]  strlen+0x8f/0xb0
[   22.472778]  kasan_strings+0x57b/0xe80
[   22.472818]  ? trace_hardirqs_on+0x37/0xe0
[   22.472867]  ? __pfx_kasan_strings+0x10/0x10
[   22.472910]  ? finish_task_switch.isra.0+0x153/0x700
[   22.472953]  ? __switch_to+0x5d9/0xf60
[   22.472997]  ? dequeue_task_fair+0x166/0x4e0
[   22.473041]  ? __schedule+0x10cc/0x2b60
[   22.473587]  ? __pfx_read_tsc+0x10/0x10
[   22.473662]  ? ktime_get_ts64+0x86/0x230
[   22.473744]  kunit_try_run_case+0x1a5/0x480
[   22.473809]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.473848]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.473887]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.473924]  ? __kthread_parkme+0x82/0x180
[   22.474214]  ? preempt_count_sub+0x50/0x80
[   22.474267]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.474336]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.474375]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.474415]  kthread+0x337/0x6f0
[   22.474443]  ? trace_preempt_on+0x20/0xc0
[   22.474478]  ? __pfx_kthread+0x10/0x10
[   22.474507]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.474540]  ? calculate_sigpending+0x7b/0xa0
[   22.474575]  ? __pfx_kthread+0x10/0x10
[   22.474604]  ret_from_fork+0x41/0x80
[   22.474638]  ? __pfx_kthread+0x10/0x10
[   22.474668]  ret_from_fork_asm+0x1a/0x30
[   22.474714]  </TASK>
[   22.474732] 
[   22.494486] Allocated by task 279:
[   22.494915]  kasan_save_stack+0x45/0x70
[   22.495608]  kasan_save_track+0x18/0x40
[   22.496222]  kasan_save_alloc_info+0x3b/0x50
[   22.496710]  __kasan_kmalloc+0xb7/0xc0
[   22.497317]  __kmalloc_cache_noprof+0x189/0x420
[   22.497856]  kasan_strings+0xc0/0xe80
[   22.498672]  kunit_try_run_case+0x1a5/0x480
[   22.499277]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.499798]  kthread+0x337/0x6f0
[   22.500264]  ret_from_fork+0x41/0x80
[   22.500597]  ret_from_fork_asm+0x1a/0x30
[   22.501220] 
[   22.501512] Freed by task 279:
[   22.501932]  kasan_save_stack+0x45/0x70
[   22.503358]  kasan_save_track+0x18/0x40
[   22.503770]  kasan_save_free_info+0x3f/0x60
[   22.504493]  __kasan_slab_free+0x56/0x70
[   22.504900]  kfree+0x222/0x3f0
[   22.505472]  kasan_strings+0x2aa/0xe80
[   22.505876]  kunit_try_run_case+0x1a5/0x480
[   22.506865]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.507584]  kthread+0x337/0x6f0
[   22.508160]  ret_from_fork+0x41/0x80
[   22.508575]  ret_from_fork_asm+0x1a/0x30
[   22.509147] 
[   22.509434] The buggy address belongs to the object at ffff888102ef0040
[   22.509434]  which belongs to the cache kmalloc-32 of size 32
[   22.510630] The buggy address is located 16 bytes inside of
[   22.510630]  freed 32-byte region [ffff888102ef0040, ffff888102ef0060)
[   22.511841] 
[   22.512302] The buggy address belongs to the physical page:
[   22.512631] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ef0
[   22.513588] flags: 0x200000000000000(node=0|zone=2)
[   22.514429] page_type: f5(slab)
[   22.514838] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   22.515661] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   22.516342] page dumped because: kasan: bad access detected
[   22.516837] 
[   22.517307] Memory state around the buggy address:
[   22.517803]  ffff888102eeff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.518793]  ffff888102eeff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.519539] >ffff888102ef0000: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   22.520328]                                                  ^
[   22.520880]  ffff888102ef0080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   22.521440]  ffff888102ef0100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   22.521835] ==================================================================