Hay
Date
June 19, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   30.536678] ==================================================================
[   30.537033] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   30.537308] Write of size 4 at addr fff00000c6466a75 by task kunit_try_catch/185
[   30.538693] 
[   30.538780] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT 
[   30.539029] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.539112] Hardware name: linux,dummy-virt (DT)
[   30.539287] Call trace:
[   30.539377]  show_stack+0x20/0x38 (C)
[   30.539532]  dump_stack_lvl+0x8c/0xd0
[   30.540043]  print_report+0x118/0x608
[   30.540191]  kasan_report+0xdc/0x128
[   30.540433]  kasan_check_range+0x100/0x1a8
[   30.540861]  __asan_memset+0x34/0x78
[   30.541126]  kmalloc_oob_memset_4+0x150/0x300
[   30.541384]  kunit_try_run_case+0x170/0x3f0
[   30.541645]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.541937]  kthread+0x328/0x630
[   30.542034]  ret_from_fork+0x10/0x20
[   30.542158] 
[   30.542211] Allocated by task 185:
[   30.542359]  kasan_save_stack+0x3c/0x68
[   30.542653]  kasan_save_track+0x20/0x40
[   30.542759]  kasan_save_alloc_info+0x40/0x58
[   30.542941]  __kasan_kmalloc+0xd4/0xd8
[   30.543119]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.543373]  kmalloc_oob_memset_4+0xb0/0x300
[   30.543568]  kunit_try_run_case+0x170/0x3f0
[   30.543756]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.543946]  kthread+0x328/0x630
[   30.544312]  ret_from_fork+0x10/0x20
[   30.544419] 
[   30.544475] The buggy address belongs to the object at fff00000c6466a00
[   30.544475]  which belongs to the cache kmalloc-128 of size 128
[   30.544779] The buggy address is located 117 bytes inside of
[   30.544779]  allocated 120-byte region [fff00000c6466a00, fff00000c6466a78)
[   30.545143] 
[   30.545267] The buggy address belongs to the physical page:
[   30.545448] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106466
[   30.545897] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.546032] page_type: f5(slab)
[   30.546253] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000100 dead000000000122
[   30.546484] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.546814] page dumped because: kasan: bad access detected
[   30.546921] 
[   30.546980] Memory state around the buggy address:
[   30.547060]  fff00000c6466900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.547273]  fff00000c6466980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.547465] >fff00000c6466a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.547579]                                                                 ^
[   30.547752]  fff00000c6466a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.547863]  fff00000c6466b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.547974] ==================================================================

[   27.001644] ==================================================================
[   27.002240] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   27.002909] Write of size 4 at addr ffff888103259075 by task kunit_try_catch/203
[   27.003368] 
[   27.003582] CPU: 0 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) 
[   27.003712] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.003740] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.003790] Call Trace:
[   27.003823]  <TASK>
[   27.003864]  dump_stack_lvl+0x73/0xb0
[   27.003937]  print_report+0xd1/0x650
[   27.003989]  ? __virt_addr_valid+0x1db/0x2d0
[   27.004055]  ? kmalloc_oob_memset_4+0x166/0x330
[   27.004121]  ? kasan_complete_mode_report_info+0x2a/0x200
[   27.004174]  ? kmalloc_oob_memset_4+0x166/0x330
[   27.004243]  kasan_report+0x141/0x180
[   27.004290]  ? kmalloc_oob_memset_4+0x166/0x330
[   27.004341]  kasan_check_range+0x10c/0x1c0
[   27.004390]  __asan_memset+0x27/0x50
[   27.004433]  kmalloc_oob_memset_4+0x166/0x330
[   27.004475]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   27.004521]  ? __schedule+0x207f/0x2b60
[   27.004566]  ? __pfx_read_tsc+0x10/0x10
[   27.004611]  ? ktime_get_ts64+0x86/0x230
[   27.004662]  kunit_try_run_case+0x1a5/0x480
[   27.004709]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.004780]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.004826]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.004875]  ? __kthread_parkme+0x82/0x180
[   27.004918]  ? preempt_count_sub+0x50/0x80
[   27.004968]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.005019]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.005061]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.005086]  kthread+0x337/0x6f0
[   27.005132]  ? trace_preempt_on+0x20/0xc0
[   27.005160]  ? __pfx_kthread+0x10/0x10
[   27.005182]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.005205]  ? calculate_sigpending+0x7b/0xa0
[   27.005233]  ? __pfx_kthread+0x10/0x10
[   27.005257]  ret_from_fork+0x116/0x1d0
[   27.005279]  ? __pfx_kthread+0x10/0x10
[   27.005301]  ret_from_fork_asm+0x1a/0x30
[   27.005334]  </TASK>
[   27.005347] 
[   27.016825] Allocated by task 203:
[   27.017438]  kasan_save_stack+0x45/0x70
[   27.017657]  kasan_save_track+0x18/0x40
[   27.017759]  kasan_save_alloc_info+0x3b/0x50
[   27.017865]  __kasan_kmalloc+0xb7/0xc0
[   27.018496]  __kmalloc_cache_noprof+0x189/0x420
[   27.019217]  kmalloc_oob_memset_4+0xac/0x330
[   27.019549]  kunit_try_run_case+0x1a5/0x480
[   27.019844]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.020158]  kthread+0x337/0x6f0
[   27.020407]  ret_from_fork+0x116/0x1d0
[   27.020674]  ret_from_fork_asm+0x1a/0x30
[   27.020917] 
[   27.021020] The buggy address belongs to the object at ffff888103259000
[   27.021020]  which belongs to the cache kmalloc-128 of size 128
[   27.022161] The buggy address is located 117 bytes inside of
[   27.022161]  allocated 120-byte region [ffff888103259000, ffff888103259078)
[   27.023117] 
[   27.023246] The buggy address belongs to the physical page:
[   27.023636] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103259
[   27.023954] flags: 0x200000000000000(node=0|zone=2)
[   27.024119] page_type: f5(slab)
[   27.024226] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   27.024385] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   27.024535] page dumped because: kasan: bad access detected
[   27.024649] 
[   27.024697] Memory state around the buggy address:
[   27.024805]  ffff888103258f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.025975]  ffff888103258f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.026740] >ffff888103259000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   27.027655]                                                                 ^
[   27.028167]  ffff888103259080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.028725]  ffff888103259100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.029459] ==================================================================