Hay
Date
July 18, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.419389] ==================================================================
[   15.419712] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   15.419774] Write of size 4 at addr fff00000c3f17e75 by task kunit_try_catch/174
[   15.419845] 
[   15.419885] CPU: 1 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.420028] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.420068] Hardware name: linux,dummy-virt (DT)
[   15.420138] Call trace:
[   15.420163]  show_stack+0x20/0x38 (C)
[   15.420231]  dump_stack_lvl+0x8c/0xd0
[   15.420287]  print_report+0x118/0x5d0
[   15.420351]  kasan_report+0xdc/0x128
[   15.420396]  kasan_check_range+0x100/0x1a8
[   15.420454]  __asan_memset+0x34/0x78
[   15.420505]  kmalloc_oob_memset_4+0x150/0x300
[   15.420562]  kunit_try_run_case+0x170/0x3f0
[   15.420855]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.420940]  kthread+0x328/0x630
[   15.420986]  ret_from_fork+0x10/0x20
[   15.421033] 
[   15.421076] Allocated by task 174:
[   15.421116]  kasan_save_stack+0x3c/0x68
[   15.421158]  kasan_save_track+0x20/0x40
[   15.421217]  kasan_save_alloc_info+0x40/0x58
[   15.421372]  __kasan_kmalloc+0xd4/0xd8
[   15.421588]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.421671]  kmalloc_oob_memset_4+0xb0/0x300
[   15.421842]  kunit_try_run_case+0x170/0x3f0
[   15.421924]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.421983]  kthread+0x328/0x630
[   15.422017]  ret_from_fork+0x10/0x20
[   15.422053] 
[   15.422073] The buggy address belongs to the object at fff00000c3f17e00
[   15.422073]  which belongs to the cache kmalloc-128 of size 128
[   15.422412] The buggy address is located 117 bytes inside of
[   15.422412]  allocated 120-byte region [fff00000c3f17e00, fff00000c3f17e78)
[   15.422534] 
[   15.422646] The buggy address belongs to the physical page:
[   15.422677] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f17
[   15.422764] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.422941] page_type: f5(slab)
[   15.423132] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.423288] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.423432] page dumped because: kasan: bad access detected
[   15.423491] 
[   15.423523] Memory state around the buggy address:
[   15.423562]  fff00000c3f17d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.423604]  fff00000c3f17d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.423646] >fff00000c3f17e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.423734]                                                                 ^
[   15.423775]  fff00000c3f17e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.423816]  fff00000c3f17f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.423852] ==================================================================

[   12.275539] ==================================================================
[   12.275996] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   12.276539] Write of size 4 at addr ffff8881030d9875 by task kunit_try_catch/193
[   12.277094] 
[   12.277205] CPU: 1 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.277328] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.277341] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.277373] Call Trace:
[   12.277385]  <TASK>
[   12.277400]  dump_stack_lvl+0x73/0xb0
[   12.277429]  print_report+0xd1/0x610
[   12.277450]  ? __virt_addr_valid+0x1db/0x2d0
[   12.277481]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.277511]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.277533]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.277556]  kasan_report+0x141/0x180
[   12.277588]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.277614]  kasan_check_range+0x10c/0x1c0
[   12.277636]  __asan_memset+0x27/0x50
[   12.277655]  kmalloc_oob_memset_4+0x166/0x330
[   12.277685]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   12.277708]  ? __schedule+0x10cc/0x2b60
[   12.277730]  ? __pfx_read_tsc+0x10/0x10
[   12.277750]  ? ktime_get_ts64+0x86/0x230
[   12.277785]  kunit_try_run_case+0x1a5/0x480
[   12.277810]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.277831]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.277855]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.277877]  ? __kthread_parkme+0x82/0x180
[   12.277906]  ? preempt_count_sub+0x50/0x80
[   12.277929]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.277952]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.277986]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.278009]  kthread+0x337/0x6f0
[   12.278092]  ? trace_preempt_on+0x20/0xc0
[   12.278116]  ? __pfx_kthread+0x10/0x10
[   12.278135]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.278156]  ? calculate_sigpending+0x7b/0xa0
[   12.278180]  ? __pfx_kthread+0x10/0x10
[   12.278200]  ret_from_fork+0x116/0x1d0
[   12.278219]  ? __pfx_kthread+0x10/0x10
[   12.278238]  ret_from_fork_asm+0x1a/0x30
[   12.278268]  </TASK>
[   12.278291] 
[   12.286768] Allocated by task 193:
[   12.286929]  kasan_save_stack+0x45/0x70
[   12.287306]  kasan_save_track+0x18/0x40
[   12.287549]  kasan_save_alloc_info+0x3b/0x50
[   12.287740]  __kasan_kmalloc+0xb7/0xc0
[   12.287875]  __kmalloc_cache_noprof+0x189/0x420
[   12.288048]  kmalloc_oob_memset_4+0xac/0x330
[   12.288294]  kunit_try_run_case+0x1a5/0x480
[   12.288585]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.288835]  kthread+0x337/0x6f0
[   12.288964]  ret_from_fork+0x116/0x1d0
[   12.289368]  ret_from_fork_asm+0x1a/0x30
[   12.289689] 
[   12.289782] The buggy address belongs to the object at ffff8881030d9800
[   12.289782]  which belongs to the cache kmalloc-128 of size 128
[   12.290399] The buggy address is located 117 bytes inside of
[   12.290399]  allocated 120-byte region [ffff8881030d9800, ffff8881030d9878)
[   12.290993] 
[   12.291066] The buggy address belongs to the physical page:
[   12.291240] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1030d9
[   12.291488] flags: 0x200000000000000(node=0|zone=2)
[   12.291849] page_type: f5(slab)
[   12.292206] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.292721] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.293137] page dumped because: kasan: bad access detected
[   12.293324] 
[   12.293393] Memory state around the buggy address:
[   12.293548]  ffff8881030d9700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.294161]  ffff8881030d9780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.294618] >ffff8881030d9800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.294949]                                                                 ^
[   12.295504]  ffff8881030d9880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.295865]  ffff8881030d9900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.296271] ==================================================================