Hay
Date
April 22, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64
rk3399-rock-pi-4b

[   20.332177] ==================================================================
[   20.332293] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   20.332418] Read of size 1 at addr fff00000c42a8690 by task kunit_try_catch/261
[   20.332567] 
[   20.332651] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   20.332844] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.332947] Hardware name: linux,dummy-virt (DT)
[   20.333025] Call trace:
[   20.333088]  show_stack+0x20/0x38 (C)
[   20.333274]  dump_stack_lvl+0x8c/0xd0
[   20.333388]  print_report+0x118/0x608
[   20.334723]  kasan_report+0xdc/0x128
[   20.334963]  __asan_report_load1_noabort+0x20/0x30
[   20.335577]  strlen+0xa8/0xb0
[   20.335948]  kasan_strings+0x418/0xb00
[   20.337540]  kunit_try_run_case+0x170/0x3f0
[   20.337696]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.337829]  kthread+0x328/0x630
[   20.337937]  ret_from_fork+0x10/0x20
[   20.338052] 
[   20.338097] Allocated by task 261:
[   20.338155]  kasan_save_stack+0x3c/0x68
[   20.338245]  kasan_save_track+0x20/0x40
[   20.338325]  kasan_save_alloc_info+0x40/0x58
[   20.338426]  __kasan_kmalloc+0xd4/0xd8
[   20.338514]  __kmalloc_cache_noprof+0x15c/0x3c0
[   20.338634]  kasan_strings+0xc8/0xb00
[   20.338711]  kunit_try_run_case+0x170/0x3f0
[   20.338794]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.338996]  kthread+0x328/0x630
[   20.339216]  ret_from_fork+0x10/0x20
[   20.339376] 
[   20.339448] Freed by task 261:
[   20.339547]  kasan_save_stack+0x3c/0x68
[   20.339726]  kasan_save_track+0x20/0x40
[   20.339947]  kasan_save_free_info+0x4c/0x78
[   20.340166]  __kasan_slab_free+0x6c/0x98
[   20.340414]  kfree+0x214/0x3c8
[   20.341181]  kasan_strings+0x24c/0xb00
[   20.341285]  kunit_try_run_case+0x170/0x3f0
[   20.341380]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.341483]  kthread+0x328/0x630
[   20.341587]  ret_from_fork+0x10/0x20
[   20.341670] 
[   20.341721] The buggy address belongs to the object at fff00000c42a8680
[   20.341721]  which belongs to the cache kmalloc-32 of size 32
[   20.341789] The buggy address is located 16 bytes inside of
[   20.341789]  freed 32-byte region [fff00000c42a8680, fff00000c42a86a0)
[   20.341853] 
[   20.341877] The buggy address belongs to the physical page:
[   20.341912] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1042a8
[   20.341972] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.342025] page_type: f5(slab)
[   20.342069] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.342125] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.342172] page dumped because: kasan: bad access detected
[   20.342208] 
[   20.342230] Memory state around the buggy address:
[   20.342265]  fff00000c42a8580: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.342312]  fff00000c42a8600: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.342356] >fff00000c42a8680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.342397]                          ^
[   20.342431]  fff00000c42a8700: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.342475]  fff00000c42a8780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.342515] ==================================================================

[   21.213162] ==================================================================
[   21.214548] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   21.215052] Read of size 1 at addr ffff888103c72750 by task kunit_try_catch/279
[   21.215665] 
[   21.215943] CPU: 0 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   21.216075] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.216114] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   21.216172] Call Trace:
[   21.216219]  <TASK>
[   21.216272]  dump_stack_lvl+0x73/0xb0
[   21.216352]  print_report+0xd1/0x650
[   21.216473]  ? __virt_addr_valid+0x1db/0x2d0
[   21.216572]  ? strlen+0x8f/0xb0
[   21.216643]  ? kasan_complete_mode_report_info+0x64/0x200
[   21.216721]  ? strlen+0x8f/0xb0
[   21.216793]  kasan_report+0x141/0x180
[   21.216871]  ? strlen+0x8f/0xb0
[   21.216956]  __asan_report_load1_noabort+0x18/0x20
[   21.217030]  strlen+0x8f/0xb0
[   21.217108]  kasan_strings+0x57b/0xe80
[   21.217180]  ? trace_hardirqs_on+0x37/0xe0
[   21.217264]  ? __pfx_kasan_strings+0x10/0x10
[   21.217336]  ? finish_task_switch.isra.0+0x153/0x700
[   21.217455]  ? __switch_to+0x5d9/0xf60
[   21.217546]  ? dequeue_task_fair+0x156/0x4e0
[   21.217641]  ? __schedule+0x10cc/0x2b30
[   21.217724]  ? __pfx_read_tsc+0x10/0x10
[   21.217788]  ? ktime_get_ts64+0x86/0x230
[   21.217842]  kunit_try_run_case+0x1a5/0x480
[   21.217880]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.217914]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   21.217950]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   21.217985]  ? __kthread_parkme+0x82/0x180
[   21.218017]  ? preempt_count_sub+0x50/0x80
[   21.218051]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.218084]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.218115]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   21.218148]  kthread+0x337/0x6f0
[   21.218180]  ? trace_preempt_on+0x20/0xc0
[   21.218212]  ? __pfx_kthread+0x10/0x10
[   21.218245]  ? _raw_spin_unlock_irq+0x47/0x80
[   21.218277]  ? calculate_sigpending+0x7b/0xa0
[   21.218309]  ? __pfx_kthread+0x10/0x10
[   21.218343]  ret_from_fork+0x41/0x80
[   21.218374]  ? __pfx_kthread+0x10/0x10
[   21.218405]  ret_from_fork_asm+0x1a/0x30
[   21.218514]  </TASK>
[   21.218532] 
[   21.239341] Allocated by task 279:
[   21.240145]  kasan_save_stack+0x45/0x70
[   21.240751]  kasan_save_track+0x18/0x40
[   21.241289]  kasan_save_alloc_info+0x3b/0x50
[   21.241942]  __kasan_kmalloc+0xb7/0xc0
[   21.242270]  __kmalloc_cache_noprof+0x189/0x420
[   21.243099]  kasan_strings+0xc0/0xe80
[   21.243469]  kunit_try_run_case+0x1a5/0x480
[   21.243900]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.244611]  kthread+0x337/0x6f0
[   21.244998]  ret_from_fork+0x41/0x80
[   21.245621]  ret_from_fork_asm+0x1a/0x30
[   21.246043] 
[   21.246255] Freed by task 279:
[   21.247048]  kasan_save_stack+0x45/0x70
[   21.247374]  kasan_save_track+0x18/0x40
[   21.247814]  kasan_save_free_info+0x3f/0x60
[   21.248244]  __kasan_slab_free+0x56/0x70
[   21.248932]  kfree+0x222/0x3f0
[   21.249526]  kasan_strings+0x2aa/0xe80
[   21.249864]  kunit_try_run_case+0x1a5/0x480
[   21.250284]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.251641]  kthread+0x337/0x6f0
[   21.251923]  ret_from_fork+0x41/0x80
[   21.252204]  ret_from_fork_asm+0x1a/0x30
[   21.252508] 
[   21.252679] The buggy address belongs to the object at ffff888103c72740
[   21.252679]  which belongs to the cache kmalloc-32 of size 32
[   21.253714] The buggy address is located 16 bytes inside of
[   21.253714]  freed 32-byte region [ffff888103c72740, ffff888103c72760)
[   21.254294] 
[   21.254465] The buggy address belongs to the physical page:
[   21.256713] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103c72
[   21.257248] flags: 0x200000000000000(node=0|zone=2)
[   21.257882] page_type: f5(slab)
[   21.258296] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   21.258743] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   21.260785] page dumped because: kasan: bad access detected
[   21.261125] 
[   21.261276] Memory state around the buggy address:
[   21.261619]  ffff888103c72600: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc
[   21.262019]  ffff888103c72680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.263697] >ffff888103c72700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   21.265380]                                                  ^
[   21.266698]  ffff888103c72780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.267890]  ffff888103c72800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   21.268316] ==================================================================

