Hay
Date
April 20, 2025, 11:09 p.m.

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

[   26.389160] ==================================================================
[   26.389357] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   26.389503] Read of size 1 at addr fff00000c761ac10 by task kunit_try_catch/261
[   26.389824] 
[   26.389951] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   26.390257] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.390322] Hardware name: linux,dummy-virt (DT)
[   26.390393] Call trace:
[   26.390449]  show_stack+0x20/0x38 (C)
[   26.390574]  dump_stack_lvl+0x8c/0xd0
[   26.390690]  print_report+0x118/0x608
[   26.390968]  kasan_report+0xdc/0x128
[   26.391098]  __asan_report_load1_noabort+0x20/0x30
[   26.391483]  strcmp+0xc0/0xc8
[   26.391892]  kasan_strings+0x340/0xb00
[   26.392485]  kunit_try_run_case+0x170/0x3f0
[   26.392762]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.393208]  kthread+0x328/0x630
[   26.393433]  ret_from_fork+0x10/0x20
[   26.393767] 
[   26.393820] Allocated by task 261:
[   26.393891]  kasan_save_stack+0x3c/0x68
[   26.394017]  kasan_save_track+0x20/0x40
[   26.396270]  kasan_save_stack+0x3c/0x68
[   26.397893]  kunit_try_run_case+0x170/0x3f0
[   26.398656] 
[   26.401565] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   26.402976] 
[   26.403987]  fff00000c761ab80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   26.410093] 
[   26.410632] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.413673]  kunit_try_run_case+0x170/0x3f0
[   26.417093] Allocated by task 261:
[   26.418989]  __kasan_kmalloc+0xd4/0xd8
[   26.419570]  kasan_strings+0xc8/0xb00
[   26.421347]  kfree+0x214/0x3c8
[   26.423004] 
[   26.423166] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10761a
[   26.424185] page dumped because: kasan: bad access detected
[   26.424272] 
[   26.424804]  fff00000c761ab80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   26.424921] >fff00000c761ac00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   26.425704] ==================================================================

[   13.414230] ==================================================================
[   13.415298] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   13.415707] Read of size 1 at addr ffff888102757490 by task kunit_try_catch/279
[   13.416014] 
[   13.416126] CPU: 0 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   13.416198] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.416211] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.416232] Call Trace:
[   13.416244]  <TASK>
[   13.416259]  dump_stack_lvl+0x73/0xb0
[   13.416285]  print_report+0xd1/0x650
[   13.416309]  ? __virt_addr_valid+0x1db/0x2d0
[   13.416360]  ? strcmp+0xb0/0xc0
[   13.416379]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.416449]  ? strcmp+0xb0/0xc0
[   13.416467]  kasan_report+0x141/0x180
[   13.416490]  ? strcmp+0xb0/0xc0
[   13.416513]  __asan_report_load1_noabort+0x18/0x20
[   13.416533]  strcmp+0xb0/0xc0
[   13.416552]  kasan_strings+0x431/0xe80
[   13.416572]  ? trace_hardirqs_on+0x37/0xe0
[   13.416595]  ? __pfx_kasan_strings+0x10/0x10
[   13.416615]  ? finish_task_switch.isra.0+0x153/0x700
[   13.416661]  ? __switch_to+0x5d9/0xf60
[   13.416681]  ? dequeue_task_fair+0x156/0x4e0
[   13.416705]  ? __schedule+0x10cc/0x2b30
[   13.416742]  ? __pfx_read_tsc+0x10/0x10
[   13.416761]  ? ktime_get_ts64+0x86/0x230
[   13.416786]  kunit_try_run_case+0x1a5/0x480
[   13.416809]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.416830]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.416853]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.416876]  ? __kthread_parkme+0x82/0x180
[   13.416897]  ? preempt_count_sub+0x50/0x80
[   13.416920]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.416943]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.416965]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.416987]  kthread+0x337/0x6f0
[   13.417007]  ? trace_preempt_on+0x20/0xc0
[   13.417029]  ? __pfx_kthread+0x10/0x10
[   13.417051]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.417072]  ? calculate_sigpending+0x7b/0xa0
[   13.417093]  ? __pfx_kthread+0x10/0x10
[   13.417115]  ret_from_fork+0x41/0x80
[   13.417145]  ? __pfx_kthread+0x10/0x10
[   13.417167]  ret_from_fork_asm+0x1a/0x30
[   13.417198]  </TASK>
[   13.417208] 
[   13.426236] Allocated by task 279:
[   13.426382]  kasan_save_stack+0x45/0x70
[   13.426524]  kasan_save_track+0x18/0x40
[   13.426655]  kasan_save_alloc_info+0x3b/0x50
[   13.427037]  __kasan_kmalloc+0xb7/0xc0
[   13.427189]  __kmalloc_cache_noprof+0x189/0x420
[   13.427429]  kasan_strings+0xc0/0xe80
[   13.427700]  kunit_try_run_case+0x1a5/0x480
[   13.427938]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.428317]  kthread+0x337/0x6f0
[   13.428670]  ret_from_fork+0x41/0x80
[   13.428843]  ret_from_fork_asm+0x1a/0x30
[   13.429052] 
[   13.429160] Freed by task 279:
[   13.429313]  kasan_save_stack+0x45/0x70
[   13.429626]  kasan_save_track+0x18/0x40
[   13.429772]  kasan_save_free_info+0x3f/0x60
[   13.429914]  __kasan_slab_free+0x56/0x70
[   13.430051]  kfree+0x222/0x3f0
[   13.430351]  kasan_strings+0x2aa/0xe80
[   13.430733]  kunit_try_run_case+0x1a5/0x480
[   13.430967]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.431441]  kthread+0x337/0x6f0
[   13.431678]  ret_from_fork+0x41/0x80
[   13.431871]  ret_from_fork_asm+0x1a/0x30
[   13.432080] 
[   13.432213] The buggy address belongs to the object at ffff888102757480
[   13.432213]  which belongs to the cache kmalloc-32 of size 32
[   13.432744] The buggy address is located 16 bytes inside of
[   13.432744]  freed 32-byte region [ffff888102757480, ffff8881027574a0)
[   13.433130] 
[   13.433225] The buggy address belongs to the physical page:
[   13.433702] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102757
[   13.434108] flags: 0x200000000000000(node=0|zone=2)
[   13.434372] page_type: f5(slab)
[   13.434601] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.435053] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.435521] page dumped because: kasan: bad access detected
[   13.435770] 
[   13.435858] Memory state around the buggy address:
[   13.436014]  ffff888102757380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.436576]  ffff888102757400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.436847] >ffff888102757480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.437168]                          ^
[   13.437387]  ffff888102757500: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.437720]  ffff888102757580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.438038] ==================================================================

