Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.553439] ================================================================== [ 21.554426] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x15c/0x2f8 [ 21.555226] Read of size 64 at addr fff00000c413b784 by task kunit_try_catch/170 [ 21.556013] [ 21.556567] CPU: 1 UID: 0 PID: 170 Comm: kunit_try_catch Tainted: G B N 6.12.33-rc1 #1 [ 21.556787] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.556863] Hardware name: linux,dummy-virt (DT) [ 21.556912] Call trace: [ 21.556941] dump_backtrace+0x9c/0x128 [ 21.557050] show_stack+0x20/0x38 [ 21.557097] dump_stack_lvl+0x8c/0xd0 [ 21.557146] print_report+0x118/0x5f0 [ 21.557191] kasan_report+0xdc/0x128 [ 21.557232] kasan_check_range+0x100/0x1a8 [ 21.557277] __asan_memmove+0x3c/0x98 [ 21.557319] kmalloc_memmove_invalid_size+0x15c/0x2f8 [ 21.557371] kunit_try_run_case+0x170/0x3f0 [ 21.557416] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.557467] kthread+0x24c/0x2d0 [ 21.557509] ret_from_fork+0x10/0x20 [ 21.557558] [ 21.565921] Allocated by task 170: [ 21.566438] kasan_save_stack+0x3c/0x68 [ 21.567057] kasan_save_track+0x20/0x40 [ 21.567901] kasan_save_alloc_info+0x40/0x58 [ 21.568518] __kasan_kmalloc+0xd4/0xd8 [ 21.569067] __kmalloc_cache_noprof+0x154/0x320 [ 21.569665] kmalloc_memmove_invalid_size+0xb8/0x2f8 [ 21.570322] kunit_try_run_case+0x170/0x3f0 [ 21.570866] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.571785] kthread+0x24c/0x2d0 [ 21.572290] ret_from_fork+0x10/0x20 [ 21.572860] [ 21.573240] The buggy address belongs to the object at fff00000c413b780 [ 21.573240] which belongs to the cache kmalloc-64 of size 64 [ 21.574487] The buggy address is located 4 bytes inside of [ 21.574487] allocated 64-byte region [fff00000c413b780, fff00000c413b7c0) [ 21.575865] [ 21.576235] The buggy address belongs to the physical page: [ 21.577675] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10413b [ 21.578529] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.579247] page_type: f5(slab) [ 21.579706] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 21.580477] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 [ 21.581504] page dumped because: kasan: bad access detected [ 21.582240] [ 21.582743] Memory state around the buggy address: [ 21.583493] fff00000c413b680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 21.584457] fff00000c413b700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 21.585179] >fff00000c413b780: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 21.585843] ^ [ 21.586400] fff00000c413b800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.587080] fff00000c413b880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.587735] ==================================================================
[ 17.925017] ================================================================== [ 17.926033] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x170/0x330 [ 17.927665] Read of size 64 at addr ffff88810230b784 by task kunit_try_catch/187 [ 17.929190] [ 17.929596] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G B N 6.12.33-rc1 #1 [ 17.929717] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.929751] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 17.929841] Call Trace: [ 17.929880] <TASK> [ 17.929931] dump_stack_lvl+0x73/0xb0 [ 17.930014] print_report+0xd1/0x640 [ 17.930092] ? __virt_addr_valid+0x1db/0x2d0 [ 17.930157] ? kmalloc_memmove_invalid_size+0x170/0x330 [ 17.930188] ? kasan_complete_mode_report_info+0x2a/0x200 [ 17.930244] ? kmalloc_memmove_invalid_size+0x170/0x330 [ 17.930277] kasan_report+0x140/0x180 [ 17.930312] ? kmalloc_memmove_invalid_size+0x170/0x330 [ 17.930349] kasan_check_range+0x10c/0x1c0 [ 17.930378] __asan_memmove+0x27/0x70 [ 17.930409] kmalloc_memmove_invalid_size+0x170/0x330 [ 17.930443] ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10 [ 17.930576] ? __schedule+0x1bb4/0x27a0 [ 17.930608] ? __pfx_read_tsc+0x10/0x10 [ 17.930635] ? ktime_get_ts64+0x84/0x230 [ 17.930672] kunit_try_run_case+0x1a6/0x480 [ 17.930705] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.930733] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 17.930761] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 17.930796] ? __kthread_parkme+0x82/0x160 [ 17.930846] ? preempt_count_sub+0x50/0x80 [ 17.930887] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.930915] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 17.930951] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.930987] kthread+0x257/0x310 [ 17.931011] ? __pfx_kthread+0x10/0x10 [ 17.931036] ret_from_fork+0x41/0x80 [ 17.931065] ? __pfx_kthread+0x10/0x10 [ 17.931090] ret_from_fork_asm+0x1a/0x30 [ 17.931130] </TASK> [ 17.931143] [ 17.951269] Allocated by task 187: [ 17.951726] kasan_save_stack+0x45/0x70 [ 17.952024] kasan_save_track+0x18/0x40 [ 17.952437] kasan_save_alloc_info+0x3b/0x50 [ 17.953481] __kasan_kmalloc+0xb7/0xc0 [ 17.954155] __kmalloc_cache_noprof+0x168/0x350 [ 17.954802] kmalloc_memmove_invalid_size+0xad/0x330 [ 17.955866] kunit_try_run_case+0x1a6/0x480 [ 17.956176] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.956760] kthread+0x257/0x310 [ 17.957093] ret_from_fork+0x41/0x80 [ 17.957504] ret_from_fork_asm+0x1a/0x30 [ 17.957867] [ 17.958064] The buggy address belongs to the object at ffff88810230b780 [ 17.958064] which belongs to the cache kmalloc-64 of size 64 [ 17.960360] The buggy address is located 4 bytes inside of [ 17.960360] allocated 64-byte region [ffff88810230b780, ffff88810230b7c0) [ 17.962128] [ 17.962371] The buggy address belongs to the physical page: [ 17.963131] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10230b [ 17.963915] flags: 0x200000000000000(node=0|zone=2) [ 17.964764] page_type: f5(slab) [ 17.965802] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 17.966371] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 [ 17.967690] page dumped because: kasan: bad access detected [ 17.968169] [ 17.968409] Memory state around the buggy address: [ 17.969254] ffff88810230b680: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 17.970000] ffff88810230b700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.971280] >ffff88810230b780: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 17.972036] ^ [ 17.973099] ffff88810230b800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.973991] ffff88810230b880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.975002] ==================================================================