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

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

[   17.749564] ==================================================================
[   17.749694] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   17.749805] Write of size 4 at addr fff00000c62d4975 by task kunit_try_catch/176
[   17.749956] 
[   17.750050] CPU: 1 UID: 0 PID: 176 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   17.750248] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.750305] Hardware name: linux,dummy-virt (DT)
[   17.750374] Call trace:
[   17.750467]  show_stack+0x20/0x38 (C)
[   17.750601]  dump_stack_lvl+0x8c/0xd0
[   17.750702]  print_report+0x118/0x608
[   17.750884]  kasan_report+0xdc/0x128
[   17.751012]  kasan_check_range+0x100/0x1a8
[   17.751120]  __asan_memset+0x34/0x78
[   17.751312]  kmalloc_oob_memset_4+0x150/0x300
[   17.751467]  kunit_try_run_case+0x170/0x3f0
[   17.751578]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.751731]  kthread+0x328/0x630
[   17.751857]  ret_from_fork+0x10/0x20
[   17.751955] 
[   17.751993] Allocated by task 176:
[   17.752076]  kasan_save_stack+0x3c/0x68
[   17.752154]  kasan_save_track+0x20/0x40
[   17.752248]  kasan_save_alloc_info+0x40/0x58
[   17.752358]  __kasan_kmalloc+0xd4/0xd8
[   17.752454]  __kmalloc_cache_noprof+0x15c/0x3c0
[   17.752572]  kmalloc_oob_memset_4+0xb0/0x300
[   17.752653]  kunit_try_run_case+0x170/0x3f0
[   17.752764]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.752874]  kthread+0x328/0x630
[   17.752968]  ret_from_fork+0x10/0x20
[   17.753066] 
[   17.753125] The buggy address belongs to the object at fff00000c62d4900
[   17.753125]  which belongs to the cache kmalloc-128 of size 128
[   17.753308] The buggy address is located 117 bytes inside of
[   17.753308]  allocated 120-byte region [fff00000c62d4900, fff00000c62d4978)
[   17.753522] 
[   17.753607] The buggy address belongs to the physical page:
[   17.753707] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1062d4
[   17.753851] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.753958] page_type: f5(slab)
[   17.754037] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.754143] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.754230] page dumped because: kasan: bad access detected
[   17.754301] 
[   17.754352] Memory state around the buggy address:
[   17.754430]  fff00000c62d4800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.754536]  fff00000c62d4880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.754617] >fff00000c62d4900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.754693]                                                                 ^
[   17.754982]  fff00000c62d4980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.755096]  fff00000c62d4a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.755390] ==================================================================

