Hay
Date
July 9, 2025, 1:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   29.414584] ==================================================================
[   29.414643] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   29.414696] Write of size 16 at addr fff00000c5998069 by task kunit_try_catch/210
[   29.414743] 
[   29.414774] CPU: 0 UID: 0 PID: 210 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250709 #1 PREEMPT 
[   29.414857] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.414882] Hardware name: linux,dummy-virt (DT)
[   29.414912] Call trace:
[   29.414935]  show_stack+0x20/0x38 (C)
[   29.414981]  dump_stack_lvl+0x8c/0xd0
[   29.415026]  print_report+0x118/0x5d0
[   29.415270]  kasan_report+0xdc/0x128
[   29.415339]  kasan_check_range+0x100/0x1a8
[   29.415388]  __asan_memset+0x34/0x78
[   29.415430]  kmalloc_oob_memset_16+0x150/0x2f8
[   29.415483]  kunit_try_run_case+0x170/0x3f0
[   29.415569]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.415656]  kthread+0x328/0x630
[   29.415774]  ret_from_fork+0x10/0x20
[   29.415833] 
[   29.415903] Allocated by task 210:
[   29.415931]  kasan_save_stack+0x3c/0x68
[   29.415972]  kasan_save_track+0x20/0x40
[   29.416009]  kasan_save_alloc_info+0x40/0x58
[   29.416045]  __kasan_kmalloc+0xd4/0xd8
[   29.416093]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.416254]  kmalloc_oob_memset_16+0xb0/0x2f8
[   29.416296]  kunit_try_run_case+0x170/0x3f0
[   29.416380]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.416458]  kthread+0x328/0x630
[   29.416590]  ret_from_fork+0x10/0x20
[   29.416626] 
[   29.416657] The buggy address belongs to the object at fff00000c5998000
[   29.416657]  which belongs to the cache kmalloc-128 of size 128
[   29.416929] The buggy address is located 105 bytes inside of
[   29.416929]  allocated 120-byte region [fff00000c5998000, fff00000c5998078)
[   29.417107] 
[   29.417131] The buggy address belongs to the physical page:
[   29.417177] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105998
[   29.417236] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.417336] page_type: f5(slab)
[   29.417434] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   29.417482] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.417522] page dumped because: kasan: bad access detected
[   29.417551] 
[   29.417569] Memory state around the buggy address:
[   29.417599]  fff00000c5997f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.417825]  fff00000c5997f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.417921] >fff00000c5998000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.417957]                                                                 ^
[   29.418017]  fff00000c5998080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.418100]  fff00000c5998100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.418208] ==================================================================

[   24.258780] ==================================================================
[   24.259274] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   24.259850] Write of size 16 at addr ffff8881058c1769 by task kunit_try_catch/228
[   24.260219] 
[   24.260344] CPU: 0 UID: 0 PID: 228 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) 
[   24.260399] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   24.260423] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.260446] Call Trace:
[   24.260459]  <TASK>
[   24.260479]  dump_stack_lvl+0x73/0xb0
[   24.260514]  print_report+0xd1/0x610
[   24.260538]  ? __virt_addr_valid+0x1db/0x2d0
[   24.260573]  ? kmalloc_oob_memset_16+0x166/0x330
[   24.260596]  ? kasan_complete_mode_report_info+0x2a/0x200
[   24.260621]  ? kmalloc_oob_memset_16+0x166/0x330
[   24.260653]  kasan_report+0x141/0x180
[   24.260675]  ? kmalloc_oob_memset_16+0x166/0x330
[   24.260711]  kasan_check_range+0x10c/0x1c0
[   24.260735]  __asan_memset+0x27/0x50
[   24.260758]  kmalloc_oob_memset_16+0x166/0x330
[   24.260790]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   24.260812]  ? __schedule+0x10cc/0x2b60
[   24.260846]  ? __pfx_read_tsc+0x10/0x10
[   24.260869]  ? ktime_get_ts64+0x86/0x230
[   24.260905]  kunit_try_run_case+0x1a5/0x480
[   24.260940]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.260960]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.260983]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.261006]  ? __kthread_parkme+0x82/0x180
[   24.261027]  ? preempt_count_sub+0x50/0x80
[   24.261050]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.261071]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.261142]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.261182]  kthread+0x337/0x6f0
[   24.261204]  ? trace_preempt_on+0x20/0xc0
[   24.261228]  ? __pfx_kthread+0x10/0x10
[   24.261249]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.261271]  ? calculate_sigpending+0x7b/0xa0
[   24.261295]  ? __pfx_kthread+0x10/0x10
[   24.261317]  ret_from_fork+0x116/0x1d0
[   24.261336]  ? __pfx_kthread+0x10/0x10
[   24.261356]  ret_from_fork_asm+0x1a/0x30
[   24.261387]  </TASK>
[   24.261400] 
[   24.269300] Allocated by task 228:
[   24.269477]  kasan_save_stack+0x45/0x70
[   24.269680]  kasan_save_track+0x18/0x40
[   24.269963]  kasan_save_alloc_info+0x3b/0x50
[   24.270113]  __kasan_kmalloc+0xb7/0xc0
[   24.270237]  __kmalloc_cache_noprof+0x189/0x420
[   24.270445]  kmalloc_oob_memset_16+0xac/0x330
[   24.270711]  kunit_try_run_case+0x1a5/0x480
[   24.270996]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.271166]  kthread+0x337/0x6f0
[   24.271450]  ret_from_fork+0x116/0x1d0
[   24.271849]  ret_from_fork_asm+0x1a/0x30
[   24.272312] 
[   24.272390] The buggy address belongs to the object at ffff8881058c1700
[   24.272390]  which belongs to the cache kmalloc-128 of size 128
[   24.272769] The buggy address is located 105 bytes inside of
[   24.272769]  allocated 120-byte region [ffff8881058c1700, ffff8881058c1778)
[   24.273293] 
[   24.273405] The buggy address belongs to the physical page:
[   24.273573] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058c1
[   24.273820] flags: 0x200000000000000(node=0|zone=2)
[   24.274096] page_type: f5(slab)
[   24.274272] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   24.274644] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   24.275085] page dumped because: kasan: bad access detected
[   24.275373] 
[   24.275471] Memory state around the buggy address:
[   24.275691]  ffff8881058c1600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   24.276157]  ffff8881058c1680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.276375] >ffff8881058c1700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   24.276678]                                                                 ^
[   24.277193]  ffff8881058c1780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.277493]  ffff8881058c1800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.277713] ==================================================================