Hay
Date
July 9, 2025, 2:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.035978] ==================================================================
[   17.036046] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   17.036117] Write of size 8 at addr fff00000c7767671 by task kunit_try_catch/176
[   17.036182] 
[   17.036243] CPU: 0 UID: 0 PID: 176 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   17.036346] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.036373] Hardware name: linux,dummy-virt (DT)
[   17.036405] Call trace:
[   17.036427]  show_stack+0x20/0x38 (C)
[   17.036477]  dump_stack_lvl+0x8c/0xd0
[   17.036525]  print_report+0x118/0x608
[   17.036576]  kasan_report+0xdc/0x128
[   17.036621]  kasan_check_range+0x100/0x1a8
[   17.036796]  __asan_memset+0x34/0x78
[   17.036870]  kmalloc_oob_memset_8+0x150/0x2f8
[   17.036934]  kunit_try_run_case+0x170/0x3f0
[   17.036995]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.037049]  kthread+0x328/0x630
[   17.037103]  ret_from_fork+0x10/0x20
[   17.037152] 
[   17.037170] Allocated by task 176:
[   17.037198]  kasan_save_stack+0x3c/0x68
[   17.037246]  kasan_save_track+0x20/0x40
[   17.037292]  kasan_save_alloc_info+0x40/0x58
[   17.037332]  __kasan_kmalloc+0xd4/0xd8
[   17.037369]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.037416]  kmalloc_oob_memset_8+0xb0/0x2f8
[   17.038263]  kunit_try_run_case+0x170/0x3f0
[   17.038323]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.038375]  kthread+0x328/0x630
[   17.038408]  ret_from_fork+0x10/0x20
[   17.038443] 
[   17.038463] The buggy address belongs to the object at fff00000c7767600
[   17.038463]  which belongs to the cache kmalloc-128 of size 128
[   17.038523] The buggy address is located 113 bytes inside of
[   17.038523]  allocated 120-byte region [fff00000c7767600, fff00000c7767678)
[   17.038585] 
[   17.038604] The buggy address belongs to the physical page:
[   17.038634] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107767
[   17.038687] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.038736] page_type: f5(slab)
[   17.038778] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.038828] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.038868] page dumped because: kasan: bad access detected
[   17.038899] 
[   17.038917] Memory state around the buggy address:
[   17.038948]  fff00000c7767500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.038991]  fff00000c7767580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.039033] >fff00000c7767600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.039071]                                                                 ^
[   17.039177]  fff00000c7767680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.039289]  fff00000c7767700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.039465] ==================================================================

[   12.890799] ==================================================================
[   12.891271] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   12.891640] Write of size 8 at addr ffff8881029adc71 by task kunit_try_catch/193
[   12.891982] 
[   12.892085] CPU: 0 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.892154] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.892165] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.892186] Call Trace:
[   12.892199]  <TASK>
[   12.892216]  dump_stack_lvl+0x73/0xb0
[   12.892246]  print_report+0xd1/0x650
[   12.892269]  ? __virt_addr_valid+0x1db/0x2d0
[   12.892294]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.892315]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.892338]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.892360]  kasan_report+0x141/0x180
[   12.892400]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.892427]  kasan_check_range+0x10c/0x1c0
[   12.892450]  __asan_memset+0x27/0x50
[   12.892469]  kmalloc_oob_memset_8+0x166/0x330
[   12.892509]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   12.892532]  ? __schedule+0x10cc/0x2b60
[   12.892555]  ? __pfx_read_tsc+0x10/0x10
[   12.892576]  ? ktime_get_ts64+0x86/0x230
[   12.892613]  kunit_try_run_case+0x1a5/0x480
[   12.892639]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.892661]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.892686]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.892709]  ? __kthread_parkme+0x82/0x180
[   12.892731]  ? preempt_count_sub+0x50/0x80
[   12.892756]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.892780]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.892804]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.892846]  kthread+0x337/0x6f0
[   12.892864]  ? trace_preempt_on+0x20/0xc0
[   12.892902]  ? __pfx_kthread+0x10/0x10
[   12.892923]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.892944]  ? calculate_sigpending+0x7b/0xa0
[   12.892968]  ? __pfx_kthread+0x10/0x10
[   12.893111]  ret_from_fork+0x116/0x1d0
[   12.893133]  ? __pfx_kthread+0x10/0x10
[   12.893153]  ret_from_fork_asm+0x1a/0x30
[   12.893184]  </TASK>
[   12.893195] 
[   12.901742] Allocated by task 193:
[   12.902029]  kasan_save_stack+0x45/0x70
[   12.902200]  kasan_save_track+0x18/0x40
[   12.902336]  kasan_save_alloc_info+0x3b/0x50
[   12.902505]  __kasan_kmalloc+0xb7/0xc0
[   12.902668]  __kmalloc_cache_noprof+0x189/0x420
[   12.902955]  kmalloc_oob_memset_8+0xac/0x330
[   12.903205]  kunit_try_run_case+0x1a5/0x480
[   12.903416]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.903660]  kthread+0x337/0x6f0
[   12.903803]  ret_from_fork+0x116/0x1d0
[   12.903938]  ret_from_fork_asm+0x1a/0x30
[   12.904079] 
[   12.904149] The buggy address belongs to the object at ffff8881029adc00
[   12.904149]  which belongs to the cache kmalloc-128 of size 128
[   12.904713] The buggy address is located 113 bytes inside of
[   12.904713]  allocated 120-byte region [ffff8881029adc00, ffff8881029adc78)
[   12.905320] 
[   12.905451] The buggy address belongs to the physical page:
[   12.905737] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029ad
[   12.906197] flags: 0x200000000000000(node=0|zone=2)
[   12.906436] page_type: f5(slab)
[   12.906560] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.906804] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.907194] page dumped because: kasan: bad access detected
[   12.907466] 
[   12.907579] Memory state around the buggy address:
[   12.907856]  ffff8881029adb00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.908219]  ffff8881029adb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.908563] >ffff8881029adc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.909277]                                                                 ^
[   12.909502]  ffff8881029adc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.909947]  ffff8881029add00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.910307] ==================================================================