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

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

[   23.238006] ==================================================================
[   23.238121] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   23.238251] Write of size 128 at addr fff00000c413cd00 by task kunit_try_catch/172
[   23.238699] 
[   23.239172] CPU: 0 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   23.239534] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.239603] Hardware name: linux,dummy-virt (DT)
[   23.239694] Call trace:
[   23.239758]  show_stack+0x20/0x38 (C)
[   23.241270]  dump_stack_lvl+0x8c/0xd0
[   23.241402]  print_report+0x118/0x608
[   23.241517]  kasan_report+0xdc/0x128
[   23.241863]  kasan_check_range+0x100/0x1a8
[   23.242086]  __asan_memset+0x34/0x78
[   23.242289]  kmalloc_oob_in_memset+0x144/0x2d0
[   23.242576]  kunit_try_run_case+0x170/0x3f0
[   23.242886]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.243091]  kthread+0x328/0x630
[   23.243221]  ret_from_fork+0x10/0x20
[   23.243538] 
[   23.243590] Allocated by task 172:
[   23.243681]  kasan_save_stack+0x3c/0x68
[   23.243969]  kasan_save_track+0x20/0x40
[   23.244075]  kasan_save_alloc_info+0x40/0x58
[   23.244187]  __kasan_kmalloc+0xd4/0xd8
[   23.244290]  __kmalloc_cache_noprof+0x15c/0x3c0
[   23.244405]  kmalloc_oob_in_memset+0xb0/0x2d0
[   23.245401]  kunit_try_run_case+0x170/0x3f0
[   23.245818]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.246206]  kthread+0x328/0x630
[   23.246398]  ret_from_fork+0x10/0x20
[   23.246550] 
[   23.246600] The buggy address belongs to the object at fff00000c413cd00
[   23.246600]  which belongs to the cache kmalloc-128 of size 128
[   23.247177] The buggy address is located 0 bytes inside of
[   23.247177]  allocated 120-byte region [fff00000c413cd00, fff00000c413cd78)
[   23.247650] 
[   23.248480] The buggy address belongs to the physical page:
[   23.248580] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10413c
[   23.248745] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.248868] page_type: f5(slab)
[   23.249125] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   23.249318] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.249414] page dumped because: kasan: bad access detected
[   23.249484] 
[   23.249526] Memory state around the buggy address:
[   23.249596]  fff00000c413cc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.249743]  fff00000c413cc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.249980] >fff00000c413cd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.250122]                                                                 ^
[   23.250366]  fff00000c413cd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.250467]  fff00000c413ce00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.250585] ==================================================================

[   11.559909] ==================================================================
[   11.560757] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   11.561091] Write of size 128 at addr ffff888102b31a00 by task kunit_try_catch/190
[   11.561405] 
[   11.561537] CPU: 1 UID: 0 PID: 190 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   11.561582] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.561593] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.561612] Call Trace:
[   11.561625]  <TASK>
[   11.561642]  dump_stack_lvl+0x73/0xb0
[   11.561668]  print_report+0xd1/0x650
[   11.561691]  ? __virt_addr_valid+0x1db/0x2d0
[   11.561714]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.561735]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.561757]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.561785]  kasan_report+0x141/0x180
[   11.561807]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.561835]  kasan_check_range+0x10c/0x1c0
[   11.561859]  __asan_memset+0x27/0x50
[   11.561879]  kmalloc_oob_in_memset+0x15f/0x320
[   11.561901]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   11.561925]  ? __schedule+0x10cc/0x2b30
[   11.561948]  ? __pfx_read_tsc+0x10/0x10
[   11.561967]  ? ktime_get_ts64+0x86/0x230
[   11.561993]  kunit_try_run_case+0x1a5/0x480
[   11.562017]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.562038]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.562061]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.562085]  ? __kthread_parkme+0x82/0x180
[   11.562106]  ? preempt_count_sub+0x50/0x80
[   11.562451]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.562485]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.562509]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.562532]  kthread+0x337/0x6f0
[   11.562554]  ? trace_preempt_on+0x20/0xc0
[   11.562578]  ? __pfx_kthread+0x10/0x10
[   11.562601]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.562623]  ? calculate_sigpending+0x7b/0xa0
[   11.562645]  ? __pfx_kthread+0x10/0x10
[   11.562668]  ret_from_fork+0x41/0x80
[   11.562688]  ? __pfx_kthread+0x10/0x10
[   11.562710]  ret_from_fork_asm+0x1a/0x30
[   11.562743]  </TASK>
[   11.562753] 
[   11.575925] Allocated by task 190:
[   11.576071]  kasan_save_stack+0x45/0x70
[   11.576436]  kasan_save_track+0x18/0x40
[   11.576580]  kasan_save_alloc_info+0x3b/0x50
[   11.576726]  __kasan_kmalloc+0xb7/0xc0
[   11.576857]  __kmalloc_cache_noprof+0x189/0x420
[   11.577074]  kmalloc_oob_in_memset+0xac/0x320
[   11.577278]  kunit_try_run_case+0x1a5/0x480
[   11.577851]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.578090]  kthread+0x337/0x6f0
[   11.578218]  ret_from_fork+0x41/0x80
[   11.578409]  ret_from_fork_asm+0x1a/0x30
[   11.578640] 
[   11.578747] The buggy address belongs to the object at ffff888102b31a00
[   11.578747]  which belongs to the cache kmalloc-128 of size 128
[   11.579380] The buggy address is located 0 bytes inside of
[   11.579380]  allocated 120-byte region [ffff888102b31a00, ffff888102b31a78)
[   11.579963] 
[   11.580114] The buggy address belongs to the physical page:
[   11.580339] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b31
[   11.580725] flags: 0x200000000000000(node=0|zone=2)
[   11.581020] page_type: f5(slab)
[   11.581202] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.581497] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.582047] page dumped because: kasan: bad access detected
[   11.582292] 
[   11.582375] Memory state around the buggy address:
[   11.582674]  ffff888102b31900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.582886]  ffff888102b31980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.583098] >ffff888102b31a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.583459]                                                                 ^
[   11.583771]  ffff888102b31a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.584083]  ffff888102b31b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.584435] ==================================================================

