Hay
Date
June 23, 2025, 1:39 p.m.

Environment
qemu-x86_64

[   17.210501] ==================================================================
[   17.211414] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   17.211975] Write of size 128 at addr ffff888102a13100 by task kunit_try_catch/191
[   17.212648] 
[   17.212932] CPU: 0 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT(voluntary) 
[   17.213060] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.213095] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.213155] Call Trace:
[   17.213194]  <TASK>
[   17.213281]  dump_stack_lvl+0x73/0xb0
[   17.213360]  print_report+0xd1/0x650
[   17.213431]  ? __virt_addr_valid+0x1db/0x2d0
[   17.213502]  ? kmalloc_oob_in_memset+0x15f/0x320
[   17.213574]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.213742]  ? kmalloc_oob_in_memset+0x15f/0x320
[   17.213835]  kasan_report+0x141/0x180
[   17.213914]  ? kmalloc_oob_in_memset+0x15f/0x320
[   17.214032]  kasan_check_range+0x10c/0x1c0
[   17.214103]  __asan_memset+0x27/0x50
[   17.214171]  kmalloc_oob_in_memset+0x15f/0x320
[   17.214290]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   17.214368]  ? __schedule+0x10cc/0x2b60
[   17.214481]  ? __pfx_read_tsc+0x10/0x10
[   17.214518]  ? ktime_get_ts64+0x86/0x230
[   17.214557]  kunit_try_run_case+0x1a5/0x480
[   17.214595]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.214692]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.214756]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.214793]  ? __kthread_parkme+0x82/0x180
[   17.214827]  ? preempt_count_sub+0x50/0x80
[   17.214864]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.214899]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.214934]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.214968]  kthread+0x337/0x6f0
[   17.214991]  ? trace_preempt_on+0x20/0xc0
[   17.215027]  ? __pfx_kthread+0x10/0x10
[   17.215052]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.215084]  ? calculate_sigpending+0x7b/0xa0
[   17.215115]  ? __pfx_kthread+0x10/0x10
[   17.215140]  ret_from_fork+0x41/0x80
[   17.215172]  ? __pfx_kthread+0x10/0x10
[   17.215196]  ret_from_fork_asm+0x1a/0x30
[   17.215269]  </TASK>
[   17.215288] 
[   17.233332] Allocated by task 191:
[   17.234167]  kasan_save_stack+0x45/0x70
[   17.234820]  kasan_save_track+0x18/0x40
[   17.235672]  kasan_save_alloc_info+0x3b/0x50
[   17.236151]  __kasan_kmalloc+0xb7/0xc0
[   17.236842]  __kmalloc_cache_noprof+0x189/0x420
[   17.237446]  kmalloc_oob_in_memset+0xac/0x320
[   17.238398]  kunit_try_run_case+0x1a5/0x480
[   17.239290]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.239945]  kthread+0x337/0x6f0
[   17.240285]  ret_from_fork+0x41/0x80
[   17.240655]  ret_from_fork_asm+0x1a/0x30
[   17.241036] 
[   17.241241] The buggy address belongs to the object at ffff888102a13100
[   17.241241]  which belongs to the cache kmalloc-128 of size 128
[   17.242893] The buggy address is located 0 bytes inside of
[   17.242893]  allocated 120-byte region [ffff888102a13100, ffff888102a13178)
[   17.244725] 
[   17.244908] The buggy address belongs to the physical page:
[   17.245776] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a13
[   17.247086] flags: 0x200000000000000(node=0|zone=2)
[   17.247516] page_type: f5(slab)
[   17.248085] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.248633] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.249341] page dumped because: kasan: bad access detected
[   17.250497] 
[   17.251192] Memory state around the buggy address:
[   17.251674]  ffff888102a13000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.252231]  ffff888102a13080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.253745] >ffff888102a13100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.254706]                                                                 ^
[   17.255361]  ffff888102a13180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.256700]  ffff888102a13200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.257691] ==================================================================