Hay
Date
June 18, 2025, 6:43 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.283460] ==================================================================
[   20.283621] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   20.283752] Write of size 16 at addr fff00000c60580e0 by task kunit_try_catch/176
[   20.283869] 
[   20.283948] CPU: 0 UID: 0 PID: 176 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT 
[   20.284162] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.284227] Hardware name: linux,dummy-virt (DT)
[   20.284299] Call trace:
[   20.284352]  show_stack+0x20/0x38 (C)
[   20.284473]  dump_stack_lvl+0x8c/0xd0
[   20.284605]  print_report+0x118/0x608
[   20.284721]  kasan_report+0xdc/0x128
[   20.284830]  __asan_report_store16_noabort+0x20/0x30
[   20.284944]  kmalloc_oob_16+0x3a0/0x3f8
[   20.285091]  kunit_try_run_case+0x170/0x3f0
[   20.285201]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.285347]  kthread+0x328/0x630
[   20.285446]  ret_from_fork+0x10/0x20
[   20.285609] 
[   20.285668] Allocated by task 176:
[   20.285754]  kasan_save_stack+0x3c/0x68
[   20.285877]  kasan_save_track+0x20/0x40
[   20.285986]  kasan_save_alloc_info+0x40/0x58
[   20.286128]  __kasan_kmalloc+0xd4/0xd8
[   20.286203]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.286292]  kmalloc_oob_16+0xb4/0x3f8
[   20.286369]  kunit_try_run_case+0x170/0x3f0
[   20.286450]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.287127]  kthread+0x328/0x630
[   20.287242]  ret_from_fork+0x10/0x20
[   20.287316] 
[   20.287365] The buggy address belongs to the object at fff00000c60580e0
[   20.287365]  which belongs to the cache kmalloc-16 of size 16
[   20.287487] The buggy address is located 0 bytes inside of
[   20.287487]  allocated 13-byte region [fff00000c60580e0, fff00000c60580ed)
[   20.287665] 
[   20.287706] The buggy address belongs to the physical page:
[   20.288089] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106058
[   20.288221] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.288626] page_type: f5(slab)
[   20.288782] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   20.288896] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   20.288982] page dumped because: kasan: bad access detected
[   20.289051] 
[   20.289086] Memory state around the buggy address:
[   20.289152]  fff00000c6057f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.289252]  fff00000c6058000: 00 00 fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
[   20.289348] >fff00000c6058080: fa fb fc fc 00 04 fc fc fa fb fc fc 00 05 fc fc
[   20.289434]                                                           ^
[   20.289518]  fff00000c6058100: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.290171]  fff00000c6058180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.290337] ==================================================================

[   11.128015] ==================================================================
[   11.129415] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   11.130116] Write of size 16 at addr ffff888102859640 by task kunit_try_catch/192
[   11.130853] 
[   11.131041] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT(voluntary) 
[   11.131089] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.131102] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.131123] Call Trace:
[   11.131135]  <TASK>
[   11.131151]  dump_stack_lvl+0x73/0xb0
[   11.131179]  print_report+0xd1/0x650
[   11.131200]  ? __virt_addr_valid+0x1db/0x2d0
[   11.131235]  ? kmalloc_oob_16+0x452/0x4a0
[   11.131254]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.131278]  ? kmalloc_oob_16+0x452/0x4a0
[   11.131297]  kasan_report+0x141/0x180
[   11.131317]  ? kmalloc_oob_16+0x452/0x4a0
[   11.131341]  __asan_report_store16_noabort+0x1b/0x30
[   11.131364]  kmalloc_oob_16+0x452/0x4a0
[   11.131383]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   11.131403]  ? __schedule+0x10cc/0x2b60
[   11.131424]  ? __pfx_read_tsc+0x10/0x10
[   11.131444]  ? ktime_get_ts64+0x86/0x230
[   11.131468]  kunit_try_run_case+0x1a5/0x480
[   11.131490]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.131511]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.131533]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.131554]  ? __kthread_parkme+0x82/0x180
[   11.131573]  ? preempt_count_sub+0x50/0x80
[   11.131595]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.131617]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.131638]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.131660]  kthread+0x337/0x6f0
[   11.131678]  ? trace_preempt_on+0x20/0xc0
[   11.131700]  ? __pfx_kthread+0x10/0x10
[   11.131720]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.131739]  ? calculate_sigpending+0x7b/0xa0
[   11.131761]  ? __pfx_kthread+0x10/0x10
[   11.131781]  ret_from_fork+0x116/0x1d0
[   11.131799]  ? __pfx_kthread+0x10/0x10
[   11.131818]  ret_from_fork_asm+0x1a/0x30
[   11.131847]  </TASK>
[   11.131857] 
[   11.144002] Allocated by task 192:
[   11.144326]  kasan_save_stack+0x45/0x70
[   11.144610]  kasan_save_track+0x18/0x40
[   11.144751]  kasan_save_alloc_info+0x3b/0x50
[   11.144892]  __kasan_kmalloc+0xb7/0xc0
[   11.145015]  __kmalloc_cache_noprof+0x189/0x420
[   11.145163]  kmalloc_oob_16+0xa8/0x4a0
[   11.145303]  kunit_try_run_case+0x1a5/0x480
[   11.145509]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.145765]  kthread+0x337/0x6f0
[   11.145935]  ret_from_fork+0x116/0x1d0
[   11.146089]  ret_from_fork_asm+0x1a/0x30
[   11.146296] 
[   11.146361] The buggy address belongs to the object at ffff888102859640
[   11.146361]  which belongs to the cache kmalloc-16 of size 16
[   11.146800] The buggy address is located 0 bytes inside of
[   11.146800]  allocated 13-byte region [ffff888102859640, ffff88810285964d)
[   11.147177] 
[   11.147278] The buggy address belongs to the physical page:
[   11.147525] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102859
[   11.147869] flags: 0x200000000000000(node=0|zone=2)
[   11.148061] page_type: f5(slab)
[   11.148399] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122
[   11.148730] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.149039] page dumped because: kasan: bad access detected
[   11.149227] 
[   11.149318] Memory state around the buggy address:
[   11.149653]  ffff888102859500: 00 06 fc fc 00 06 fc fc fa fb fc fc fa fb fc fc
[   11.149972]  ffff888102859580: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   11.150322] >ffff888102859600: fa fb fc fc fa fb fc fc 00 05 fc fc 00 00 fc fc
[   11.150645]                                               ^
[   11.150894]  ffff888102859680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.151169]  ffff888102859700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.151457] ==================================================================