Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-x86_64

[   12.819393] ==================================================================
[   12.820449] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   12.821312] Read of size 1 at addr ffff8881025db000 by task kunit_try_catch/160
[   12.822341] 
[   12.822624] CPU: 0 UID: 0 PID: 160 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT(voluntary) 
[   12.822735] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.822761] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.822857] Call Trace:
[   12.822887]  <TASK>
[   12.822927]  dump_stack_lvl+0x73/0xb0
[   12.823002]  print_report+0xd1/0x650
[   12.823037]  ? __virt_addr_valid+0x1db/0x2d0
[   12.823063]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.823084]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.823107]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.823127]  kasan_report+0x141/0x180
[   12.823163]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.823188]  __asan_report_load1_noabort+0x18/0x20
[   12.823210]  kmalloc_node_oob_right+0x369/0x3c0
[   12.823232]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   12.823255]  ? __schedule+0x10cc/0x2b30
[   12.823279]  ? __pfx_read_tsc+0x10/0x10
[   12.823302]  ? ktime_get_ts64+0x86/0x230
[   12.823332]  kunit_try_run_case+0x1a5/0x480
[   12.823361]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.823384]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.823410]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.823434]  ? __kthread_parkme+0x82/0x180
[   12.823459]  ? preempt_count_sub+0x50/0x80
[   12.823485]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.823508]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.823531]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.823554]  kthread+0x337/0x6f0
[   12.823604]  ? trace_preempt_on+0x20/0xc0
[   12.823644]  ? __pfx_kthread+0x10/0x10
[   12.823675]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.823709]  ? calculate_sigpending+0x7b/0xa0
[   12.823745]  ? __pfx_kthread+0x10/0x10
[   12.823774]  ret_from_fork+0x41/0x80
[   12.823811]  ? __pfx_kthread+0x10/0x10
[   12.823832]  ret_from_fork_asm+0x1a/0x30
[   12.823865]  </TASK>
[   12.823880] 
[   12.835591] Allocated by task 160:
[   12.836027]  kasan_save_stack+0x45/0x70
[   12.836391]  kasan_save_track+0x18/0x40
[   12.836659]  kasan_save_alloc_info+0x3b/0x50
[   12.837161]  __kasan_kmalloc+0xb7/0xc0
[   12.837621]  __kmalloc_cache_node_noprof+0x188/0x420
[   12.838078]  kmalloc_node_oob_right+0xab/0x3c0
[   12.838280]  kunit_try_run_case+0x1a5/0x480
[   12.838493]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.838722]  kthread+0x337/0x6f0
[   12.838895]  ret_from_fork+0x41/0x80
[   12.839146]  ret_from_fork_asm+0x1a/0x30
[   12.839639] 
[   12.840222] The buggy address belongs to the object at ffff8881025da000
[   12.840222]  which belongs to the cache kmalloc-4k of size 4096
[   12.841240] The buggy address is located 0 bytes to the right of
[   12.841240]  allocated 4096-byte region [ffff8881025da000, ffff8881025db000)
[   12.842895] 
[   12.843031] The buggy address belongs to the physical page:
[   12.843925] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025d8
[   12.844607] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.845241] flags: 0x200000000000040(head|node=0|zone=2)
[   12.845922] page_type: f5(slab)
[   12.846101] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.846643] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.847015] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.847375] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.847687] head: 0200000000000003 ffffea0004097601 00000000ffffffff 00000000ffffffff
[   12.848611] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.849246] page dumped because: kasan: bad access detected
[   12.849586] 
[   12.849815] Memory state around the buggy address:
[   12.850694]  ffff8881025daf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.851165]  ffff8881025daf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.851879] >ffff8881025db000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.852538]                    ^
[   12.852816]  ffff8881025db080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.853553]  ffff8881025db100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.854121] ==================================================================