Hay
Date
July 8, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.401113] ==================================================================
[   19.401180] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   19.401531] Write of size 4 at addr fff00000c6343b75 by task kunit_try_catch/174
[   19.401729] 
[   19.401827] CPU: 1 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.401963] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.401991] Hardware name: linux,dummy-virt (DT)
[   19.402036] Call trace:
[   19.402058]  show_stack+0x20/0x38 (C)
[   19.402108]  dump_stack_lvl+0x8c/0xd0
[   19.402171]  print_report+0x118/0x608
[   19.402216]  kasan_report+0xdc/0x128
[   19.402259]  kasan_check_range+0x100/0x1a8
[   19.402781]  __asan_memset+0x34/0x78
[   19.402848]  kmalloc_oob_memset_4+0x150/0x300
[   19.402924]  kunit_try_run_case+0x170/0x3f0
[   19.402977]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.403029]  kthread+0x328/0x630
[   19.403069]  ret_from_fork+0x10/0x20
[   19.403408] 
[   19.403512] Allocated by task 174:
[   19.403591]  kasan_save_stack+0x3c/0x68
[   19.403746]  kasan_save_track+0x20/0x40
[   19.403947]  kasan_save_alloc_info+0x40/0x58
[   19.403991]  __kasan_kmalloc+0xd4/0xd8
[   19.404027]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.404072]  kmalloc_oob_memset_4+0xb0/0x300
[   19.404109]  kunit_try_run_case+0x170/0x3f0
[   19.404396]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.404527]  kthread+0x328/0x630
[   19.404737]  ret_from_fork+0x10/0x20
[   19.404871] 
[   19.404963] The buggy address belongs to the object at fff00000c6343b00
[   19.404963]  which belongs to the cache kmalloc-128 of size 128
[   19.405200] The buggy address is located 117 bytes inside of
[   19.405200]  allocated 120-byte region [fff00000c6343b00, fff00000c6343b78)
[   19.405279] 
[   19.405299] The buggy address belongs to the physical page:
[   19.405519] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106343
[   19.405836] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.405981] page_type: f5(slab)
[   19.406114] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.406226] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.406267] page dumped because: kasan: bad access detected
[   19.406668] 
[   19.406869] Memory state around the buggy address:
[   19.406993]  fff00000c6343a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.407068]  fff00000c6343a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.407109] >fff00000c6343b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.407145]                                                                 ^
[   19.407246]  fff00000c6343b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.407298]  fff00000c6343c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.407335] ==================================================================

[   12.591111] ==================================================================
[   12.591546] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   12.591842] Write of size 4 at addr ffff888102b79d75 by task kunit_try_catch/192
[   12.592218] 
[   12.592339] CPU: 0 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.592383] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.592394] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.592414] Call Trace:
[   12.592426]  <TASK>
[   12.592444]  dump_stack_lvl+0x73/0xb0
[   12.592475]  print_report+0xd1/0x650
[   12.592499]  ? __virt_addr_valid+0x1db/0x2d0
[   12.592523]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.592545]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.592583]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.592616]  kasan_report+0x141/0x180
[   12.592638]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.592665]  kasan_check_range+0x10c/0x1c0
[   12.592689]  __asan_memset+0x27/0x50
[   12.592708]  kmalloc_oob_memset_4+0x166/0x330
[   12.592730]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   12.592753]  ? ret_from_fork_asm+0x1a/0x30
[   12.592777]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   12.592803]  kunit_try_run_case+0x1a5/0x480
[   12.592829]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.592851]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.592875]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.592899]  ? __kthread_parkme+0x82/0x180
[   12.592920]  ? preempt_count_sub+0x50/0x80
[   12.593004]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.593030]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.593054]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.593079]  kthread+0x337/0x6f0
[   12.593097]  ? trace_preempt_on+0x20/0xc0
[   12.593121]  ? __pfx_kthread+0x10/0x10
[   12.593142]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.593163]  ? calculate_sigpending+0x7b/0xa0
[   12.593187]  ? __pfx_kthread+0x10/0x10
[   12.593208]  ret_from_fork+0x116/0x1d0
[   12.593228]  ? __pfx_kthread+0x10/0x10
[   12.593248]  ret_from_fork_asm+0x1a/0x30
[   12.593279]  </TASK>
[   12.593291] 
[   12.601160] Allocated by task 192:
[   12.601345]  kasan_save_stack+0x45/0x70
[   12.601557]  kasan_save_track+0x18/0x40
[   12.601708]  kasan_save_alloc_info+0x3b/0x50
[   12.601858]  __kasan_kmalloc+0xb7/0xc0
[   12.602029]  __kmalloc_cache_noprof+0x189/0x420
[   12.602255]  kmalloc_oob_memset_4+0xac/0x330
[   12.602466]  kunit_try_run_case+0x1a5/0x480
[   12.602670]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.603126]  kthread+0x337/0x6f0
[   12.603272]  ret_from_fork+0x116/0x1d0
[   12.603449]  ret_from_fork_asm+0x1a/0x30
[   12.603654] 
[   12.603725] The buggy address belongs to the object at ffff888102b79d00
[   12.603725]  which belongs to the cache kmalloc-128 of size 128
[   12.604371] The buggy address is located 117 bytes inside of
[   12.604371]  allocated 120-byte region [ffff888102b79d00, ffff888102b79d78)
[   12.604878] 
[   12.604966] The buggy address belongs to the physical page:
[   12.605273] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b79
[   12.605656] flags: 0x200000000000000(node=0|zone=2)
[   12.605825] page_type: f5(slab)
[   12.605946] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.606223] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.606551] page dumped because: kasan: bad access detected
[   12.606814] 
[   12.607020] Memory state around the buggy address:
[   12.607241]  ffff888102b79c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.607515]  ffff888102b79c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.607812] >ffff888102b79d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.608085]                                                                 ^
[   12.608430]  ffff888102b79d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.608805]  ffff888102b79e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.609016] ==================================================================