Hay
Date
July 8, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.333825] ==================================================================
[   19.333904] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   19.333957] Write of size 16 at addr fff00000c58c2ac0 by task kunit_try_catch/166
[   19.334172] 
[   19.334509] CPU: 1 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.334748] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.334784] Hardware name: linux,dummy-virt (DT)
[   19.334842] Call trace:
[   19.334867]  show_stack+0x20/0x38 (C)
[   19.334933]  dump_stack_lvl+0x8c/0xd0
[   19.334980]  print_report+0x118/0x608
[   19.335181]  kasan_report+0xdc/0x128
[   19.335255]  __asan_report_store16_noabort+0x20/0x30
[   19.335448]  kmalloc_oob_16+0x3a0/0x3f8
[   19.335650]  kunit_try_run_case+0x170/0x3f0
[   19.335858]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.336027]  kthread+0x328/0x630
[   19.336092]  ret_from_fork+0x10/0x20
[   19.336279] 
[   19.336320] Allocated by task 166:
[   19.336438]  kasan_save_stack+0x3c/0x68
[   19.336709]  kasan_save_track+0x20/0x40
[   19.336810]  kasan_save_alloc_info+0x40/0x58
[   19.336850]  __kasan_kmalloc+0xd4/0xd8
[   19.337031]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.337263]  kmalloc_oob_16+0xb4/0x3f8
[   19.337381]  kunit_try_run_case+0x170/0x3f0
[   19.337528]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.337574]  kthread+0x328/0x630
[   19.337766]  ret_from_fork+0x10/0x20
[   19.337942] 
[   19.337975] The buggy address belongs to the object at fff00000c58c2ac0
[   19.337975]  which belongs to the cache kmalloc-16 of size 16
[   19.338193] The buggy address is located 0 bytes inside of
[   19.338193]  allocated 13-byte region [fff00000c58c2ac0, fff00000c58c2acd)
[   19.338376] 
[   19.338427] The buggy address belongs to the physical page:
[   19.338469] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058c2
[   19.338999] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.339216] page_type: f5(slab)
[   19.339372] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   19.339508] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   19.339907] page dumped because: kasan: bad access detected
[   19.339980] 
[   19.339999] Memory state around the buggy address:
[   19.340044]  fff00000c58c2980: fa fb fc fc 00 02 fc fc fa fb fc fc fa fb fc fc
[   19.340097]  fff00000c58c2a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   19.340195] >fff00000c58c2a80: 00 04 fc fc fa fb fc fc 00 05 fc fc 00 00 fc fc
[   19.340249]                                               ^
[   19.340284]  fff00000c58c2b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.340450]  fff00000c58c2b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.340616] ==================================================================

[   12.487747] ==================================================================
[   12.488226] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   12.488641] Write of size 16 at addr ffff888102626060 by task kunit_try_catch/184
[   12.488911] 
[   12.489121] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.489170] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.489182] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.489202] Call Trace:
[   12.489214]  <TASK>
[   12.489232]  dump_stack_lvl+0x73/0xb0
[   12.489263]  print_report+0xd1/0x650
[   12.489286]  ? __virt_addr_valid+0x1db/0x2d0
[   12.489310]  ? kmalloc_oob_16+0x452/0x4a0
[   12.489330]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.489366]  ? kmalloc_oob_16+0x452/0x4a0
[   12.489386]  kasan_report+0x141/0x180
[   12.489408]  ? kmalloc_oob_16+0x452/0x4a0
[   12.489445]  __asan_report_store16_noabort+0x1b/0x30
[   12.489471]  kmalloc_oob_16+0x452/0x4a0
[   12.489491]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   12.489513]  ? __schedule+0x10cc/0x2b60
[   12.489535]  ? __pfx_read_tsc+0x10/0x10
[   12.489556]  ? ktime_get_ts64+0x86/0x230
[   12.489582]  kunit_try_run_case+0x1a5/0x480
[   12.489623]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.489646]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.489680]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.489707]  ? __kthread_parkme+0x82/0x180
[   12.489728]  ? preempt_count_sub+0x50/0x80
[   12.489752]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.489776]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.489800]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.489834]  kthread+0x337/0x6f0
[   12.489852]  ? trace_preempt_on+0x20/0xc0
[   12.489877]  ? __pfx_kthread+0x10/0x10
[   12.489907]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.489971]  ? calculate_sigpending+0x7b/0xa0
[   12.489998]  ? __pfx_kthread+0x10/0x10
[   12.490019]  ret_from_fork+0x116/0x1d0
[   12.490038]  ? __pfx_kthread+0x10/0x10
[   12.490058]  ret_from_fork_asm+0x1a/0x30
[   12.490090]  </TASK>
[   12.490100] 
[   12.498038] Allocated by task 184:
[   12.498219]  kasan_save_stack+0x45/0x70
[   12.498644]  kasan_save_track+0x18/0x40
[   12.498847]  kasan_save_alloc_info+0x3b/0x50
[   12.499105]  __kasan_kmalloc+0xb7/0xc0
[   12.499244]  __kmalloc_cache_noprof+0x189/0x420
[   12.499453]  kmalloc_oob_16+0xa8/0x4a0
[   12.499667]  kunit_try_run_case+0x1a5/0x480
[   12.499930]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.500165]  kthread+0x337/0x6f0
[   12.500284]  ret_from_fork+0x116/0x1d0
[   12.500474]  ret_from_fork_asm+0x1a/0x30
[   12.500729] 
[   12.500855] The buggy address belongs to the object at ffff888102626060
[   12.500855]  which belongs to the cache kmalloc-16 of size 16
[   12.501391] The buggy address is located 0 bytes inside of
[   12.501391]  allocated 13-byte region [ffff888102626060, ffff88810262606d)
[   12.502135] 
[   12.502249] The buggy address belongs to the physical page:
[   12.502485] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102626
[   12.502854] flags: 0x200000000000000(node=0|zone=2)
[   12.503076] page_type: f5(slab)
[   12.503198] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.503425] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.503718] page dumped because: kasan: bad access detected
[   12.504140] 
[   12.504384] Memory state around the buggy address:
[   12.504698]  ffff888102625f00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.505014]  ffff888102625f80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.505249] >ffff888102626000: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   12.505459]                                                           ^
[   12.505872]  ffff888102626080: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.506372]  ffff888102626100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.506755] ==================================================================