Hay
Date
July 15, 2025, 2:09 p.m.

Environment
qemu-x86_64

[   11.135101] ==================================================================
[   11.135542] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   11.135851] Write of size 8 at addr ffff888102f2ad71 by task kunit_try_catch/195
[   11.136298] 
[   11.136628] CPU: 1 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.15.7-rc1 #1 PREEMPT(voluntary) 
[   11.136677] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.136688] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.136707] Call Trace:
[   11.136718]  <TASK>
[   11.136732]  dump_stack_lvl+0x73/0xb0
[   11.136756]  print_report+0xd1/0x610
[   11.136778]  ? __virt_addr_valid+0x1db/0x2d0
[   11.136798]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.136819]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.136840]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.136862]  kasan_report+0x141/0x180
[   11.136897]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.136924]  kasan_check_range+0x10c/0x1c0
[   11.136942]  __asan_memset+0x27/0x50
[   11.136962]  kmalloc_oob_memset_8+0x166/0x330
[   11.136984]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   11.137006]  ? __schedule+0x10cc/0x2b60
[   11.137029]  ? __pfx_read_tsc+0x10/0x10
[   11.137048]  ? ktime_get_ts64+0x86/0x230
[   11.137071]  kunit_try_run_case+0x1a5/0x480
[   11.137091]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.137108]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.137136]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.137158]  ? __kthread_parkme+0x82/0x180
[   11.137180]  ? preempt_count_sub+0x50/0x80
[   11.137204]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.137224]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.137246]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.137268]  kthread+0x337/0x6f0
[   11.137283]  ? trace_preempt_on+0x20/0xc0
[   11.137306]  ? __pfx_kthread+0x10/0x10
[   11.137323]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.137343]  ? calculate_sigpending+0x7b/0xa0
[   11.137364]  ? __pfx_kthread+0x10/0x10
[   11.137381]  ret_from_fork+0x41/0x80
[   11.137401]  ? __pfx_kthread+0x10/0x10
[   11.137418]  ret_from_fork_asm+0x1a/0x30
[   11.137448]  </TASK>
[   11.137458] 
[   11.147185] Allocated by task 195:
[   11.147494]  kasan_save_stack+0x45/0x70
[   11.147929]  kasan_save_track+0x18/0x40
[   11.148115]  kasan_save_alloc_info+0x3b/0x50
[   11.148309]  __kasan_kmalloc+0xb7/0xc0
[   11.148482]  __kmalloc_cache_noprof+0x189/0x420
[   11.148680]  kmalloc_oob_memset_8+0xac/0x330
[   11.149103]  kunit_try_run_case+0x1a5/0x480
[   11.149553]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.150028]  kthread+0x337/0x6f0
[   11.150509]  ret_from_fork+0x41/0x80
[   11.150790]  ret_from_fork_asm+0x1a/0x30
[   11.150989] 
[   11.151082] The buggy address belongs to the object at ffff888102f2ad00
[   11.151082]  which belongs to the cache kmalloc-128 of size 128
[   11.151574] The buggy address is located 113 bytes inside of
[   11.151574]  allocated 120-byte region [ffff888102f2ad00, ffff888102f2ad78)
[   11.152390] 
[   11.152572] The buggy address belongs to the physical page:
[   11.153045] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f2a
[   11.153682] flags: 0x200000000000000(node=0|zone=2)
[   11.154170] page_type: f5(slab)
[   11.154329] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.154642] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.155347] page dumped because: kasan: bad access detected
[   11.155759] 
[   11.156081] Memory state around the buggy address:
[   11.156284]  ffff888102f2ac00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.156578]  ffff888102f2ac80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.157414] >ffff888102f2ad00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.158107]                                                                 ^
[   11.158406]  ffff888102f2ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.158857]  ffff888102f2ae00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.159349] ==================================================================