Hay
Date
July 1, 2025, 12:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.389877] ==================================================================
[   17.389949] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   17.390003] Write of size 16 at addr fff00000c4551820 by task kunit_try_catch/166
[   17.390737] 
[   17.390820] CPU: 1 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.391193] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.391306] Hardware name: linux,dummy-virt (DT)
[   17.391339] Call trace:
[   17.391929]  show_stack+0x20/0x38 (C)
[   17.392214]  dump_stack_lvl+0x8c/0xd0
[   17.392285]  print_report+0x118/0x608
[   17.392724]  kasan_report+0xdc/0x128
[   17.393144]  __asan_report_store16_noabort+0x20/0x30
[   17.393485]  kmalloc_oob_16+0x3a0/0x3f8
[   17.394054]  kunit_try_run_case+0x170/0x3f0
[   17.394114]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.394166]  kthread+0x328/0x630
[   17.394219]  ret_from_fork+0x10/0x20
[   17.394300] 
[   17.394319] Allocated by task 166:
[   17.394348]  kasan_save_stack+0x3c/0x68
[   17.394387]  kasan_save_track+0x20/0x40
[   17.394429]  kasan_save_alloc_info+0x40/0x58
[   17.394478]  __kasan_kmalloc+0xd4/0xd8
[   17.394512]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.394561]  kmalloc_oob_16+0xb4/0x3f8
[   17.394604]  kunit_try_run_case+0x170/0x3f0
[   17.394640]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.394682]  kthread+0x328/0x630
[   17.394713]  ret_from_fork+0x10/0x20
[   17.394765] 
[   17.394785] The buggy address belongs to the object at fff00000c4551820
[   17.394785]  which belongs to the cache kmalloc-16 of size 16
[   17.394852] The buggy address is located 0 bytes inside of
[   17.394852]  allocated 13-byte region [fff00000c4551820, fff00000c455182d)
[   17.394915] 
[   17.394934] The buggy address belongs to the physical page:
[   17.395468] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104551
[   17.395920] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.396201] page_type: f5(slab)
[   17.396525] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   17.396881] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   17.396983] page dumped because: kasan: bad access detected
[   17.397108] 
[   17.397469] Memory state around the buggy address:
[   17.397526]  fff00000c4551700: 00 07 fc fc fa fb fc fc fa fb fc fc 00 04 fc fc
[   17.397691]  fff00000c4551780: fa fb fc fc fa fb fc fc 00 05 fc fc fa fb fc fc
[   17.397743] >fff00000c4551800: fa fb fc fc 00 05 fc fc 00 00 fc fc fc fc fc fc
[   17.397942]                                   ^
[   17.398269]  fff00000c4551880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.398625]  fff00000c4551900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.398678] ==================================================================

[   11.465156] ==================================================================
[   11.465852] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   11.466371] Write of size 16 at addr ffff888101638ee0 by task kunit_try_catch/183
[   11.466700] 
[   11.466834] CPU: 1 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.466878] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.466890] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.466921] Call Trace:
[   11.466934]  <TASK>
[   11.466949]  dump_stack_lvl+0x73/0xb0
[   11.466984]  print_report+0xd1/0x650
[   11.467005]  ? __virt_addr_valid+0x1db/0x2d0
[   11.467045]  ? kmalloc_oob_16+0x452/0x4a0
[   11.467065]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.467085]  ? kmalloc_oob_16+0x452/0x4a0
[   11.467105]  kasan_report+0x141/0x180
[   11.467126]  ? kmalloc_oob_16+0x452/0x4a0
[   11.467150]  __asan_report_store16_noabort+0x1b/0x30
[   11.467169]  kmalloc_oob_16+0x452/0x4a0
[   11.467189]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   11.467210]  ? __schedule+0x10cc/0x2b60
[   11.467230]  ? __pfx_read_tsc+0x10/0x10
[   11.467250]  ? ktime_get_ts64+0x86/0x230
[   11.467272]  kunit_try_run_case+0x1a5/0x480
[   11.467390]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.467414]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.467437]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.467458]  ? __kthread_parkme+0x82/0x180
[   11.467492]  ? preempt_count_sub+0x50/0x80
[   11.467514]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.467536]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.467568]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.467590]  kthread+0x337/0x6f0
[   11.467608]  ? trace_preempt_on+0x20/0xc0
[   11.467629]  ? __pfx_kthread+0x10/0x10
[   11.467649]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.467669]  ? calculate_sigpending+0x7b/0xa0
[   11.467691]  ? __pfx_kthread+0x10/0x10
[   11.467711]  ret_from_fork+0x116/0x1d0
[   11.467728]  ? __pfx_kthread+0x10/0x10
[   11.467747]  ret_from_fork_asm+0x1a/0x30
[   11.467777]  </TASK>
[   11.467788] 
[   11.475692] Allocated by task 183:
[   11.475893]  kasan_save_stack+0x45/0x70
[   11.476227]  kasan_save_track+0x18/0x40
[   11.476415]  kasan_save_alloc_info+0x3b/0x50
[   11.476653]  __kasan_kmalloc+0xb7/0xc0
[   11.476826]  __kmalloc_cache_noprof+0x189/0x420
[   11.477222]  kmalloc_oob_16+0xa8/0x4a0
[   11.477426]  kunit_try_run_case+0x1a5/0x480
[   11.477668]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.477886]  kthread+0x337/0x6f0
[   11.478160]  ret_from_fork+0x116/0x1d0
[   11.478349]  ret_from_fork_asm+0x1a/0x30
[   11.478532] 
[   11.478605] The buggy address belongs to the object at ffff888101638ee0
[   11.478605]  which belongs to the cache kmalloc-16 of size 16
[   11.479248] The buggy address is located 0 bytes inside of
[   11.479248]  allocated 13-byte region [ffff888101638ee0, ffff888101638eed)
[   11.479757] 
[   11.479830] The buggy address belongs to the physical page:
[   11.480001] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101638
[   11.480361] flags: 0x200000000000000(node=0|zone=2)
[   11.480595] page_type: f5(slab)
[   11.480762] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.481005] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.481307] page dumped because: kasan: bad access detected
[   11.481562] 
[   11.481657] Memory state around the buggy address:
[   11.481882]  ffff888101638d80: fa fb fc fc 00 05 fc fc 00 05 fc fc 00 00 fc fc
[   11.482399]  ffff888101638e00: 00 06 fc fc 00 06 fc fc 00 00 fc fc fa fb fc fc
[   11.482715] >ffff888101638e80: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   11.483121]                                                           ^
[   11.483434]  ffff888101638f00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.483652]  ffff888101638f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.483978] ==================================================================