Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.368463] ==================================================================
[   18.368757] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   18.368856] Write of size 16 at addr fff00000c5d4d9c0 by task kunit_try_catch/167
[   18.368965] 
[   18.369012] CPU: 1 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.369103] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.369147] Hardware name: linux,dummy-virt (DT)
[   18.369216] Call trace:
[   18.369351]  show_stack+0x20/0x38 (C)
[   18.369412]  dump_stack_lvl+0x8c/0xd0
[   18.369519]  print_report+0x118/0x608
[   18.369589]  kasan_report+0xdc/0x128
[   18.369659]  __asan_report_store16_noabort+0x20/0x30
[   18.369712]  kmalloc_oob_16+0x3a0/0x3f8
[   18.369761]  kunit_try_run_case+0x170/0x3f0
[   18.369844]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.369951]  kthread+0x328/0x630
[   18.369998]  ret_from_fork+0x10/0x20
[   18.370058] 
[   18.370080] Allocated by task 167:
[   18.370111]  kasan_save_stack+0x3c/0x68
[   18.370282]  kasan_save_track+0x20/0x40
[   18.370422]  kasan_save_alloc_info+0x40/0x58
[   18.370475]  __kasan_kmalloc+0xd4/0xd8
[   18.370542]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.370628]  kmalloc_oob_16+0xb4/0x3f8
[   18.370666]  kunit_try_run_case+0x170/0x3f0
[   18.370706]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.370752]  kthread+0x328/0x630
[   18.370820]  ret_from_fork+0x10/0x20
[   18.370859] 
[   18.370881] The buggy address belongs to the object at fff00000c5d4d9c0
[   18.370881]  which belongs to the cache kmalloc-16 of size 16
[   18.371074] The buggy address is located 0 bytes inside of
[   18.371074]  allocated 13-byte region [fff00000c5d4d9c0, fff00000c5d4d9cd)
[   18.371384] 
[   18.371471] The buggy address belongs to the physical page:
[   18.371605] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105d4d
[   18.371680] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.371738] page_type: f5(slab)
[   18.371912] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   18.371974] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   18.372019] page dumped because: kasan: bad access detected
[   18.372052] 
[   18.372070] Memory state around the buggy address:
[   18.372255]  fff00000c5d4d880: 00 05 fc fc fa fb fc fc 00 02 fc fc fa fb fc fc
[   18.372337]  fff00000c5d4d900: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   18.372425] >fff00000c5d4d980: 00 04 fc fc fa fb fc fc 00 05 fc fc 00 00 fc fc
[   18.372466]                                               ^
[   18.372678]  fff00000c5d4da00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.372860]  fff00000c5d4da80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.372991] ==================================================================

[   11.528771] ==================================================================
[   11.529294] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   11.529631] Write of size 16 at addr ffff88810228a800 by task kunit_try_catch/183
[   11.529949] 
[   11.530295] CPU: 1 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.530346] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.530358] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.530393] Call Trace:
[   11.530407]  <TASK>
[   11.530424]  dump_stack_lvl+0x73/0xb0
[   11.530454]  print_report+0xd1/0x650
[   11.530476]  ? __virt_addr_valid+0x1db/0x2d0
[   11.530499]  ? kmalloc_oob_16+0x452/0x4a0
[   11.530518]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.530538]  ? kmalloc_oob_16+0x452/0x4a0
[   11.530557]  kasan_report+0x141/0x180
[   11.530577]  ? kmalloc_oob_16+0x452/0x4a0
[   11.530601]  __asan_report_store16_noabort+0x1b/0x30
[   11.530621]  kmalloc_oob_16+0x452/0x4a0
[   11.530640]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   11.530661]  ? __schedule+0x10cc/0x2b60
[   11.530682]  ? __pfx_read_tsc+0x10/0x10
[   11.530703]  ? ktime_get_ts64+0x86/0x230
[   11.530729]  kunit_try_run_case+0x1a5/0x480
[   11.530753]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.530774]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.530797]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.530818]  ? __kthread_parkme+0x82/0x180
[   11.530838]  ? preempt_count_sub+0x50/0x80
[   11.530860]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.530883]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.530904]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.530985]  kthread+0x337/0x6f0
[   11.531006]  ? trace_preempt_on+0x20/0xc0
[   11.531030]  ? __pfx_kthread+0x10/0x10
[   11.531049]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.531070]  ? calculate_sigpending+0x7b/0xa0
[   11.531092]  ? __pfx_kthread+0x10/0x10
[   11.531112]  ret_from_fork+0x116/0x1d0
[   11.531129]  ? __pfx_kthread+0x10/0x10
[   11.531148]  ret_from_fork_asm+0x1a/0x30
[   11.531178]  </TASK>
[   11.531188] 
[   11.539203] Allocated by task 183:
[   11.539490]  kasan_save_stack+0x45/0x70
[   11.539701]  kasan_save_track+0x18/0x40
[   11.539879]  kasan_save_alloc_info+0x3b/0x50
[   11.540383]  __kasan_kmalloc+0xb7/0xc0
[   11.540553]  __kmalloc_cache_noprof+0x189/0x420
[   11.540772]  kmalloc_oob_16+0xa8/0x4a0
[   11.540904]  kunit_try_run_case+0x1a5/0x480
[   11.541129]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.541361]  kthread+0x337/0x6f0
[   11.541492]  ret_from_fork+0x116/0x1d0
[   11.541622]  ret_from_fork_asm+0x1a/0x30
[   11.541815] 
[   11.541910] The buggy address belongs to the object at ffff88810228a800
[   11.541910]  which belongs to the cache kmalloc-16 of size 16
[   11.542739] The buggy address is located 0 bytes inside of
[   11.542739]  allocated 13-byte region [ffff88810228a800, ffff88810228a80d)
[   11.543113] 
[   11.543186] The buggy address belongs to the physical page:
[   11.543453] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10228a
[   11.544132] flags: 0x200000000000000(node=0|zone=2)
[   11.544407] page_type: f5(slab)
[   11.544575] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.544846] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.545069] page dumped because: kasan: bad access detected
[   11.545304] 
[   11.545425] Memory state around the buggy address:
[   11.545741]  ffff88810228a700: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc
[   11.546022]  ffff88810228a780: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc
[   11.546240] >ffff88810228a800: 00 05 fc fc 00 00 fc fc fc fc fc fc fc fc fc fc
[   11.546506]                       ^
[   11.546803]  ffff88810228a880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.547114]  ffff88810228a900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.547448] ==================================================================