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

Environment
qemu-arm64
qemu-x86_64

[   29.393208] ==================================================================
[   29.394241] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   29.394788] Write of size 8 at addr fff00000c57d4f71 by task kunit_try_catch/208
[   29.394859] 
[   29.394891] CPU: 0 UID: 0 PID: 208 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250709 #1 PREEMPT 
[   29.395312] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.395426] Hardware name: linux,dummy-virt (DT)
[   29.395457] Call trace:
[   29.395590]  show_stack+0x20/0x38 (C)
[   29.395872]  dump_stack_lvl+0x8c/0xd0
[   29.396155]  print_report+0x118/0x5d0
[   29.396510]  kasan_report+0xdc/0x128
[   29.396618]  kasan_check_range+0x100/0x1a8
[   29.397161]  __asan_memset+0x34/0x78
[   29.397210]  kmalloc_oob_memset_8+0x150/0x2f8
[   29.397259]  kunit_try_run_case+0x170/0x3f0
[   29.397617]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.397754]  kthread+0x328/0x630
[   29.397821]  ret_from_fork+0x10/0x20
[   29.398087] 
[   29.398110] Allocated by task 208:
[   29.398280]  kasan_save_stack+0x3c/0x68
[   29.398418]  kasan_save_track+0x20/0x40
[   29.398557]  kasan_save_alloc_info+0x40/0x58
[   29.398594]  __kasan_kmalloc+0xd4/0xd8
[   29.398630]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.398670]  kmalloc_oob_memset_8+0xb0/0x2f8
[   29.398707]  kunit_try_run_case+0x170/0x3f0
[   29.398745]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.399834]  kthread+0x328/0x630
[   29.400009]  ret_from_fork+0x10/0x20
[   29.400260] 
[   29.400437] The buggy address belongs to the object at fff00000c57d4f00
[   29.400437]  which belongs to the cache kmalloc-128 of size 128
[   29.400518] The buggy address is located 113 bytes inside of
[   29.400518]  allocated 120-byte region [fff00000c57d4f00, fff00000c57d4f78)
[   29.400630] 
[   29.400795] The buggy address belongs to the physical page:
[   29.400984] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057d4
[   29.401269] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.401330] page_type: f5(slab)
[   29.401380] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   29.401429] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.401905] page dumped because: kasan: bad access detected
[   29.402206] 
[   29.402228] Memory state around the buggy address:
[   29.402260]  fff00000c57d4e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   29.402303]  fff00000c57d4e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.402816] >fff00000c57d4f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.403020]                                                                 ^
[   29.403077]  fff00000c57d4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.403441]  fff00000c57d5000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   29.403485] ==================================================================

[   24.232680] ==================================================================
[   24.233577] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   24.233940] Write of size 8 at addr ffff8881058c1671 by task kunit_try_catch/226
[   24.234333] 
[   24.234474] CPU: 0 UID: 0 PID: 226 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) 
[   24.234530] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   24.234543] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.234566] Call Trace:
[   24.234581]  <TASK>
[   24.234602]  dump_stack_lvl+0x73/0xb0
[   24.234636]  print_report+0xd1/0x610
[   24.234668]  ? __virt_addr_valid+0x1db/0x2d0
[   24.234712]  ? kmalloc_oob_memset_8+0x166/0x330
[   24.234733]  ? kasan_complete_mode_report_info+0x2a/0x200
[   24.234759]  ? kmalloc_oob_memset_8+0x166/0x330
[   24.234780]  kasan_report+0x141/0x180
[   24.234812]  ? kmalloc_oob_memset_8+0x166/0x330
[   24.234837]  kasan_check_range+0x10c/0x1c0
[   24.234859]  __asan_memset+0x27/0x50
[   24.234882]  kmalloc_oob_memset_8+0x166/0x330
[   24.234955]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   24.234977]  ? __schedule+0x10cc/0x2b60
[   24.235002]  ? __pfx_read_tsc+0x10/0x10
[   24.235043]  ? ktime_get_ts64+0x86/0x230
[   24.235069]  kunit_try_run_case+0x1a5/0x480
[   24.235093]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.235121]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.235144]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.235167]  ? __kthread_parkme+0x82/0x180
[   24.235199]  ? preempt_count_sub+0x50/0x80
[   24.235223]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.235245]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.235269]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.235293]  kthread+0x337/0x6f0
[   24.235312]  ? trace_preempt_on+0x20/0xc0
[   24.235336]  ? __pfx_kthread+0x10/0x10
[   24.235356]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.235378]  ? calculate_sigpending+0x7b/0xa0
[   24.235402]  ? __pfx_kthread+0x10/0x10
[   24.235422]  ret_from_fork+0x116/0x1d0
[   24.235441]  ? __pfx_kthread+0x10/0x10
[   24.235461]  ret_from_fork_asm+0x1a/0x30
[   24.235493]  </TASK>
[   24.235505] 
[   24.242876] Allocated by task 226:
[   24.243105]  kasan_save_stack+0x45/0x70
[   24.243247]  kasan_save_track+0x18/0x40
[   24.243372]  kasan_save_alloc_info+0x3b/0x50
[   24.243552]  __kasan_kmalloc+0xb7/0xc0
[   24.243755]  __kmalloc_cache_noprof+0x189/0x420
[   24.243976]  kmalloc_oob_memset_8+0xac/0x330
[   24.244171]  kunit_try_run_case+0x1a5/0x480
[   24.244366]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.244528]  kthread+0x337/0x6f0
[   24.244640]  ret_from_fork+0x116/0x1d0
[   24.244849]  ret_from_fork_asm+0x1a/0x30
[   24.245021] 
[   24.245106] The buggy address belongs to the object at ffff8881058c1600
[   24.245106]  which belongs to the cache kmalloc-128 of size 128
[   24.245576] The buggy address is located 113 bytes inside of
[   24.245576]  allocated 120-byte region [ffff8881058c1600, ffff8881058c1678)
[   24.247484] 
[   24.247610] The buggy address belongs to the physical page:
[   24.248140] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058c1
[   24.248639] flags: 0x200000000000000(node=0|zone=2)
[   24.249200] page_type: f5(slab)
[   24.249457] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   24.250221] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   24.250544] page dumped because: kasan: bad access detected
[   24.251033] 
[   24.251136] Memory state around the buggy address:
[   24.251559]  ffff8881058c1500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   24.252232]  ffff8881058c1580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.252817] >ffff8881058c1600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   24.253314]                                                                 ^
[   24.253955]  ffff8881058c1680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.254484]  ffff8881058c1700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.255212] ==================================================================