[   23.481062] ==================================================================
[   23.483184] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   23.483756] Read of size 1 at addr ffff0000101e8f90 by task kunit_try_catch/313
[   23.484433] 
[   23.484599] CPU: 0 UID: 0 PID: 313 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   23.484650] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.484666] Hardware name: Radxa ROCK Pi 4B (DT)
[   23.484684] Call trace:
[   23.484696]  show_stack+0x20/0x38 (C)
[   23.484731]  dump_stack_lvl+0x8c/0xd0
[   23.484762]  print_report+0x118/0x608
[   23.484795]  kasan_report+0xdc/0x128
[   23.484824]  __asan_report_load1_noabort+0x20/0x30
[   23.484861]  strcmp+0xc0/0xc8
[   23.484891]  kasan_strings+0x340/0xb00
[   23.484925]  kunit_try_run_case+0x170/0x3f0
[   23.484962]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.485003]  kthread+0x328/0x630
[   23.485038]  ret_from_fork+0x10/0x20
[   23.485073] 
[   23.490886] Allocated by task 313:
[   23.491214]  kasan_save_stack+0x3c/0x68
[   23.491591]  kasan_save_track+0x20/0x40
[   23.491964]  kasan_save_alloc_info+0x40/0x58
[   23.492379]  __kasan_kmalloc+0xd4/0xd8
[   23.492744]  __kmalloc_cache_noprof+0x15c/0x3c0
[   23.493187]  kasan_strings+0xc8/0xb00
[   23.493551]  kunit_try_run_case+0x170/0x3f0
[   23.493960]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.494486]  kthread+0x328/0x630
[   23.494812]  ret_from_fork+0x10/0x20
[   23.495163] 
[   23.495317] Freed by task 313:
[   23.495613]  kasan_save_stack+0x3c/0x68
[   23.495987]  kasan_save_track+0x20/0x40
[   23.496360]  kasan_save_free_info+0x4c/0x78
[   23.496766]  __kasan_slab_free+0x6c/0x98
[   23.497146]  kfree+0x214/0x3c8
[   23.497455]  kasan_strings+0x24c/0xb00
[   23.497825]  kunit_try_run_case+0x170/0x3f0
[   23.498233]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.498761]  kthread+0x328/0x630
[   23.499086]  ret_from_fork+0x10/0x20
[   23.499438] 
[   23.499592] The buggy address belongs to the object at ffff0000101e8f80
[   23.499592]  which belongs to the cache kmalloc-32 of size 32
[   23.500711] The buggy address is located 16 bytes inside of
[   23.500711]  freed 32-byte region [ffff0000101e8f80, ffff0000101e8fa0)
[   23.501810] 
[   23.501966] The buggy address belongs to the physical page:
[   23.502484] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101e8
[   23.503217] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   23.503831] page_type: f5(slab)
[   23.504148] raw: 03fffe0000000000 ffff000000402780 dead000000000122 0000000000000000
[   23.504864] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000
[   23.505573] page dumped because: kasan: bad access detected
[   23.506089] 
[   23.506242] Memory state around the buggy address:
[   23.506693]  ffff0000101e8e80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   23.507360]  ffff0000101e8f00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   23.508028] >ffff0000101e8f80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   23.508691]                          ^
[   23.509049]  ffff0000101e9000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.509716]  ffff0000101e9080: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb
[   23.510380] ==================================================================