[   18.179933] ==================================================================
[   18.180728] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   18.181397] Write of size 4 at addr ffff888103199a75 by task kunit_try_catch/194
[   18.182729] 
[   18.182983] CPU: 0 UID: 0 PID: 194 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   18.183112] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.183143] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.183173] Call Trace:
[   18.183191]  <TASK>
[   18.183213]  dump_stack_lvl+0x73/0xb0
[   18.183252]  print_report+0xd1/0x650
[   18.183319]  ? __virt_addr_valid+0x1db/0x2d0
[   18.183370]  ? kmalloc_oob_memset_4+0x166/0x330
[   18.183405]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.183448]  ? kmalloc_oob_memset_4+0x166/0x330
[   18.183533]  kasan_report+0x141/0x180
[   18.183614]  ? kmalloc_oob_memset_4+0x166/0x330
[   18.183695]  kasan_check_range+0x10c/0x1c0
[   18.183737]  __asan_memset+0x27/0x50
[   18.183768]  kmalloc_oob_memset_4+0x166/0x330
[   18.183804]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   18.183848]  kunit_try_run_case+0x1a5/0x480
[   18.183884]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.183914]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.183949]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.183982]  ? __kthread_parkme+0x82/0x180
[   18.184012]  ? preempt_count_sub+0x50/0x80
[   18.184046]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.184079]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.184110]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.184141]  kthread+0x337/0x6f0
[   18.184171]  ? trace_preempt_on+0x20/0xc0
[   18.184205]  ? __pfx_kthread+0x10/0x10
[   18.184237]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.184269]  ? calculate_sigpending+0x7b/0xa0
[   18.184299]  ? __pfx_kthread+0x10/0x10
[   18.184331]  ret_from_fork+0x41/0x80
[   18.184362]  ? __pfx_kthread+0x10/0x10
[   18.184394]  ret_from_fork_asm+0x1a/0x30
[   18.184549]  </TASK>
[   18.184592] 
[   18.197912] Allocated by task 194:
[   18.198396]  kasan_save_stack+0x45/0x70
[   18.198906]  kasan_save_track+0x18/0x40
[   18.199360]  kasan_save_alloc_info+0x3b/0x50
[   18.199856]  __kasan_kmalloc+0xb7/0xc0
[   18.200275]  __kmalloc_cache_noprof+0x189/0x420
[   18.200802]  kmalloc_oob_memset_4+0xac/0x330
[   18.201187]  kunit_try_run_case+0x1a5/0x480
[   18.201682]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.202226]  kthread+0x337/0x6f0
[   18.202692]  ret_from_fork+0x41/0x80
[   18.203015]  ret_from_fork_asm+0x1a/0x30
[   18.203339] 
[   18.203607] The buggy address belongs to the object at ffff888103199a00
[   18.203607]  which belongs to the cache kmalloc-128 of size 128
[   18.204762] The buggy address is located 117 bytes inside of
[   18.204762]  allocated 120-byte region [ffff888103199a00, ffff888103199a78)
[   18.205638] 
[   18.205857] The buggy address belongs to the physical page:
[   18.206387] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103199
[   18.207198] flags: 0x200000000000000(node=0|zone=2)
[   18.207793] page_type: f5(slab)
[   18.208211] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   18.208779] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.209317] page dumped because: kasan: bad access detected
[   18.209927] 
[   18.210196] Memory state around the buggy address:
[   18.210765]  ffff888103199900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.211360]  ffff888103199980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.212021] >ffff888103199a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.212603]                                                                 ^
[   18.213279]  ffff888103199a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.213988]  ffff888103199b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.214579] ==================================================================

[   19.807788] ==================================================================
[   19.808866] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   19.809556] Write of size 4 at addr ffff00000c98e775 by task kunit_try_catch/232
[   19.810241] 
[   19.810405] CPU: 1 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   19.810455] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.810468] Hardware name: Radxa ROCK Pi 4B (DT)
[   19.810485] Call trace:
[   19.810497]  show_stack+0x20/0x38 (C)
[   19.810530]  dump_stack_lvl+0x8c/0xd0
[   19.810561]  print_report+0x118/0x608
[   19.810591]  kasan_report+0xdc/0x128
[   19.810619]  kasan_check_range+0x100/0x1a8
[   19.810649]  __asan_memset+0x34/0x78
[   19.810680]  kmalloc_oob_memset_4+0x150/0x300
[   19.810713]  kunit_try_run_case+0x170/0x3f0
[   19.810748]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.810786]  kthread+0x328/0x630
[   19.810821]  ret_from_fork+0x10/0x20
[   19.810853] 
[   19.816770] Allocated by task 232:
[   19.817118]  kasan_save_stack+0x3c/0x68
[   19.817520]  kasan_save_track+0x20/0x40
[   19.817920]  kasan_save_alloc_info+0x40/0x58
[   19.818364]  __kasan_kmalloc+0xd4/0xd8
[   19.818753]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.819227]  kmalloc_oob_memset_4+0xb0/0x300
[   19.819671]  kunit_try_run_case+0x170/0x3f0
[   19.820109]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.820666]  kthread+0x328/0x630
[   19.821018]  ret_from_fork+0x10/0x20
[   19.821395] 
[   19.821565] The buggy address belongs to the object at ffff00000c98e700
[   19.821565]  which belongs to the cache kmalloc-128 of size 128
[   19.822731] The buggy address is located 117 bytes inside of
[   19.822731]  allocated 120-byte region [ffff00000c98e700, ffff00000c98e778)
[   19.823910] 
[   19.824080] The buggy address belongs to the physical page:
[   19.824616] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xc98e
[   19.825372] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   19.826015] page_type: f5(slab)
[   19.826355] raw: 03fffe0000000000 ffff000000402a00 dead000000000122 0000000000000000
[   19.827102] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.827836] page dumped because: kasan: bad access detected
[   19.828373] 
[   19.828542] Memory state around the buggy address:
[   19.829014]  ffff00000c98e600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.829709]  ffff00000c98e680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.830404] >ffff00000c98e700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.831091]                                                                 ^
[   19.831773]  ffff00000c98e780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.832468]  ffff00000c98e800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.833157] ==================================================================