Date
May 29, 2025, 7:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.548871] ================================================================== [ 21.549063] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8 [ 21.549221] Write of size 2 at addr fff00000c5d6eb77 by task kunit_try_catch/172 [ 21.549345] [ 21.549451] CPU: 1 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250529 #1 PREEMPT [ 21.549666] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.549729] Hardware name: linux,dummy-virt (DT) [ 21.549804] Call trace: [ 21.549860] show_stack+0x20/0x38 (C) [ 21.549980] dump_stack_lvl+0x8c/0xd0 [ 21.550106] print_report+0x118/0x608 [ 21.550222] kasan_report+0xdc/0x128 [ 21.550330] kasan_check_range+0x100/0x1a8 [ 21.554646] __asan_memset+0x34/0x78 [ 21.555384] kmalloc_oob_memset_2+0x150/0x2f8 [ 21.555930] kunit_try_run_case+0x170/0x3f0 [ 21.556116] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.556221] kthread+0x328/0x630 [ 21.556316] ret_from_fork+0x10/0x20 [ 21.557055] [ 21.557111] Allocated by task 172: [ 21.557698] kasan_save_stack+0x3c/0x68 [ 21.557929] kasan_save_track+0x20/0x40 [ 21.558020] kasan_save_alloc_info+0x40/0x58 [ 21.558875] __kasan_kmalloc+0xd4/0xd8 [ 21.559044] __kmalloc_cache_noprof+0x15c/0x3c0 [ 21.559185] kmalloc_oob_memset_2+0xb0/0x2f8 [ 21.559316] kunit_try_run_case+0x170/0x3f0 [ 21.559455] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.559559] kthread+0x328/0x630 [ 21.559792] ret_from_fork+0x10/0x20 [ 21.560105] [ 21.560163] The buggy address belongs to the object at fff00000c5d6eb00 [ 21.560163] which belongs to the cache kmalloc-128 of size 128 [ 21.561163] The buggy address is located 119 bytes inside of [ 21.561163] allocated 120-byte region [fff00000c5d6eb00, fff00000c5d6eb78) [ 21.561747] [ 21.561982] The buggy address belongs to the physical page: [ 21.562338] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105d6e [ 21.562656] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.562978] page_type: f5(slab) [ 21.563323] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 21.563716] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 21.563811] page dumped because: kasan: bad access detected [ 21.564463] [ 21.564511] Memory state around the buggy address: [ 21.564592] fff00000c5d6ea00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.565005] fff00000c5d6ea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.565202] >fff00000c5d6eb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 21.565302] ^ [ 21.565414] fff00000c5d6eb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.565529] fff00000c5d6ec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.565623] ==================================================================
[ 10.958532] ================================================================== [ 10.958978] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330 [ 10.959222] Write of size 2 at addr ffff888102f96077 by task kunit_try_catch/189 [ 10.959450] [ 10.959539] CPU: 0 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250529 #1 PREEMPT(voluntary) [ 10.959583] Tainted: [B]=BAD_PAGE, [N]=TEST [ 10.959595] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 10.959625] Call Trace: [ 10.959637] <TASK> [ 10.959652] dump_stack_lvl+0x73/0xb0 [ 10.959678] print_report+0xd1/0x650 [ 10.959700] ? __virt_addr_valid+0x1db/0x2d0 [ 10.959724] ? kmalloc_oob_memset_2+0x166/0x330 [ 10.959745] ? kasan_complete_mode_report_info+0x2a/0x200 [ 10.959766] ? kmalloc_oob_memset_2+0x166/0x330 [ 10.959788] kasan_report+0x141/0x180 [ 10.959810] ? kmalloc_oob_memset_2+0x166/0x330 [ 10.959836] kasan_check_range+0x10c/0x1c0 [ 10.959859] __asan_memset+0x27/0x50 [ 10.959879] kmalloc_oob_memset_2+0x166/0x330 [ 10.959901] ? __pfx_kmalloc_oob_memset_2+0x10/0x10 [ 10.960206] ? __schedule+0x10cc/0x2b60 [ 10.960259] ? __pfx_read_tsc+0x10/0x10 [ 10.960283] ? ktime_get_ts64+0x86/0x230 [ 10.960308] kunit_try_run_case+0x1a5/0x480 [ 10.960330] ? __pfx_kunit_try_run_case+0x10/0x10 [ 10.960350] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 10.960374] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 10.960398] ? __kthread_parkme+0x82/0x180 [ 10.960418] ? preempt_count_sub+0x50/0x80 [ 10.960441] ? __pfx_kunit_try_run_case+0x10/0x10 [ 10.960462] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 10.960485] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 10.960509] kthread+0x337/0x6f0 [ 10.960528] ? trace_preempt_on+0x20/0xc0 [ 10.960551] ? __pfx_kthread+0x10/0x10 [ 10.960571] ? _raw_spin_unlock_irq+0x47/0x80 [ 10.960593] ? calculate_sigpending+0x7b/0xa0 [ 10.960627] ? __pfx_kthread+0x10/0x10 [ 10.960648] ret_from_fork+0x116/0x1d0 [ 10.960667] ? __pfx_kthread+0x10/0x10 [ 10.960687] ret_from_fork_asm+0x1a/0x30 [ 10.960717] </TASK> [ 10.960727] [ 10.972507] Allocated by task 189: [ 10.973208] kasan_save_stack+0x45/0x70 [ 10.973598] kasan_save_track+0x18/0x40 [ 10.973930] kasan_save_alloc_info+0x3b/0x50 [ 10.974395] __kasan_kmalloc+0xb7/0xc0 [ 10.974542] __kmalloc_cache_noprof+0x189/0x420 [ 10.974710] kmalloc_oob_memset_2+0xac/0x330 [ 10.975505] kunit_try_run_case+0x1a5/0x480 [ 10.976058] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 10.976545] kthread+0x337/0x6f0 [ 10.976995] ret_from_fork+0x116/0x1d0 [ 10.977351] ret_from_fork_asm+0x1a/0x30 [ 10.977744] [ 10.977923] The buggy address belongs to the object at ffff888102f96000 [ 10.977923] which belongs to the cache kmalloc-128 of size 128 [ 10.978572] The buggy address is located 119 bytes inside of [ 10.978572] allocated 120-byte region [ffff888102f96000, ffff888102f96078) [ 10.979474] [ 10.979653] The buggy address belongs to the physical page: [ 10.980220] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f96 [ 10.981162] flags: 0x200000000000000(node=0|zone=2) [ 10.981640] page_type: f5(slab) [ 10.981913] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 10.982367] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 10.982622] page dumped because: kasan: bad access detected [ 10.982809] [ 10.982881] Memory state around the buggy address: [ 10.983165] ffff888102f95f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 10.983439] ffff888102f95f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 10.983782] >ffff888102f96000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 10.984020] ^ [ 10.984343] ffff888102f96080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 10.984604] ffff888102f96100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 10.984983] ==================================================================