Hay
Date
July 17, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.396120] ==================================================================
[   15.396224] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   15.396285] Write of size 4 at addr fff00000c786a475 by task kunit_try_catch/175
[   15.396333] 
[   15.396486] CPU: 0 UID: 0 PID: 175 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.396584] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.396611] Hardware name: linux,dummy-virt (DT)
[   15.396649] Call trace:
[   15.396827]  show_stack+0x20/0x38 (C)
[   15.397193]  dump_stack_lvl+0x8c/0xd0
[   15.397335]  print_report+0x118/0x5d0
[   15.397471]  kasan_report+0xdc/0x128
[   15.397662]  kasan_check_range+0x100/0x1a8
[   15.397877]  __asan_memset+0x34/0x78
[   15.397943]  kmalloc_oob_memset_4+0x150/0x300
[   15.398121]  kunit_try_run_case+0x170/0x3f0
[   15.398359]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.398516]  kthread+0x328/0x630
[   15.398672]  ret_from_fork+0x10/0x20
[   15.398891] 
[   15.399045] Allocated by task 175:
[   15.399158]  kasan_save_stack+0x3c/0x68
[   15.399306]  kasan_save_track+0x20/0x40
[   15.399385]  kasan_save_alloc_info+0x40/0x58
[   15.399455]  __kasan_kmalloc+0xd4/0xd8
[   15.399652]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.399813]  kmalloc_oob_memset_4+0xb0/0x300
[   15.399857]  kunit_try_run_case+0x170/0x3f0
[   15.399894]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.400188]  kthread+0x328/0x630
[   15.400313]  ret_from_fork+0x10/0x20
[   15.400364] 
[   15.400383] The buggy address belongs to the object at fff00000c786a400
[   15.400383]  which belongs to the cache kmalloc-128 of size 128
[   15.400587] The buggy address is located 117 bytes inside of
[   15.400587]  allocated 120-byte region [fff00000c786a400, fff00000c786a478)
[   15.400785] 
[   15.400831] The buggy address belongs to the physical page:
[   15.401107] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10786a
[   15.401325] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.401456] page_type: f5(slab)
[   15.401582] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.401939] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.401998] page dumped because: kasan: bad access detected
[   15.402029] 
[   15.402117] Memory state around the buggy address:
[   15.402207]  fff00000c786a300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.402262]  fff00000c786a380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.402583] >fff00000c786a400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.402646]                                                                 ^
[   15.402831]  fff00000c786a480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.402986]  fff00000c786a500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.403064] ==================================================================

[   13.167950] ==================================================================
[   13.168520] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   13.168848] Write of size 4 at addr ffff8881025cc275 by task kunit_try_catch/191
[   13.169142] 
[   13.169271] CPU: 1 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.169314] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.169325] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.169346] Call Trace:
[   13.169358]  <TASK>
[   13.169374]  dump_stack_lvl+0x73/0xb0
[   13.169405]  print_report+0xd1/0x610
[   13.169448]  ? __virt_addr_valid+0x1db/0x2d0
[   13.169474]  ? kmalloc_oob_memset_4+0x166/0x330
[   13.169497]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.169532]  ? kmalloc_oob_memset_4+0x166/0x330
[   13.169566]  kasan_report+0x141/0x180
[   13.169588]  ? kmalloc_oob_memset_4+0x166/0x330
[   13.169616]  kasan_check_range+0x10c/0x1c0
[   13.169648]  __asan_memset+0x27/0x50
[   13.169668]  kmalloc_oob_memset_4+0x166/0x330
[   13.169690]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   13.169725]  ? __schedule+0x10cc/0x2b60
[   13.169747]  ? __pfx_read_tsc+0x10/0x10
[   13.169767]  ? ktime_get_ts64+0x86/0x230
[   13.169791]  kunit_try_run_case+0x1a5/0x480
[   13.169815]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.169839]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.169862]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.169886]  ? __kthread_parkme+0x82/0x180
[   13.169907]  ? preempt_count_sub+0x50/0x80
[   13.169931]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.169964]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.169989]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.170014]  kthread+0x337/0x6f0
[   13.170044]  ? trace_preempt_on+0x20/0xc0
[   13.170067]  ? __pfx_kthread+0x10/0x10
[   13.170088]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.170109]  ? calculate_sigpending+0x7b/0xa0
[   13.170133]  ? __pfx_kthread+0x10/0x10
[   13.170154]  ret_from_fork+0x116/0x1d0
[   13.170172]  ? __pfx_kthread+0x10/0x10
[   13.170193]  ret_from_fork_asm+0x1a/0x30
[   13.170223]  </TASK>
[   13.170232] 
[   13.178149] Allocated by task 191:
[   13.178356]  kasan_save_stack+0x45/0x70
[   13.178596]  kasan_save_track+0x18/0x40
[   13.178742]  kasan_save_alloc_info+0x3b/0x50
[   13.178952]  __kasan_kmalloc+0xb7/0xc0
[   13.179164]  __kmalloc_cache_noprof+0x189/0x420
[   13.179395]  kmalloc_oob_memset_4+0xac/0x330
[   13.179580]  kunit_try_run_case+0x1a5/0x480
[   13.179729]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.179942]  kthread+0x337/0x6f0
[   13.180125]  ret_from_fork+0x116/0x1d0
[   13.180310]  ret_from_fork_asm+0x1a/0x30
[   13.180503] 
[   13.180606] The buggy address belongs to the object at ffff8881025cc200
[   13.180606]  which belongs to the cache kmalloc-128 of size 128
[   13.180996] The buggy address is located 117 bytes inside of
[   13.180996]  allocated 120-byte region [ffff8881025cc200, ffff8881025cc278)
[   13.181706] 
[   13.181829] The buggy address belongs to the physical page:
[   13.182038] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025cc
[   13.182331] flags: 0x200000000000000(node=0|zone=2)
[   13.182494] page_type: f5(slab)
[   13.182626] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.182963] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.183307] page dumped because: kasan: bad access detected
[   13.183559] 
[   13.183677] Memory state around the buggy address:
[   13.183897]  ffff8881025cc100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.184139]  ffff8881025cc180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.184365] >ffff8881025cc200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.185003]                                                                 ^
[   13.185322]  ffff8881025cc280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.185702]  ffff8881025cc300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.186002] ==================================================================