Hay
Date
July 19, 2025, 11:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.176804] ==================================================================
[   15.176870] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   15.176922] Write of size 16 at addr fff00000c5eb7bc0 by task kunit_try_catch/166
[   15.176979] 
[   15.177127] CPU: 1 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.177309] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.177442] Hardware name: linux,dummy-virt (DT)
[   15.177475] Call trace:
[   15.177497]  show_stack+0x20/0x38 (C)
[   15.177553]  dump_stack_lvl+0x8c/0xd0
[   15.178179]  print_report+0x118/0x5d0
[   15.178696]  kasan_report+0xdc/0x128
[   15.178745]  __asan_report_store16_noabort+0x20/0x30
[   15.178796]  kmalloc_oob_16+0x3a0/0x3f8
[   15.178839]  kunit_try_run_case+0x170/0x3f0
[   15.178918]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.178971]  kthread+0x328/0x630
[   15.179073]  ret_from_fork+0x10/0x20
[   15.179120] 
[   15.179138] Allocated by task 166:
[   15.179166]  kasan_save_stack+0x3c/0x68
[   15.179259]  kasan_save_track+0x20/0x40
[   15.179296]  kasan_save_alloc_info+0x40/0x58
[   15.179588]  __kasan_kmalloc+0xd4/0xd8
[   15.179630]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.179667]  kmalloc_oob_16+0xb4/0x3f8
[   15.179710]  kunit_try_run_case+0x170/0x3f0
[   15.179746]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.179820]  kthread+0x328/0x630
[   15.179919]  ret_from_fork+0x10/0x20
[   15.179988] 
[   15.180051] The buggy address belongs to the object at fff00000c5eb7bc0
[   15.180051]  which belongs to the cache kmalloc-16 of size 16
[   15.180141] The buggy address is located 0 bytes inside of
[   15.180141]  allocated 13-byte region [fff00000c5eb7bc0, fff00000c5eb7bcd)
[   15.180201] 
[   15.180221] The buggy address belongs to the physical page:
[   15.180251] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105eb7
[   15.180302] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.180392] page_type: f5(slab)
[   15.180431] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.180492] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.180532] page dumped because: kasan: bad access detected
[   15.180563] 
[   15.180609] Memory state around the buggy address:
[   15.180645]  fff00000c5eb7a80: fa fb fc fc fa fb fc fc 00 01 fc fc 00 01 fc fc
[   15.180762]  fff00000c5eb7b00: fa fb fc fc 00 01 fc fc 00 01 fc fc fa fb fc fc
[   15.180881] >fff00000c5eb7b80: fa fb fc fc fa fb fc fc 00 05 fc fc 00 00 fc fc
[   15.181006]                                               ^
[   15.181095]  fff00000c5eb7c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.181181]  fff00000c5eb7c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.181218] ==================================================================

[   12.011062] ==================================================================
[   12.011636] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   12.012145] Write of size 16 at addr ffff888101df6ce0 by task kunit_try_catch/183
[   12.012585] 
[   12.012944] CPU: 1 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.012999] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.013020] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.013042] Call Trace:
[   12.013053]  <TASK>
[   12.013069]  dump_stack_lvl+0x73/0xb0
[   12.013100]  print_report+0xd1/0x610
[   12.013123]  ? __virt_addr_valid+0x1db/0x2d0
[   12.013146]  ? kmalloc_oob_16+0x452/0x4a0
[   12.013166]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.013186]  ? kmalloc_oob_16+0x452/0x4a0
[   12.013206]  kasan_report+0x141/0x180
[   12.013227]  ? kmalloc_oob_16+0x452/0x4a0
[   12.013252]  __asan_report_store16_noabort+0x1b/0x30
[   12.013276]  kmalloc_oob_16+0x452/0x4a0
[   12.013296]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   12.013316]  ? __schedule+0x10cc/0x2b60
[   12.013338]  ? __pfx_read_tsc+0x10/0x10
[   12.013359]  ? ktime_get_ts64+0x86/0x230
[   12.013383]  kunit_try_run_case+0x1a5/0x480
[   12.013407]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.013429]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.013461]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.013482]  ? __kthread_parkme+0x82/0x180
[   12.013502]  ? preempt_count_sub+0x50/0x80
[   12.013525]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.013548]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.013570]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.013592]  kthread+0x337/0x6f0
[   12.013610]  ? trace_preempt_on+0x20/0xc0
[   12.013632]  ? __pfx_kthread+0x10/0x10
[   12.013652]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.013671]  ? calculate_sigpending+0x7b/0xa0
[   12.013695]  ? __pfx_kthread+0x10/0x10
[   12.013715]  ret_from_fork+0x116/0x1d0
[   12.013732]  ? __pfx_kthread+0x10/0x10
[   12.013751]  ret_from_fork_asm+0x1a/0x30
[   12.013781]  </TASK>
[   12.013791] 
[   12.024240] Allocated by task 183:
[   12.024394]  kasan_save_stack+0x45/0x70
[   12.024605]  kasan_save_track+0x18/0x40
[   12.025300]  kasan_save_alloc_info+0x3b/0x50
[   12.025464]  __kasan_kmalloc+0xb7/0xc0
[   12.026025]  __kmalloc_cache_noprof+0x189/0x420
[   12.026425]  kmalloc_oob_16+0xa8/0x4a0
[   12.026627]  kunit_try_run_case+0x1a5/0x480
[   12.026825]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.027075]  kthread+0x337/0x6f0
[   12.027231]  ret_from_fork+0x116/0x1d0
[   12.027407]  ret_from_fork_asm+0x1a/0x30
[   12.027979] 
[   12.028074] The buggy address belongs to the object at ffff888101df6ce0
[   12.028074]  which belongs to the cache kmalloc-16 of size 16
[   12.028917] The buggy address is located 0 bytes inside of
[   12.028917]  allocated 13-byte region [ffff888101df6ce0, ffff888101df6ced)
[   12.029708] 
[   12.029820] The buggy address belongs to the physical page:
[   12.030042] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101df6
[   12.030821] flags: 0x200000000000000(node=0|zone=2)
[   12.031020] page_type: f5(slab)
[   12.031577] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.031891] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.032451] page dumped because: kasan: bad access detected
[   12.032829] 
[   12.032954] Memory state around the buggy address:
[   12.033429]  ffff888101df6b80: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc
[   12.033908]  ffff888101df6c00: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc
[   12.034254] >ffff888101df6c80: fa fb fc fc fa fb fc fc 00 05 fc fc 00 05 fc fc
[   12.034812]                                                           ^
[   12.035115]  ffff888101df6d00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.035687]  ffff888101df6d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.036120] ==================================================================