Hay
Date
July 20, 2025, 11:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.330085] ==================================================================
[   15.330157] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   15.330208] Write of size 16 at addr fff00000c3fc6160 by task kunit_try_catch/166
[   15.330286] 
[   15.330316] CPU: 0 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.330393] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.330419] Hardware name: linux,dummy-virt (DT)
[   15.330450] Call trace:
[   15.330491]  show_stack+0x20/0x38 (C)
[   15.330538]  dump_stack_lvl+0x8c/0xd0
[   15.330591]  print_report+0x118/0x5d0
[   15.330637]  kasan_report+0xdc/0x128
[   15.330912]  __asan_report_store16_noabort+0x20/0x30
[   15.331017]  kmalloc_oob_16+0x3a0/0x3f8
[   15.331111]  kunit_try_run_case+0x170/0x3f0
[   15.331157]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.331207]  kthread+0x328/0x630
[   15.331248]  ret_from_fork+0x10/0x20
[   15.331333] 
[   15.331352] Allocated by task 166:
[   15.331564]  kasan_save_stack+0x3c/0x68
[   15.331621]  kasan_save_track+0x20/0x40
[   15.331657]  kasan_save_alloc_info+0x40/0x58
[   15.331820]  __kasan_kmalloc+0xd4/0xd8
[   15.331912]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.332030]  kmalloc_oob_16+0xb4/0x3f8
[   15.332159]  kunit_try_run_case+0x170/0x3f0
[   15.332247]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.332375]  kthread+0x328/0x630
[   15.332518]  ret_from_fork+0x10/0x20
[   15.332607] 
[   15.334686] The buggy address belongs to the object at fff00000c3fc6160
[   15.334686]  which belongs to the cache kmalloc-16 of size 16
[   15.334744] The buggy address is located 0 bytes inside of
[   15.334744]  allocated 13-byte region [fff00000c3fc6160, fff00000c3fc616d)
[   15.334803] 
[   15.334822] The buggy address belongs to the physical page:
[   15.334852] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103fc6
[   15.334901] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.334947] page_type: f5(slab)
[   15.334984] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.335039] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.335079] page dumped because: kasan: bad access detected
[   15.335109] 
[   15.335126] Memory state around the buggy address:
[   15.335155]  fff00000c3fc6000: 00 05 fc fc 00 00 fc fc 00 06 fc fc 00 06 fc fc
[   15.335196]  fff00000c3fc6080: 00 00 fc fc 00 02 fc fc 00 02 fc fc 00 06 fc fc
[   15.335236] >fff00000c3fc6100: 00 06 fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   15.335272]                                                           ^
[   15.335310]  fff00000c3fc6180: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.335349]  fff00000c3fc6200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.335386] ==================================================================

[   12.273960] ==================================================================
[   12.274481] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   12.274778] Write of size 16 at addr ffff888101d1f4e0 by task kunit_try_catch/183
[   12.275115] 
[   12.275239] CPU: 0 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.275283] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.275294] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.275313] Call Trace:
[   12.275325]  <TASK>
[   12.275340]  dump_stack_lvl+0x73/0xb0
[   12.275418]  print_report+0xd1/0x610
[   12.275441]  ? __virt_addr_valid+0x1db/0x2d0
[   12.275462]  ? kmalloc_oob_16+0x452/0x4a0
[   12.275481]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.275501]  ? kmalloc_oob_16+0x452/0x4a0
[   12.275521]  kasan_report+0x141/0x180
[   12.275541]  ? kmalloc_oob_16+0x452/0x4a0
[   12.275565]  __asan_report_store16_noabort+0x1b/0x30
[   12.275588]  kmalloc_oob_16+0x452/0x4a0
[   12.275608]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   12.275629]  ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[   12.275653]  ? __pfx_read_tsc+0x10/0x10
[   12.275672]  ? ktime_get_ts64+0x86/0x230
[   12.275705]  kunit_try_run_case+0x1a5/0x480
[   12.275727]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.275748]  ? _raw_spin_lock_irqsave+0xf9/0x100
[   12.275769]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.275790]  ? __kthread_parkme+0x82/0x180
[   12.275809]  ? preempt_count_sub+0x50/0x80
[   12.275831]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.275853]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.275876]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.275897]  kthread+0x337/0x6f0
[   12.275929]  ? trace_preempt_on+0x20/0xc0
[   12.275950]  ? __pfx_kthread+0x10/0x10
[   12.275969]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.275989]  ? calculate_sigpending+0x7b/0xa0
[   12.276011]  ? __pfx_kthread+0x10/0x10
[   12.276031]  ret_from_fork+0x116/0x1d0
[   12.276048]  ? __pfx_kthread+0x10/0x10
[   12.276067]  ret_from_fork_asm+0x1a/0x30
[   12.276096]  </TASK>
[   12.276106] 
[   12.283347] Allocated by task 183:
[   12.283511]  kasan_save_stack+0x45/0x70
[   12.283736]  kasan_save_track+0x18/0x40
[   12.283891]  kasan_save_alloc_info+0x3b/0x50
[   12.284051]  __kasan_kmalloc+0xb7/0xc0
[   12.284182]  __kmalloc_cache_noprof+0x189/0x420
[   12.284349]  kmalloc_oob_16+0xa8/0x4a0
[   12.284573]  kunit_try_run_case+0x1a5/0x480
[   12.284870]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.285129]  kthread+0x337/0x6f0
[   12.285297]  ret_from_fork+0x116/0x1d0
[   12.285477]  ret_from_fork_asm+0x1a/0x30
[   12.285620] 
[   12.285691] The buggy address belongs to the object at ffff888101d1f4e0
[   12.285691]  which belongs to the cache kmalloc-16 of size 16
[   12.286110] The buggy address is located 0 bytes inside of
[   12.286110]  allocated 13-byte region [ffff888101d1f4e0, ffff888101d1f4ed)
[   12.286676] 
[   12.286966] The buggy address belongs to the physical page:
[   12.287207] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101d1f
[   12.288554] flags: 0x200000000000000(node=0|zone=2)
[   12.288866] page_type: f5(slab)
[   12.289006] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.289301] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.290169] page dumped because: kasan: bad access detected
[   12.290707] 
[   12.290820] Memory state around the buggy address:
[   12.291275]  ffff888101d1f380: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc
[   12.291736]  ffff888101d1f400: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc
[   12.292275] >ffff888101d1f480: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   12.292778]                                                           ^
[   12.293068]  ffff888101d1f500: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.293657]  ffff888101d1f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.294259] ==================================================================