Hay
Date
July 10, 2025, 9:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   29.449947] ==================================================================
[   29.450019] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   29.450110] Write of size 16 at addr fff00000c8686a80 by task kunit_try_catch/197
[   29.450280] 
[   29.450399] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT 
[   29.450675] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.450740] Hardware name: linux,dummy-virt (DT)
[   29.450822] Call trace:
[   29.450843]  show_stack+0x20/0x38 (C)
[   29.450892]  dump_stack_lvl+0x8c/0xd0
[   29.451055]  print_report+0x118/0x5d0
[   29.451100]  kasan_report+0xdc/0x128
[   29.451162]  __asan_report_store16_noabort+0x20/0x30
[   29.451211]  kmalloc_oob_16+0x3a0/0x3f8
[   29.451364]  kunit_try_run_case+0x170/0x3f0
[   29.451508]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.451562]  kthread+0x328/0x630
[   29.451648]  ret_from_fork+0x10/0x20
[   29.451704] 
[   29.451760] Allocated by task 197:
[   29.451788]  kasan_save_stack+0x3c/0x68
[   29.451855]  kasan_save_track+0x20/0x40
[   29.452034]  kasan_save_alloc_info+0x40/0x58
[   29.452164]  __kasan_kmalloc+0xd4/0xd8
[   29.452201]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.452240]  kmalloc_oob_16+0xb4/0x3f8
[   29.452275]  kunit_try_run_case+0x170/0x3f0
[   29.452322]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.452366]  kthread+0x328/0x630
[   29.452483]  ret_from_fork+0x10/0x20
[   29.452519] 
[   29.452538] The buggy address belongs to the object at fff00000c8686a80
[   29.452538]  which belongs to the cache kmalloc-16 of size 16
[   29.452596] The buggy address is located 0 bytes inside of
[   29.452596]  allocated 13-byte region [fff00000c8686a80, fff00000c8686a8d)
[   29.452789] 
[   29.452812] The buggy address belongs to the physical page:
[   29.452843] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xfff00000c8686a40 pfn:0x108686
[   29.452966] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.453015] page_type: f5(slab)
[   29.453054] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   29.453105] raw: fff00000c8686a40 000000008080007f 00000000f5000000 0000000000000000
[   29.453165] page dumped because: kasan: bad access detected
[   29.453280] 
[   29.453329] Memory state around the buggy address:
[   29.453359]  fff00000c8686980: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   29.453520]  fff00000c8686a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   29.453581] >fff00000c8686a80: 00 05 fc fc 00 00 fc fc fc fc fc fc fc fc fc fc
[   29.453619]                       ^
[   29.453684]  fff00000c8686b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.453946]  fff00000c8686b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.453986] ==================================================================

[   25.014614] ==================================================================
[   25.016453] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   25.017425] Write of size 16 at addr ffff888103cd6700 by task kunit_try_catch/214
[   25.018439] 
[   25.018930] CPU: 1 UID: 0 PID: 214 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT(voluntary) 
[   25.019024] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.019037] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.019060] Call Trace:
[   25.019075]  <TASK>
[   25.019095]  dump_stack_lvl+0x73/0xb0
[   25.019126]  print_report+0xd1/0x610
[   25.019151]  ? __virt_addr_valid+0x1db/0x2d0
[   25.019176]  ? kmalloc_oob_16+0x452/0x4a0
[   25.019196]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.019221]  ? kmalloc_oob_16+0x452/0x4a0
[   25.019241]  kasan_report+0x141/0x180
[   25.019364]  ? kmalloc_oob_16+0x452/0x4a0
[   25.019389]  __asan_report_store16_noabort+0x1b/0x30
[   25.019413]  kmalloc_oob_16+0x452/0x4a0
[   25.019433]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   25.019455]  ? __schedule+0x10cc/0x2b60
[   25.019478]  ? __pfx_read_tsc+0x10/0x10
[   25.019509]  ? ktime_get_ts64+0x86/0x230
[   25.019533]  kunit_try_run_case+0x1a5/0x480
[   25.019555]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.019575]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.019598]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.019620]  ? __kthread_parkme+0x82/0x180
[   25.019641]  ? preempt_count_sub+0x50/0x80
[   25.019665]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.019686]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.019723]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.019747]  kthread+0x337/0x6f0
[   25.019766]  ? trace_preempt_on+0x20/0xc0
[   25.019805]  ? __pfx_kthread+0x10/0x10
[   25.019826]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.019852]  ? calculate_sigpending+0x7b/0xa0
[   25.019876]  ? __pfx_kthread+0x10/0x10
[   25.019897]  ret_from_fork+0x116/0x1d0
[   25.019916]  ? __pfx_kthread+0x10/0x10
[   25.019936]  ret_from_fork_asm+0x1a/0x30
[   25.019966]  </TASK>
[   25.019978] 
[   25.030573] Allocated by task 214:
[   25.030803]  kasan_save_stack+0x45/0x70
[   25.031210]  kasan_save_track+0x18/0x40
[   25.031386]  kasan_save_alloc_info+0x3b/0x50
[   25.031543]  __kasan_kmalloc+0xb7/0xc0
[   25.031978]  __kmalloc_cache_noprof+0x189/0x420
[   25.032286]  kmalloc_oob_16+0xa8/0x4a0
[   25.032473]  kunit_try_run_case+0x1a5/0x480
[   25.033001]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.033283]  kthread+0x337/0x6f0
[   25.033585]  ret_from_fork+0x116/0x1d0
[   25.033872]  ret_from_fork_asm+0x1a/0x30
[   25.034177] 
[   25.034295] The buggy address belongs to the object at ffff888103cd6700
[   25.034295]  which belongs to the cache kmalloc-16 of size 16
[   25.035103] The buggy address is located 0 bytes inside of
[   25.035103]  allocated 13-byte region [ffff888103cd6700, ffff888103cd670d)
[   25.035944] 
[   25.036044] The buggy address belongs to the physical page:
[   25.036272] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103cd6
[   25.036908] flags: 0x200000000000000(node=0|zone=2)
[   25.037255] page_type: f5(slab)
[   25.037443] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122
[   25.037985] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   25.038315] page dumped because: kasan: bad access detected
[   25.038797] 
[   25.039050] Memory state around the buggy address:
[   25.039342]  ffff888103cd6600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   25.039789]  ffff888103cd6680: fa fb fc fc 00 06 fc fc 00 06 fc fc 00 06 fc fc
[   25.040135] >ffff888103cd6700: 00 05 fc fc 00 00 fc fc fc fc fc fc fc fc fc fc
[   25.040440]                       ^
[   25.040921]  ffff888103cd6780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.041206]  ffff888103cd6800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.041503] ==================================================================