Date
June 24, 2025, 12:47 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 24.039508] ================================================================== [ 24.039691] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0 [ 24.039860] Read of size 64 at addr fff00000c59e9d04 by task kunit_try_catch/184 [ 24.040069] [ 24.040210] CPU: 0 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT [ 24.040532] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.040736] Hardware name: linux,dummy-virt (DT) [ 24.040890] Call trace: [ 24.040950] show_stack+0x20/0x38 (C) [ 24.041080] dump_stack_lvl+0x8c/0xd0 [ 24.041207] print_report+0x118/0x608 [ 24.041431] kasan_report+0xdc/0x128 [ 24.041611] kasan_check_range+0x100/0x1a8 [ 24.041731] __asan_memmove+0x3c/0x98 [ 24.041878] kmalloc_memmove_invalid_size+0x154/0x2e0 [ 24.042013] kunit_try_run_case+0x170/0x3f0 [ 24.042146] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.042311] kthread+0x328/0x630 [ 24.042554] ret_from_fork+0x10/0x20 [ 24.042912] [ 24.043108] Allocated by task 184: [ 24.043194] kasan_save_stack+0x3c/0x68 [ 24.043418] kasan_save_track+0x20/0x40 [ 24.043557] kasan_save_alloc_info+0x40/0x58 [ 24.043848] __kasan_kmalloc+0xd4/0xd8 [ 24.043941] __kmalloc_cache_noprof+0x16c/0x3c0 [ 24.044086] kmalloc_memmove_invalid_size+0xb0/0x2e0 [ 24.044194] kunit_try_run_case+0x170/0x3f0 [ 24.044495] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.044662] kthread+0x328/0x630 [ 24.044799] ret_from_fork+0x10/0x20 [ 24.044985] [ 24.045120] The buggy address belongs to the object at fff00000c59e9d00 [ 24.045120] which belongs to the cache kmalloc-64 of size 64 [ 24.045263] The buggy address is located 4 bytes inside of [ 24.045263] allocated 64-byte region [fff00000c59e9d00, fff00000c59e9d40) [ 24.045424] [ 24.045477] The buggy address belongs to the physical page: [ 24.045563] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059e9 [ 24.045789] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 24.045951] page_type: f5(slab) [ 24.046058] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 24.046284] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 24.046453] page dumped because: kasan: bad access detected [ 24.046698] [ 24.046746] Memory state around the buggy address: [ 24.046826] fff00000c59e9c00: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 24.046940] fff00000c59e9c80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 24.047055] >fff00000c59e9d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 24.047160] ^ [ 24.047243] fff00000c59e9d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.047374] fff00000c59e9e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.047553] ==================================================================
[ 11.975930] ================================================================== [ 11.976397] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.977203] Read of size 64 at addr ffff8881029e0004 by task kunit_try_catch/202 [ 11.977538] [ 11.977843] CPU: 1 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT(voluntary) [ 11.977953] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.977975] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.978006] Call Trace: [ 11.978029] <TASK> [ 11.978060] dump_stack_lvl+0x73/0xb0 [ 11.978106] print_report+0xd1/0x650 [ 11.978143] ? __virt_addr_valid+0x1db/0x2d0 [ 11.978177] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.978211] ? kasan_complete_mode_report_info+0x2a/0x200 [ 11.978246] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.978281] kasan_report+0x141/0x180 [ 11.978325] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.978377] kasan_check_range+0x10c/0x1c0 [ 11.978420] __asan_memmove+0x27/0x70 [ 11.978462] kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.978502] ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10 [ 11.978544] ? __schedule+0x207f/0x2b60 [ 11.978584] ? __pfx_read_tsc+0x10/0x10 [ 11.978639] ? ktime_get_ts64+0x86/0x230 [ 11.978716] kunit_try_run_case+0x1a5/0x480 [ 11.978785] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.978831] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.978878] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.978921] ? __kthread_parkme+0x82/0x180 [ 11.978965] ? preempt_count_sub+0x50/0x80 [ 11.979007] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.979030] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.979051] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.979072] kthread+0x337/0x6f0 [ 11.979088] ? trace_preempt_on+0x20/0xc0 [ 11.979110] ? __pfx_kthread+0x10/0x10 [ 11.979126] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.979146] ? calculate_sigpending+0x7b/0xa0 [ 11.979165] ? __pfx_kthread+0x10/0x10 [ 11.979182] ret_from_fork+0x41/0x80 [ 11.979200] ? __pfx_kthread+0x10/0x10 [ 11.979216] ret_from_fork_asm+0x1a/0x30 [ 11.979245] </TASK> [ 11.979259] [ 11.988750] Allocated by task 202: [ 11.989116] kasan_save_stack+0x45/0x70 [ 11.989518] kasan_save_track+0x18/0x40 [ 11.989827] kasan_save_alloc_info+0x3b/0x50 [ 11.990146] __kasan_kmalloc+0xb7/0xc0 [ 11.990313] __kmalloc_cache_noprof+0x189/0x420 [ 11.990501] kmalloc_memmove_invalid_size+0xac/0x330 [ 11.990719] kunit_try_run_case+0x1a5/0x480 [ 11.990975] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.991365] kthread+0x337/0x6f0 [ 11.991692] ret_from_fork+0x41/0x80 [ 11.992039] ret_from_fork_asm+0x1a/0x30 [ 11.992363] [ 11.992587] The buggy address belongs to the object at ffff8881029e0000 [ 11.992587] which belongs to the cache kmalloc-64 of size 64 [ 11.993401] The buggy address is located 4 bytes inside of [ 11.993401] allocated 64-byte region [ffff8881029e0000, ffff8881029e0040) [ 11.993935] [ 11.994069] The buggy address belongs to the physical page: [ 11.994301] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029e0 [ 11.994902] flags: 0x200000000000000(node=0|zone=2) [ 11.995272] page_type: f5(slab) [ 11.995599] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 11.996075] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 11.996319] page dumped because: kasan: bad access detected [ 11.996506] [ 11.996638] Memory state around the buggy address: [ 11.996991] ffff8881029dff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.997912] ffff8881029dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.998413] >ffff8881029e0000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 11.998890] ^ [ 11.999094] ffff8881029e0080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.999327] ffff8881029e0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.999575] ==================================================================