Hay
Date
June 5, 2025, 7:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   25.121370] ==================================================================
[   25.121519] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   25.121695] Write of size 16 at addr fff00000c3fa5860 by task kunit_try_catch/166
[   25.121828] 
[   25.121909] CPU: 0 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250605 #1 PREEMPT 
[   25.122107] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.122187] Hardware name: linux,dummy-virt (DT)
[   25.122408] Call trace:
[   25.122609]  show_stack+0x20/0x38 (C)
[   25.122840]  dump_stack_lvl+0x8c/0xd0
[   25.122965]  print_report+0x118/0x608
[   25.123101]  kasan_report+0xdc/0x128
[   25.123285]  __asan_report_store16_noabort+0x20/0x30
[   25.123488]  kmalloc_oob_16+0x3a0/0x3f8
[   25.123611]  kunit_try_run_case+0x170/0x3f0
[   25.123738]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.123886]  kthread+0x328/0x630
[   25.124176]  ret_from_fork+0x10/0x20
[   25.124394] 
[   25.124467] Allocated by task 166:
[   25.124577]  kasan_save_stack+0x3c/0x68
[   25.124697]  kasan_save_track+0x20/0x40
[   25.124878]  kasan_save_alloc_info+0x40/0x58
[   25.125042]  __kasan_kmalloc+0xd4/0xd8
[   25.125224]  __kmalloc_cache_noprof+0x16c/0x3c0
[   25.125466]  kmalloc_oob_16+0xb4/0x3f8
[   25.125628]  kunit_try_run_case+0x170/0x3f0
[   25.125890]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.126174]  kthread+0x328/0x630
[   25.126261]  ret_from_fork+0x10/0x20
[   25.126400] 
[   25.126538] The buggy address belongs to the object at fff00000c3fa5860
[   25.126538]  which belongs to the cache kmalloc-16 of size 16
[   25.126723] The buggy address is located 0 bytes inside of
[   25.126723]  allocated 13-byte region [fff00000c3fa5860, fff00000c3fa586d)
[   25.126966] 
[   25.127077] The buggy address belongs to the physical page:
[   25.127179] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103fa5
[   25.127881] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   25.128100] page_type: f5(slab)
[   25.128198] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   25.129152] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   25.129261] page dumped because: kasan: bad access detected
[   25.129360] 
[   25.129465] Memory state around the buggy address:
[   25.129559]  fff00000c3fa5700: 00 05 fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
[   25.129645]  fff00000c3fa5780: fa fb fc fc fa fb fc fc fa fb fc fc 00 02 fc fc
[   25.129729] >fff00000c3fa5800: 00 02 fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   25.129782]                                                           ^
[   25.129831]  fff00000c3fa5880: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.129883]  fff00000c3fa5900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.129928] ==================================================================


[   11.387040] ==================================================================
[   11.387504] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   11.387831] Write of size 16 at addr ffff888102ae90e0 by task kunit_try_catch/183
[   11.388152] 
[   11.388267] CPU: 0 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250605 #1 PREEMPT(voluntary) 
[   11.388313] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.388324] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.388345] Call Trace:
[   11.388356]  <TASK>
[   11.388371]  dump_stack_lvl+0x73/0xb0
[   11.388398]  print_report+0xd1/0x650
[   11.388419]  ? __virt_addr_valid+0x1db/0x2d0
[   11.388443]  ? kmalloc_oob_16+0x452/0x4a0
[   11.388463]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.388485]  ? kmalloc_oob_16+0x452/0x4a0
[   11.388505]  kasan_report+0x141/0x180
[   11.388526]  ? kmalloc_oob_16+0x452/0x4a0
[   11.388551]  __asan_report_store16_noabort+0x1b/0x30
[   11.388572]  kmalloc_oob_16+0x452/0x4a0
[   11.388593]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   11.388614]  ? __schedule+0x10cc/0x2b60
[   11.388637]  ? __pfx_read_tsc+0x10/0x10
[   11.388658]  ? ktime_get_ts64+0x86/0x230
[   11.388682]  kunit_try_run_case+0x1a5/0x480
[   11.388703]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.388721]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.388746]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.388769]  ? __kthread_parkme+0x82/0x180
[   11.388790]  ? preempt_count_sub+0x50/0x80
[   11.388813]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.388834]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.389215]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.389249]  kthread+0x337/0x6f0
[   11.389269]  ? trace_preempt_on+0x20/0xc0
[   11.389293]  ? __pfx_kthread+0x10/0x10
[   11.389312]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.389335]  ? calculate_sigpending+0x7b/0xa0
[   11.389360]  ? __pfx_kthread+0x10/0x10
[   11.389381]  ret_from_fork+0x116/0x1d0
[   11.389399]  ? __pfx_kthread+0x10/0x10
[   11.389418]  ret_from_fork_asm+0x1a/0x30
[   11.389448]  </TASK>
[   11.389459] 
[   11.397052] Allocated by task 183:
[   11.397221]  kasan_save_stack+0x45/0x70
[   11.397398]  kasan_save_track+0x18/0x40
[   11.397575]  kasan_save_alloc_info+0x3b/0x50
[   11.397855]  __kasan_kmalloc+0xb7/0xc0
[   11.398001]  __kmalloc_cache_noprof+0x189/0x420
[   11.398159]  kmalloc_oob_16+0xa8/0x4a0
[   11.398364]  kunit_try_run_case+0x1a5/0x480
[   11.398627]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.399030]  kthread+0x337/0x6f0
[   11.399155]  ret_from_fork+0x116/0x1d0
[   11.399285]  ret_from_fork_asm+0x1a/0x30
[   11.400819] 
[   11.401839] The buggy address belongs to the object at ffff888102ae90e0
[   11.401839]  which belongs to the cache kmalloc-16 of size 16
[   11.404789] The buggy address is located 0 bytes inside of
[   11.404789]  allocated 13-byte region [ffff888102ae90e0, ffff888102ae90ed)
[   11.406784] 
[   11.406871] The buggy address belongs to the physical page:
[   11.407063] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ae9
[   11.408757] flags: 0x200000000000000(node=0|zone=2)
[   11.409131] page_type: f5(slab)
[   11.409837] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.410938] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.411528] page dumped because: kasan: bad access detected
[   11.412243] 
[   11.412398] Memory state around the buggy address:
[   11.413083]  ffff888102ae8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.413726]  ffff888102ae9000: 00 02 fc fc 00 02 fc fc fa fb fc fc fa fb fc fc
[   11.413973] >ffff888102ae9080: fa fb fc fc 00 05 fc fc fa fb fc fc 00 05 fc fc
[   11.414189]                                                           ^
[   11.414390]  ffff888102ae9100: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.414610]  ffff888102ae9180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.414825] ==================================================================