[   21.871818] ==================================================================
[   21.872494] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   21.873053] Read of size 1 at addr ffff000010ac0b10 by task kunit_try_catch/317
[   21.873720] 
[   21.873876] CPU: 4 UID: 0 PID: 317 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   21.873914] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.873925] Hardware name: Radxa ROCK Pi 4B (DT)
[   21.873937] Call trace:
[   21.873946]  show_stack+0x20/0x38 (C)
[   21.873971]  dump_stack_lvl+0x8c/0xd0
[   21.873992]  print_report+0x118/0x608
[   21.874013]  kasan_report+0xdc/0x128
[   21.874032]  __asan_report_load1_noabort+0x20/0x30
[   21.874055]  strlen+0xa8/0xb0
[   21.874075]  kasan_strings+0x418/0xb00
[   21.874098]  kunit_try_run_case+0x170/0x3f0
[   21.874122]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.874149]  kthread+0x328/0x630
[   21.874174]  ret_from_fork+0x10/0x20
[   21.874196] 
[   21.879953] Allocated by task 317:
[   21.880271]  kasan_save_stack+0x3c/0x68
[   21.880633]  kasan_save_track+0x20/0x40
[   21.880994]  kasan_save_alloc_info+0x40/0x58
[   21.881393]  __kasan_kmalloc+0xd4/0xd8
[   21.881744]  __kmalloc_cache_noprof+0x15c/0x3c0
[   21.882171]  kasan_strings+0xc8/0xb00
[   21.882518]  kunit_try_run_case+0x170/0x3f0
[   21.882911]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.883420]  kthread+0x328/0x630
[   21.883731]  ret_from_fork+0x10/0x20
[   21.884068] 
[   21.884215] Freed by task 317:
[   21.884500]  kasan_save_stack+0x3c/0x68
[   21.884860]  kasan_save_track+0x20/0x40
[   21.885218]  kasan_save_free_info+0x4c/0x78
[   21.885608]  __kasan_slab_free+0x6c/0x98
[   21.885975]  kfree+0x214/0x3c8
[   21.886269]  kasan_strings+0x24c/0xb00
[   21.886623]  kunit_try_run_case+0x170/0x3f0
[   21.887015]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.887524]  kthread+0x328/0x630
[   21.887834]  ret_from_fork+0x10/0x20
[   21.888171] 
[   21.888318] The buggy address belongs to the object at ffff000010ac0b00
[   21.888318]  which belongs to the cache kmalloc-32 of size 32
[   21.889421] The buggy address is located 16 bytes inside of
[   21.889421]  freed 32-byte region [ffff000010ac0b00, ffff000010ac0b20)
[   21.890503] 
[   21.890650] The buggy address belongs to the physical page:
[   21.891155] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10ac0
[   21.891873] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   21.892470] page_type: f5(slab)
[   21.892771] raw: 03fffe0000000000 ffff000000402780 dead000000000122 0000000000000000
[   21.893473] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   21.894169] page dumped because: kasan: bad access detected
[   21.894674] 
[   21.894820] Memory state around the buggy address:
[   21.895258]  ffff000010ac0a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.895911]  ffff000010ac0a80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.896563] >ffff000010ac0b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.897214]                          ^
[   21.897560]  ffff000010ac0b80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   21.898213]  ffff000010ac0c00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.898862] ==================================================================