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

Environment
qemu-arm64
qemu-x86_64

[   18.082331] ==================================================================
[   18.082579] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   18.082673] Write of size 4 at addr fff00000c3ec0375 by task kunit_try_catch/174
[   18.082748] 
[   18.082830] CPU: 0 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.082909] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.082940] Hardware name: linux,dummy-virt (DT)
[   18.082995] Call trace:
[   18.083095]  show_stack+0x20/0x38 (C)
[   18.083142]  dump_stack_lvl+0x8c/0xd0
[   18.083201]  print_report+0x118/0x608
[   18.083245]  kasan_report+0xdc/0x128
[   18.083289]  kasan_check_range+0x100/0x1a8
[   18.083335]  __asan_memset+0x34/0x78
[   18.083375]  kmalloc_oob_memset_4+0x150/0x300
[   18.083419]  kunit_try_run_case+0x170/0x3f0
[   18.083463]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.083523]  kthread+0x328/0x630
[   18.083563]  ret_from_fork+0x10/0x20
[   18.083612] 
[   18.083631] Allocated by task 174:
[   18.083657]  kasan_save_stack+0x3c/0x68
[   18.083696]  kasan_save_track+0x20/0x40
[   18.083732]  kasan_save_alloc_info+0x40/0x58
[   18.083770]  __kasan_kmalloc+0xd4/0xd8
[   18.083814]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.083852]  kmalloc_oob_memset_4+0xb0/0x300
[   18.083935]  kunit_try_run_case+0x170/0x3f0
[   18.083972]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.084224]  kthread+0x328/0x630
[   18.084266]  ret_from_fork+0x10/0x20
[   18.084384] 
[   18.084470] The buggy address belongs to the object at fff00000c3ec0300
[   18.084470]  which belongs to the cache kmalloc-128 of size 128
[   18.084600] The buggy address is located 117 bytes inside of
[   18.084600]  allocated 120-byte region [fff00000c3ec0300, fff00000c3ec0378)
[   18.084678] 
[   18.084697] The buggy address belongs to the physical page:
[   18.084749] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ec0
[   18.084798] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.085087] page_type: f5(slab)
[   18.085233] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.085361] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.085504] page dumped because: kasan: bad access detected
[   18.085603] 
[   18.085680] Memory state around the buggy address:
[   18.085804]  fff00000c3ec0200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.086054]  fff00000c3ec0280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.086095] >fff00000c3ec0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.086159]                                                                 ^
[   18.086521]  fff00000c3ec0380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.086674]  fff00000c3ec0400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.086824] ==================================================================

[   13.681927] ==================================================================
[   13.682485] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   13.682767] Write of size 4 at addr ffff8881021db975 by task kunit_try_catch/192
[   13.683033] 
[   13.683143] CPU: 0 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.683199] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.683212] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.683238] Call Trace:
[   13.683254]  <TASK>
[   13.683277]  dump_stack_lvl+0x73/0xb0
[   13.683314]  print_report+0xd1/0x650
[   13.683339]  ? __virt_addr_valid+0x1db/0x2d0
[   13.683367]  ? kmalloc_oob_memset_4+0x166/0x330
[   13.683390]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.683414]  ? kmalloc_oob_memset_4+0x166/0x330
[   13.683439]  kasan_report+0x141/0x180
[   13.683464]  ? kmalloc_oob_memset_4+0x166/0x330
[   13.683494]  kasan_check_range+0x10c/0x1c0
[   13.683520]  __asan_memset+0x27/0x50
[   13.683541]  kmalloc_oob_memset_4+0x166/0x330
[   13.683566]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   13.683591]  ? __schedule+0x10cc/0x2b60
[   13.683617]  ? __pfx_read_tsc+0x10/0x10
[   13.683641]  ? ktime_get_ts64+0x86/0x230
[   13.683669]  kunit_try_run_case+0x1a5/0x480
[   13.683697]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.683721]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.683747]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.683772]  ? __kthread_parkme+0x82/0x180
[   13.684710]  ? preempt_count_sub+0x50/0x80
[   13.684751]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.684779]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.684819]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.684844]  kthread+0x337/0x6f0
[   13.684868]  ? trace_preempt_on+0x20/0xc0
[   13.684895]  ? __pfx_kthread+0x10/0x10
[   13.684918]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.684943]  ? calculate_sigpending+0x7b/0xa0
[   13.684971]  ? __pfx_kthread+0x10/0x10
[   13.684996]  ret_from_fork+0x116/0x1d0
[   13.685017]  ? __pfx_kthread+0x10/0x10
[   13.685040]  ret_from_fork_asm+0x1a/0x30
[   13.685077]  </TASK>
[   13.685130] 
[   13.697714] Allocated by task 192:
[   13.698150]  kasan_save_stack+0x45/0x70
[   13.698414]  kasan_save_track+0x18/0x40
[   13.698621]  kasan_save_alloc_info+0x3b/0x50
[   13.698815]  __kasan_kmalloc+0xb7/0xc0
[   13.699029]  __kmalloc_cache_noprof+0x189/0x420
[   13.699385]  kmalloc_oob_memset_4+0xac/0x330
[   13.699558]  kunit_try_run_case+0x1a5/0x480
[   13.699754]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.700073]  kthread+0x337/0x6f0
[   13.700269]  ret_from_fork+0x116/0x1d0
[   13.700500]  ret_from_fork_asm+0x1a/0x30
[   13.700716] 
[   13.700837] The buggy address belongs to the object at ffff8881021db900
[   13.700837]  which belongs to the cache kmalloc-128 of size 128
[   13.702023] The buggy address is located 117 bytes inside of
[   13.702023]  allocated 120-byte region [ffff8881021db900, ffff8881021db978)
[   13.702687] 
[   13.702815] The buggy address belongs to the physical page:
[   13.703051] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1021db
[   13.703410] flags: 0x200000000000000(node=0|zone=2)
[   13.703676] page_type: f5(slab)
[   13.703998] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.704420] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.704778] page dumped because: kasan: bad access detected
[   13.705054] 
[   13.705665] Memory state around the buggy address:
[   13.705980]  ffff8881021db800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.706754]  ffff8881021db880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.707398] >ffff8881021db900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.707908]                                                                 ^
[   13.708676]  ffff8881021db980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.709048]  ffff8881021dba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.709969] ==================================================================