Hay
Date
June 17, 2025, 6:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   16.908969] ==================================================================
[   16.909032] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   16.909089] Write of size 8 at addr fff00000c748a971 by task kunit_try_catch/185
[   16.909139] 
[   16.909174] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250617 #1 PREEMPT 
[   16.909522] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.909566] Hardware name: linux,dummy-virt (DT)
[   16.909607] Call trace:
[   16.909710]  show_stack+0x20/0x38 (C)
[   16.909777]  dump_stack_lvl+0x8c/0xd0
[   16.909843]  print_report+0x118/0x608
[   16.909963]  kasan_report+0xdc/0x128
[   16.910011]  kasan_check_range+0x100/0x1a8
[   16.910413]  __asan_memset+0x34/0x78
[   16.910498]  kmalloc_oob_memset_8+0x150/0x2f8
[   16.910644]  kunit_try_run_case+0x170/0x3f0
[   16.910737]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.910887]  kthread+0x328/0x630
[   16.910992]  ret_from_fork+0x10/0x20
[   16.911364] 
[   16.911425] Allocated by task 185:
[   16.911492]  kasan_save_stack+0x3c/0x68
[   16.911546]  kasan_save_track+0x20/0x40
[   16.911618]  kasan_save_alloc_info+0x40/0x58
[   16.911674]  __kasan_kmalloc+0xd4/0xd8
[   16.911711]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.911759]  kmalloc_oob_memset_8+0xb0/0x2f8
[   16.911796]  kunit_try_run_case+0x170/0x3f0
[   16.911833]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.911875]  kthread+0x328/0x630
[   16.911923]  ret_from_fork+0x10/0x20
[   16.911971] 
[   16.911998] The buggy address belongs to the object at fff00000c748a900
[   16.911998]  which belongs to the cache kmalloc-128 of size 128
[   16.912056] The buggy address is located 113 bytes inside of
[   16.912056]  allocated 120-byte region [fff00000c748a900, fff00000c748a978)
[   16.912117] 
[   16.912145] The buggy address belongs to the physical page:
[   16.912181] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10748a
[   16.912254] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.912303] page_type: f5(slab)
[   16.912352] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   16.912411] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.912451] page dumped because: kasan: bad access detected
[   16.912481] 
[   16.912499] Memory state around the buggy address:
[   16.912530]  fff00000c748a800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.912571]  fff00000c748a880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.912620] >fff00000c748a900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.912666]                                                                 ^
[   16.912705]  fff00000c748a980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.912756]  fff00000c748aa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.912793] ==================================================================

[   18.140718] ==================================================================
[   18.141863] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   18.142637] Write of size 8 at addr ffff888100ab8471 by task kunit_try_catch/203
[   18.143088] 
[   18.143559] CPU: 1 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250617 #1 PREEMPT(voluntary) 
[   18.143687] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.143723] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.143777] Call Trace:
[   18.143812]  <TASK>
[   18.143873]  dump_stack_lvl+0x73/0xb0
[   18.143961]  print_report+0xd1/0x650
[   18.144035]  ? __virt_addr_valid+0x1db/0x2d0
[   18.144110]  ? kmalloc_oob_memset_8+0x166/0x330
[   18.144177]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.144331]  ? kmalloc_oob_memset_8+0x166/0x330
[   18.144398]  kasan_report+0x141/0x180
[   18.144434]  ? kmalloc_oob_memset_8+0x166/0x330
[   18.144472]  kasan_check_range+0x10c/0x1c0
[   18.144507]  __asan_memset+0x27/0x50
[   18.144536]  kmalloc_oob_memset_8+0x166/0x330
[   18.144567]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   18.144598]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   18.144633]  ? trace_hardirqs_on+0x37/0xe0
[   18.144667]  ? __pfx_read_tsc+0x10/0x10
[   18.144696]  ? ktime_get_ts64+0x86/0x230
[   18.144731]  kunit_try_run_case+0x1a5/0x480
[   18.144764]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.144799]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.144828]  ? __kthread_parkme+0x82/0x180
[   18.144888]  ? preempt_count_sub+0x50/0x80
[   18.144922]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.144955]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.144987]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.145019]  kthread+0x337/0x6f0
[   18.145045]  ? trace_preempt_on+0x20/0xc0
[   18.145076]  ? __pfx_kthread+0x10/0x10
[   18.145106]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.145141]  ? calculate_sigpending+0x7b/0xa0
[   18.145174]  ? __pfx_kthread+0x10/0x10
[   18.145204]  ret_from_fork+0x116/0x1d0
[   18.145287]  ? __pfx_kthread+0x10/0x10
[   18.145371]  ret_from_fork_asm+0x1a/0x30
[   18.145419]  </TASK>
[   18.145437] 
[   18.162379] Allocated by task 203:
[   18.162659]  kasan_save_stack+0x45/0x70
[   18.163043]  kasan_save_track+0x18/0x40
[   18.163571]  kasan_save_alloc_info+0x3b/0x50
[   18.164003]  __kasan_kmalloc+0xb7/0xc0
[   18.164480]  __kmalloc_cache_noprof+0x189/0x420
[   18.164931]  kmalloc_oob_memset_8+0xac/0x330
[   18.165397]  kunit_try_run_case+0x1a5/0x480
[   18.165703]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.166350]  kthread+0x337/0x6f0
[   18.166715]  ret_from_fork+0x116/0x1d0
[   18.167130]  ret_from_fork_asm+0x1a/0x30
[   18.167706] 
[   18.167926] The buggy address belongs to the object at ffff888100ab8400
[   18.167926]  which belongs to the cache kmalloc-128 of size 128
[   18.168914] The buggy address is located 113 bytes inside of
[   18.168914]  allocated 120-byte region [ffff888100ab8400, ffff888100ab8478)
[   18.169821] 
[   18.170041] The buggy address belongs to the physical page:
[   18.170680] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100ab8
[   18.171495] flags: 0x200000000000000(node=0|zone=2)
[   18.171963] page_type: f5(slab)
[   18.172495] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   18.173086] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.173724] page dumped because: kasan: bad access detected
[   18.174200] 
[   18.174543] Memory state around the buggy address:
[   18.174905]  ffff888100ab8300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.177529]  ffff888100ab8380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.178032] >ffff888100ab8400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.178433]                                                                 ^
[   18.179074]  ffff888100ab8480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.179670]  ffff888100ab8500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.180262] ==================================================================