[   21.442229] ==================================================================
[   21.443294] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   21.444024] Write of size 128 at addr ffff00000ea7e700 by task kunit_try_catch/224
[   21.444753] 
[   21.444937] CPU: 3 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   21.445015] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.445038] Hardware name: Radxa ROCK Pi 4B (DT)
[   21.445065] Call trace:
[   21.445083]  show_stack+0x20/0x38 (C)
[   21.445135]  dump_stack_lvl+0x8c/0xd0
[   21.445185]  print_report+0x118/0x608
[   21.445232]  kasan_report+0xdc/0x128
[   21.445279]  kasan_check_range+0x100/0x1a8
[   21.445330]  __asan_memset+0x34/0x78
[   21.445380]  kmalloc_oob_in_memset+0x144/0x2d0
[   21.445436]  kunit_try_run_case+0x170/0x3f0
[   21.445493]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.445557]  kthread+0x328/0x630
[   21.445611]  ret_from_fork+0x10/0x20
[   21.445664] 
[   21.451548] Allocated by task 224:
[   21.451884]  kasan_save_stack+0x3c/0x68
[   21.452262]  kasan_save_track+0x20/0x40
[   21.452634]  kasan_save_alloc_info+0x40/0x58
[   21.453046]  __kasan_kmalloc+0xd4/0xd8
[   21.453408]  __kmalloc_cache_noprof+0x15c/0x3c0
[   21.453850]  kmalloc_oob_in_memset+0xb0/0x2d0
[   21.454273]  kunit_try_run_case+0x170/0x3f0
[   21.454680]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.455204]  kthread+0x328/0x630
[   21.455527]  ret_from_fork+0x10/0x20
[   21.455877] 
[   21.456030] The buggy address belongs to the object at ffff00000ea7e700
[   21.456030]  which belongs to the cache kmalloc-128 of size 128
[   21.457163] The buggy address is located 0 bytes inside of
[   21.457163]  allocated 120-byte region [ffff00000ea7e700, ffff00000ea7e778)
[   21.458290] 
[   21.458445] The buggy address belongs to the physical page:
[   21.458961] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xea7e
[   21.459685] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   21.460296] page_type: f5(slab)
[   21.460609] raw: 03fffe0000000000 ffff000000402a00 dead000000000122 0000000000000000
[   21.461324] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.462031] page dumped because: kasan: bad access detected
[   21.462545] 
[   21.462697] Memory state around the buggy address:
[   21.463145]  ffff00000ea7e600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.463811]  ffff00000ea7e680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.464476] >ffff00000ea7e700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   21.465137]                                                                 ^
[   21.465791]  ffff00000ea7e780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.466457]  ffff00000ea7e800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.467118] ==================================================================