Hay
Date
July 23, 2025, 3:10 a.m.

Environment
qemu-x86_64

[   24.453586] ==================================================================
[   24.454876] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   24.455986] Read of size 1 at addr ffff888105fb9000 by task kunit_try_catch/189
[   24.456499] 
[   24.456862] CPU: 1 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) 
[   24.456922] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.456936] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.456960] Call Trace:
[   24.456979]  <TASK>
[   24.456999]  dump_stack_lvl+0x73/0xb0
[   24.457040]  print_report+0xd1/0x640
[   24.457069]  ? __virt_addr_valid+0x1db/0x2d0
[   24.457097]  ? kmalloc_node_oob_right+0x369/0x3c0
[   24.457123]  ? kasan_complete_mode_report_info+0x2a/0x200
[   24.457162]  ? kmalloc_node_oob_right+0x369/0x3c0
[   24.457187]  kasan_report+0x141/0x180
[   24.457337]  ? kmalloc_node_oob_right+0x369/0x3c0
[   24.457370]  __asan_report_load1_noabort+0x18/0x20
[   24.457436]  kmalloc_node_oob_right+0x369/0x3c0
[   24.457461]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   24.457485]  ? __schedule+0x10da/0x2b60
[   24.457512]  ? __pfx_read_tsc+0x10/0x10
[   24.457535]  ? ktime_get_ts64+0x86/0x230
[   24.457559]  kunit_try_run_case+0x1a5/0x480
[   24.457585]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.457607]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.457633]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.457657]  ? __kthread_parkme+0x82/0x180
[   24.457678]  ? preempt_count_sub+0x50/0x80
[   24.457701]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.457724]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.457747]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.457770]  kthread+0x337/0x6f0
[   24.457790]  ? trace_preempt_on+0x20/0xc0
[   24.457815]  ? __pfx_kthread+0x10/0x10
[   24.457835]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.457858]  ? calculate_sigpending+0x7b/0xa0
[   24.457881]  ? __pfx_kthread+0x10/0x10
[   24.457902]  ret_from_fork+0x116/0x1d0
[   24.457922]  ? __pfx_kthread+0x10/0x10
[   24.457942]  ret_from_fork_asm+0x1a/0x30
[   24.457973]  </TASK>
[   24.457985] 
[   24.472069] Allocated by task 189:
[   24.472249]  kasan_save_stack+0x45/0x70
[   24.472647]  kasan_save_track+0x18/0x40
[   24.473074]  kasan_save_alloc_info+0x3b/0x50
[   24.473723]  __kasan_kmalloc+0xb7/0xc0
[   24.474226]  __kmalloc_cache_node_noprof+0x188/0x420
[   24.474754]  kmalloc_node_oob_right+0xab/0x3c0
[   24.475091]  kunit_try_run_case+0x1a5/0x480
[   24.475253]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.475423]  kthread+0x337/0x6f0
[   24.475541]  ret_from_fork+0x116/0x1d0
[   24.475674]  ret_from_fork_asm+0x1a/0x30
[   24.475809] 
[   24.475878] The buggy address belongs to the object at ffff888105fb8000
[   24.475878]  which belongs to the cache kmalloc-4k of size 4096
[   24.477260] The buggy address is located 0 bytes to the right of
[   24.477260]  allocated 4096-byte region [ffff888105fb8000, ffff888105fb9000)
[   24.478638] 
[   24.478912] The buggy address belongs to the physical page:
[   24.479676] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105fb8
[   24.480784] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   24.481568] flags: 0x200000000000040(head|node=0|zone=2)
[   24.482234] page_type: f5(slab)
[   24.482361] raw: 0200000000000040 ffff888100042140 dead000000000100 dead000000000122
[   24.483124] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   24.483780] head: 0200000000000040 ffff888100042140 dead000000000100 dead000000000122
[   24.484403] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   24.484934] head: 0200000000000003 ffffea000417ee01 00000000ffffffff 00000000ffffffff
[   24.485165] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   24.485394] page dumped because: kasan: bad access detected
[   24.485653] 
[   24.485808] Memory state around the buggy address:
[   24.486570]  ffff888105fb8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.487264]  ffff888105fb8f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.487990] >ffff888105fb9000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.488728]                    ^
[   24.489210]  ffff888105fb9080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.489987]  ffff888105fb9100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.490358] ==================================================================