Hay
Date
May 23, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   27.626011] ==================================================================
[   27.626280] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   27.626540] Write of size 8 at addr fff00000c5a34d71 by task kunit_try_catch/178
[   27.626915] 
[   27.627037] CPU: 0 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT 
[   27.627296] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.627391] Hardware name: linux,dummy-virt (DT)
[   27.627499] Call trace:
[   27.627567]  show_stack+0x20/0x38 (C)
[   27.627798]  dump_stack_lvl+0x8c/0xd0
[   27.628383]  print_report+0x118/0x608
[   27.628764]  kasan_report+0xdc/0x128
[   27.628900]  kasan_check_range+0x100/0x1a8
[   27.629037]  __asan_memset+0x34/0x78
[   27.629168]  kmalloc_oob_memset_8+0x150/0x2f8
[   27.629309]  kunit_try_run_case+0x170/0x3f0
[   27.629468]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.629855]  kthread+0x328/0x630
[   27.630330]  ret_from_fork+0x10/0x20
[   27.630759] 
[   27.631394] Allocated by task 178:
[   27.631518]  kasan_save_stack+0x3c/0x68
[   27.631899]  kasan_save_track+0x20/0x40
[   27.632067]  kasan_save_alloc_info+0x40/0x58
[   27.632182]  __kasan_kmalloc+0xd4/0xd8
[   27.632286]  __kmalloc_cache_noprof+0x15c/0x3c0
[   27.632394]  kmalloc_oob_memset_8+0xb0/0x2f8
[   27.632502]  kunit_try_run_case+0x170/0x3f0
[   27.632605]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.632731]  kthread+0x328/0x630
[   27.633294]  ret_from_fork+0x10/0x20
[   27.633536] 
[   27.633642] The buggy address belongs to the object at fff00000c5a34d00
[   27.633642]  which belongs to the cache kmalloc-128 of size 128
[   27.633925] The buggy address is located 113 bytes inside of
[   27.633925]  allocated 120-byte region [fff00000c5a34d00, fff00000c5a34d78)
[   27.634109] 
[   27.634228] The buggy address belongs to the physical page:
[   27.634320] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a34
[   27.634499] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.634643] page_type: f5(slab)
[   27.634763] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   27.635166] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   27.635438] page dumped because: kasan: bad access detected
[   27.635927] 
[   27.636017] Memory state around the buggy address:
[   27.636257]  fff00000c5a34c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   27.636535]  fff00000c5a34c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.636685] >fff00000c5a34d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   27.636815]                                                                 ^
[   27.636936]  fff00000c5a34d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.637061]  fff00000c5a34e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.637586] ==================================================================

[   12.695950] ==================================================================
[   12.696426] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   12.696779] Write of size 8 at addr ffff8881026f5271 by task kunit_try_catch/195
[   12.697405] 
[   12.697552] CPU: 0 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT(voluntary) 
[   12.697599] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.697611] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.697632] Call Trace:
[   12.697644]  <TASK>
[   12.697660]  dump_stack_lvl+0x73/0xb0
[   12.697688]  print_report+0xd1/0x650
[   12.697710]  ? __virt_addr_valid+0x1db/0x2d0
[   12.697732]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.697753]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.697775]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.697796]  kasan_report+0x141/0x180
[   12.697818]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.697845]  kasan_check_range+0x10c/0x1c0
[   12.697864]  __asan_memset+0x27/0x50
[   12.697946]  kmalloc_oob_memset_8+0x166/0x330
[   12.697973]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   12.697996]  ? __schedule+0x10cc/0x2b30
[   12.698019]  ? __pfx_read_tsc+0x10/0x10
[   12.698038]  ? ktime_get_ts64+0x86/0x230
[   12.698064]  kunit_try_run_case+0x1a5/0x480
[   12.698087]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.698108]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.698131]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.698153]  ? __kthread_parkme+0x82/0x180
[   12.698174]  ? preempt_count_sub+0x50/0x80
[   12.698200]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.698222]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.698244]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.698265]  kthread+0x337/0x6f0
[   12.698282]  ? trace_preempt_on+0x20/0xc0
[   12.698318]  ? __pfx_kthread+0x10/0x10
[   12.698336]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.698356]  ? calculate_sigpending+0x7b/0xa0
[   12.698377]  ? __pfx_kthread+0x10/0x10
[   12.698395]  ret_from_fork+0x41/0x80
[   12.698415]  ? __pfx_kthread+0x10/0x10
[   12.698432]  ret_from_fork_asm+0x1a/0x30
[   12.698463]  </TASK>
[   12.698474] 
[   12.705593] Allocated by task 195:
[   12.705886]  kasan_save_stack+0x45/0x70
[   12.706093]  kasan_save_track+0x18/0x40
[   12.706288]  kasan_save_alloc_info+0x3b/0x50
[   12.706510]  __kasan_kmalloc+0xb7/0xc0
[   12.706735]  __kmalloc_cache_noprof+0x189/0x420
[   12.706965]  kmalloc_oob_memset_8+0xac/0x330
[   12.707112]  kunit_try_run_case+0x1a5/0x480
[   12.707374]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.707700]  kthread+0x337/0x6f0
[   12.707831]  ret_from_fork+0x41/0x80
[   12.707965]  ret_from_fork_asm+0x1a/0x30
[   12.708162] 
[   12.708257] The buggy address belongs to the object at ffff8881026f5200
[   12.708257]  which belongs to the cache kmalloc-128 of size 128
[   12.708862] The buggy address is located 113 bytes inside of
[   12.708862]  allocated 120-byte region [ffff8881026f5200, ffff8881026f5278)
[   12.709218] 
[   12.709325] The buggy address belongs to the physical page:
[   12.709576] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026f5
[   12.709925] flags: 0x200000000000000(node=0|zone=2)
[   12.710159] page_type: f5(slab)
[   12.710452] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.710736] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.711402] page dumped because: kasan: bad access detected
[   12.711686] 
[   12.711784] Memory state around the buggy address:
[   12.712700]  ffff8881026f5100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.713050]  ffff8881026f5180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.713369] >ffff8881026f5200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.714028]                                                                 ^
[   12.714445]  ffff8881026f5280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.714748]  ffff8881026f5300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.715226] ==================================================================