Hay
Date
May 23, 2025, 11:07 p.m.

Environment
qemu-x86_64

[   12.577845] ==================================================================
[   12.578422] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   12.578770] Write of size 16 at addr ffff8881029e3040 by task kunit_try_catch/185
[   12.579194] 
[   12.579380] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT(voluntary) 
[   12.579430] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.579443] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.579464] Call Trace:
[   12.579476]  <TASK>
[   12.579493]  dump_stack_lvl+0x73/0xb0
[   12.579523]  print_report+0xd1/0x650
[   12.579545]  ? __virt_addr_valid+0x1db/0x2d0
[   12.579567]  ? kmalloc_oob_16+0x452/0x4a0
[   12.579587]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.579608]  ? kmalloc_oob_16+0x452/0x4a0
[   12.579630]  kasan_report+0x141/0x180
[   12.579651]  ? kmalloc_oob_16+0x452/0x4a0
[   12.579677]  __asan_report_store16_noabort+0x1b/0x30
[   12.579698]  kmalloc_oob_16+0x452/0x4a0
[   12.579719]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   12.579740]  ? __schedule+0x10cc/0x2b30
[   12.579762]  ? __pfx_read_tsc+0x10/0x10
[   12.579783]  ? ktime_get_ts64+0x86/0x230
[   12.579808]  kunit_try_run_case+0x1a5/0x480
[   12.579831]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.579852]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.579874]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.579908]  ? __kthread_parkme+0x82/0x180
[   12.579929]  ? preempt_count_sub+0x50/0x80
[   12.579954]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.579977]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.579999]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.580020]  kthread+0x337/0x6f0
[   12.580037]  ? trace_preempt_on+0x20/0xc0
[   12.580060]  ? __pfx_kthread+0x10/0x10
[   12.580077]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.580097]  ? calculate_sigpending+0x7b/0xa0
[   12.580119]  ? __pfx_kthread+0x10/0x10
[   12.580137]  ret_from_fork+0x41/0x80
[   12.580157]  ? __pfx_kthread+0x10/0x10
[   12.580174]  ret_from_fork_asm+0x1a/0x30
[   12.580205]  </TASK>
[   12.580217] 
[   12.587963] Allocated by task 185:
[   12.588151]  kasan_save_stack+0x45/0x70
[   12.588367]  kasan_save_track+0x18/0x40
[   12.588544]  kasan_save_alloc_info+0x3b/0x50
[   12.588692]  __kasan_kmalloc+0xb7/0xc0
[   12.589040]  __kmalloc_cache_noprof+0x189/0x420
[   12.589303]  kmalloc_oob_16+0xa8/0x4a0
[   12.589572]  kunit_try_run_case+0x1a5/0x480
[   12.589759]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.590059]  kthread+0x337/0x6f0
[   12.590228]  ret_from_fork+0x41/0x80
[   12.590386]  ret_from_fork_asm+0x1a/0x30
[   12.590739] 
[   12.590825] The buggy address belongs to the object at ffff8881029e3040
[   12.590825]  which belongs to the cache kmalloc-16 of size 16
[   12.591360] The buggy address is located 0 bytes inside of
[   12.591360]  allocated 13-byte region [ffff8881029e3040, ffff8881029e304d)
[   12.591876] 
[   12.591954] The buggy address belongs to the physical page:
[   12.592130] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029e3
[   12.592580] flags: 0x200000000000000(node=0|zone=2)
[   12.593237] page_type: f5(slab)
[   12.593460] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.593802] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.594178] page dumped because: kasan: bad access detected
[   12.594367] 
[   12.594438] Memory state around the buggy address:
[   12.594596]  ffff8881029e2f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.594924]  ffff8881029e2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.595385] >ffff8881029e3000: fa fb fc fc fa fb fc fc 00 05 fc fc 00 00 fc fc
[   12.595779]                                               ^
[   12.596088]  ffff8881029e3080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.596383]  ffff8881029e3100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.596622] ==================================================================