Hay
Date
July 25, 2025, 3:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.404292] ==================================================================
[   32.404399] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   32.404486] Write of size 4 at addr fff00000c9726675 by task kunit_try_catch/206
[   32.404538] 
[   32.404607] CPU: 1 UID: 0 PID: 206 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250725 #1 PREEMPT 
[   32.404774] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   32.404844] Hardware name: linux,dummy-virt (DT)
[   32.404876] Call trace:
[   32.404898]  show_stack+0x20/0x38 (C)
[   32.405122]  dump_stack_lvl+0x8c/0xd0
[   32.405344]  print_report+0x118/0x5e8
[   32.405459]  kasan_report+0xdc/0x128
[   32.405520]  kasan_check_range+0x100/0x1a8
[   32.405671]  __asan_memset+0x34/0x78
[   32.405920]  kmalloc_oob_memset_4+0x150/0x300
[   32.406081]  kunit_try_run_case+0x170/0x3f0
[   32.406372]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.406450]  kthread+0x328/0x630
[   32.406492]  ret_from_fork+0x10/0x20
[   32.406538] 
[   32.406938] Allocated by task 206:
[   32.407178]  kasan_save_stack+0x3c/0x68
[   32.407334]  kasan_save_track+0x20/0x40
[   32.407370]  kasan_save_alloc_info+0x40/0x58
[   32.407408]  __kasan_kmalloc+0xd4/0xd8
[   32.407698]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.407909]  kmalloc_oob_memset_4+0xb0/0x300
[   32.407994]  kunit_try_run_case+0x170/0x3f0
[   32.408243]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.408599]  kthread+0x328/0x630
[   32.408784]  ret_from_fork+0x10/0x20
[   32.408891] 
[   32.408995] The buggy address belongs to the object at fff00000c9726600
[   32.408995]  which belongs to the cache kmalloc-128 of size 128
[   32.409053] The buggy address is located 117 bytes inside of
[   32.409053]  allocated 120-byte region [fff00000c9726600, fff00000c9726678)
[   32.409177] 
[   32.409245] The buggy address belongs to the physical page:
[   32.409472] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109726
[   32.409532] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.409725] page_type: f5(slab)
[   32.409776] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   32.409824] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   32.409862] page dumped because: kasan: bad access detected
[   32.409894] 
[   32.409923] Memory state around the buggy address:
[   32.409979]  fff00000c9726500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   32.410022]  fff00000c9726580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.410063] >fff00000c9726600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   32.410099]                                                                 ^
[   32.410154]  fff00000c9726680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.410195]  fff00000c9726700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.410241] ==================================================================

[   25.845384] ==================================================================
[   25.846546] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   25.847302] Write of size 4 at addr ffff8881046caf75 by task kunit_try_catch/223
[   25.848190] 
[   25.848420] CPU: 1 UID: 0 PID: 223 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250725 #1 PREEMPT(voluntary) 
[   25.848470] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.848482] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.848503] Call Trace:
[   25.848516]  <TASK>
[   25.848533]  dump_stack_lvl+0x73/0xb0
[   25.848598]  print_report+0xd1/0x640
[   25.848623]  ? __virt_addr_valid+0x1db/0x2d0
[   25.848648]  ? kmalloc_oob_memset_4+0x166/0x330
[   25.848681]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.848708]  ? kmalloc_oob_memset_4+0x166/0x330
[   25.848731]  kasan_report+0x141/0x180
[   25.848753]  ? kmalloc_oob_memset_4+0x166/0x330
[   25.848839]  kasan_check_range+0x10c/0x1c0
[   25.848870]  __asan_memset+0x27/0x50
[   25.848894]  kmalloc_oob_memset_4+0x166/0x330
[   25.848917]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   25.848941]  ? __schedule+0x2070/0x2b60
[   25.848976]  ? __pfx_read_tsc+0x10/0x10
[   25.848999]  ? ktime_get_ts64+0x86/0x230
[   25.849025]  kunit_try_run_case+0x1a5/0x480
[   25.849058]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.849081]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.849103]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.849133]  ? __kthread_parkme+0x82/0x180
[   25.849154]  ? preempt_count_sub+0x50/0x80
[   25.849178]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.849202]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.849227]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.849252]  kthread+0x337/0x6f0
[   25.849272]  ? trace_preempt_on+0x20/0xc0
[   25.849296]  ? __pfx_kthread+0x10/0x10
[   25.849317]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.849342]  ? calculate_sigpending+0x7b/0xa0
[   25.849368]  ? __pfx_kthread+0x10/0x10
[   25.849389]  ret_from_fork+0x116/0x1d0
[   25.849409]  ? __pfx_kthread+0x10/0x10
[   25.849430]  ret_from_fork_asm+0x1a/0x30
[   25.849462]  </TASK>
[   25.849474] 
[   25.863932] Allocated by task 223:
[   25.864370]  kasan_save_stack+0x45/0x70
[   25.864671]  kasan_save_track+0x18/0x40
[   25.866155]  kasan_save_alloc_info+0x3b/0x50
[   25.866316]  __kasan_kmalloc+0xb7/0xc0
[   25.866449]  __kmalloc_cache_noprof+0x189/0x420
[   25.866605]  kmalloc_oob_memset_4+0xac/0x330
[   25.866752]  kunit_try_run_case+0x1a5/0x480
[   25.866897]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.868054]  kthread+0x337/0x6f0
[   25.868375]  ret_from_fork+0x116/0x1d0
[   25.868710]  ret_from_fork_asm+0x1a/0x30
[   25.869066] 
[   25.869215] The buggy address belongs to the object at ffff8881046caf00
[   25.869215]  which belongs to the cache kmalloc-128 of size 128
[   25.871195] The buggy address is located 117 bytes inside of
[   25.871195]  allocated 120-byte region [ffff8881046caf00, ffff8881046caf78)
[   25.873160] 
[   25.873645] The buggy address belongs to the physical page:
[   25.874414] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1046ca
[   25.875465] flags: 0x200000000000000(node=0|zone=2)
[   25.876233] page_type: f5(slab)
[   25.876548] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.877683] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.879009] page dumped because: kasan: bad access detected
[   25.879493] 
[   25.879677] Memory state around the buggy address:
[   25.880932]  ffff8881046cae00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.881652]  ffff8881046cae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.882594] >ffff8881046caf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.883603]                                                                 ^
[   25.884657]  ffff8881046caf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.885980]  ffff8881046cb000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   25.886687] ==================================================================