Hay
Date
July 9, 2025, 2:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.024035] ==================================================================
[   17.024112] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   17.024167] Write of size 4 at addr fff00000c7767575 by task kunit_try_catch/174
[   17.024267] 
[   17.024304] CPU: 0 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   17.024700] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.024730] Hardware name: linux,dummy-virt (DT)
[   17.025187] Call trace:
[   17.025225]  show_stack+0x20/0x38 (C)
[   17.025290]  dump_stack_lvl+0x8c/0xd0
[   17.025340]  print_report+0x118/0x608
[   17.025387]  kasan_report+0xdc/0x128
[   17.025433]  kasan_check_range+0x100/0x1a8
[   17.025481]  __asan_memset+0x34/0x78
[   17.025524]  kmalloc_oob_memset_4+0x150/0x300
[   17.025571]  kunit_try_run_case+0x170/0x3f0
[   17.025658]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.025711]  kthread+0x328/0x630
[   17.025939]  ret_from_fork+0x10/0x20
[   17.026028] 
[   17.026048] Allocated by task 174:
[   17.026079]  kasan_save_stack+0x3c/0x68
[   17.026131]  kasan_save_track+0x20/0x40
[   17.026301]  kasan_save_alloc_info+0x40/0x58
[   17.026415]  __kasan_kmalloc+0xd4/0xd8
[   17.026563]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.026654]  kmalloc_oob_memset_4+0xb0/0x300
[   17.026693]  kunit_try_run_case+0x170/0x3f0
[   17.026731]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.026823]  kthread+0x328/0x630
[   17.027125]  ret_from_fork+0x10/0x20
[   17.027202] 
[   17.027251] The buggy address belongs to the object at fff00000c7767500
[   17.027251]  which belongs to the cache kmalloc-128 of size 128
[   17.027359] The buggy address is located 117 bytes inside of
[   17.027359]  allocated 120-byte region [fff00000c7767500, fff00000c7767578)
[   17.027455] 
[   17.027753] The buggy address belongs to the physical page:
[   17.027784] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107767
[   17.027903] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.028324] page_type: f5(slab)
[   17.028412] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.028514] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.028576] page dumped because: kasan: bad access detected
[   17.028607] 
[   17.028641] Memory state around the buggy address:
[   17.028790]  fff00000c7767400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.029397]  fff00000c7767480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.029458] >fff00000c7767500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.029496]                                                                 ^
[   17.029676]  fff00000c7767580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.029896]  fff00000c7767600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.029965] ==================================================================

[   12.866177] ==================================================================
[   12.866674] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   12.867170] Write of size 4 at addr ffff8881029adb75 by task kunit_try_catch/191
[   12.867428] 
[   12.867543] CPU: 0 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.867587] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.867611] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.867631] Call Trace:
[   12.867644]  <TASK>
[   12.867660]  dump_stack_lvl+0x73/0xb0
[   12.867691]  print_report+0xd1/0x650
[   12.867713]  ? __virt_addr_valid+0x1db/0x2d0
[   12.867736]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.867757]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.867780]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.867801]  kasan_report+0x141/0x180
[   12.867822]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.867847]  kasan_check_range+0x10c/0x1c0
[   12.867870]  __asan_memset+0x27/0x50
[   12.867888]  kmalloc_oob_memset_4+0x166/0x330
[   12.867910]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   12.867932]  ? __schedule+0x10cc/0x2b60
[   12.867954]  ? __pfx_read_tsc+0x10/0x10
[   12.867975]  ? ktime_get_ts64+0x86/0x230
[   12.868000]  kunit_try_run_case+0x1a5/0x480
[   12.868026]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.868048]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.868097]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.868120]  ? __kthread_parkme+0x82/0x180
[   12.868141]  ? preempt_count_sub+0x50/0x80
[   12.868165]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.868189]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.868213]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.868237]  kthread+0x337/0x6f0
[   12.868255]  ? trace_preempt_on+0x20/0xc0
[   12.868279]  ? __pfx_kthread+0x10/0x10
[   12.868299]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.868319]  ? calculate_sigpending+0x7b/0xa0
[   12.868343]  ? __pfx_kthread+0x10/0x10
[   12.868363]  ret_from_fork+0x116/0x1d0
[   12.868381]  ? __pfx_kthread+0x10/0x10
[   12.868401]  ret_from_fork_asm+0x1a/0x30
[   12.868432]  </TASK>
[   12.868442] 
[   12.876728] Allocated by task 191:
[   12.877156]  kasan_save_stack+0x45/0x70
[   12.877402]  kasan_save_track+0x18/0x40
[   12.877624]  kasan_save_alloc_info+0x3b/0x50
[   12.877861]  __kasan_kmalloc+0xb7/0xc0
[   12.878069]  __kmalloc_cache_noprof+0x189/0x420
[   12.878393]  kmalloc_oob_memset_4+0xac/0x330
[   12.878605]  kunit_try_run_case+0x1a5/0x480
[   12.878934]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.879117]  kthread+0x337/0x6f0
[   12.879242]  ret_from_fork+0x116/0x1d0
[   12.879389]  ret_from_fork_asm+0x1a/0x30
[   12.879587] 
[   12.879722] The buggy address belongs to the object at ffff8881029adb00
[   12.879722]  which belongs to the cache kmalloc-128 of size 128
[   12.880577] The buggy address is located 117 bytes inside of
[   12.880577]  allocated 120-byte region [ffff8881029adb00, ffff8881029adb78)
[   12.881788] 
[   12.882407] The buggy address belongs to the physical page:
[   12.882623] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029ad
[   12.883359] flags: 0x200000000000000(node=0|zone=2)
[   12.883618] page_type: f5(slab)
[   12.883887] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.884352] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.884695] page dumped because: kasan: bad access detected
[   12.885117] 
[   12.885218] Memory state around the buggy address:
[   12.885428]  ffff8881029ada00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.885770]  ffff8881029ada80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.886340] >ffff8881029adb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.886893]                                                                 ^
[   12.887169]  ffff8881029adb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.887495]  ffff8881029adc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.887788] ==================================================================