Date
June 5, 2025, 7:08 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 25.365427] ================================================================== [ 25.365548] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0 [ 25.365660] Read of size 64 at addr fff00000c7781f04 by task kunit_try_catch/182 [ 25.365780] [ 25.365849] CPU: 0 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250605 #1 PREEMPT [ 25.366049] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.366113] Hardware name: linux,dummy-virt (DT) [ 25.366187] Call trace: [ 25.366236] show_stack+0x20/0x38 (C) [ 25.366449] dump_stack_lvl+0x8c/0xd0 [ 25.366588] print_report+0x118/0x608 [ 25.366733] kasan_report+0xdc/0x128 [ 25.366868] kasan_check_range+0x100/0x1a8 [ 25.367013] __asan_memmove+0x3c/0x98 [ 25.367142] kmalloc_memmove_invalid_size+0x154/0x2e0 [ 25.367291] kunit_try_run_case+0x170/0x3f0 [ 25.367454] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 25.367772] kthread+0x328/0x630 [ 25.367940] ret_from_fork+0x10/0x20 [ 25.368077] [ 25.368137] Allocated by task 182: [ 25.368216] kasan_save_stack+0x3c/0x68 [ 25.368346] kasan_save_track+0x20/0x40 [ 25.368453] kasan_save_alloc_info+0x40/0x58 [ 25.368569] __kasan_kmalloc+0xd4/0xd8 [ 25.368764] __kmalloc_cache_noprof+0x16c/0x3c0 [ 25.369085] kmalloc_memmove_invalid_size+0xb0/0x2e0 [ 25.369226] kunit_try_run_case+0x170/0x3f0 [ 25.369473] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 25.369671] kthread+0x328/0x630 [ 25.369931] ret_from_fork+0x10/0x20 [ 25.370066] [ 25.370112] The buggy address belongs to the object at fff00000c7781f00 [ 25.370112] which belongs to the cache kmalloc-64 of size 64 [ 25.370253] The buggy address is located 4 bytes inside of [ 25.370253] allocated 64-byte region [fff00000c7781f00, fff00000c7781f40) [ 25.370567] [ 25.370629] The buggy address belongs to the physical page: [ 25.370717] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107781 [ 25.370858] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 25.371877] page_type: f5(slab) [ 25.372150] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 25.372231] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 25.372283] page dumped because: kasan: bad access detected [ 25.372323] [ 25.372370] Memory state around the buggy address: [ 25.372413] fff00000c7781e00: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 25.372470] fff00000c7781e80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.372524] >fff00000c7781f00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 25.372573] ^ [ 25.372616] fff00000c7781f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.372670] fff00000c7782000: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 25.372717] ==================================================================
[ 11.601672] ================================================================== [ 11.602824] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.603101] Read of size 64 at addr ffff88810277f304 by task kunit_try_catch/199 [ 11.603322] [ 11.603409] CPU: 1 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250605 #1 PREEMPT(voluntary) [ 11.603453] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.603466] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.603487] Call Trace: [ 11.603498] <TASK> [ 11.603513] dump_stack_lvl+0x73/0xb0 [ 11.603539] print_report+0xd1/0x650 [ 11.603561] ? __virt_addr_valid+0x1db/0x2d0 [ 11.603585] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.603608] ? kasan_complete_mode_report_info+0x2a/0x200 [ 11.603630] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.603653] kasan_report+0x141/0x180 [ 11.603675] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.603703] kasan_check_range+0x10c/0x1c0 [ 11.603725] __asan_memmove+0x27/0x70 [ 11.603744] kmalloc_memmove_invalid_size+0x16f/0x330 [ 11.603768] ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10 [ 11.603793] ? __schedule+0x10cc/0x2b60 [ 11.603816] ? __pfx_read_tsc+0x10/0x10 [ 11.603837] ? ktime_get_ts64+0x86/0x230 [ 11.603861] kunit_try_run_case+0x1a5/0x480 [ 11.603882] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.604169] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.604200] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.604400] ? __kthread_parkme+0x82/0x180 [ 11.604426] ? preempt_count_sub+0x50/0x80 [ 11.604463] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.604485] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.604509] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.604533] kthread+0x337/0x6f0 [ 11.604553] ? trace_preempt_on+0x20/0xc0 [ 11.604575] ? __pfx_kthread+0x10/0x10 [ 11.604595] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.604634] ? calculate_sigpending+0x7b/0xa0 [ 11.604658] ? __pfx_kthread+0x10/0x10 [ 11.604678] ret_from_fork+0x116/0x1d0 [ 11.604696] ? __pfx_kthread+0x10/0x10 [ 11.604715] ret_from_fork_asm+0x1a/0x30 [ 11.604745] </TASK> [ 11.604756] [ 11.619747] Allocated by task 199: [ 11.619888] kasan_save_stack+0x45/0x70 [ 11.620259] kasan_save_track+0x18/0x40 [ 11.620599] kasan_save_alloc_info+0x3b/0x50 [ 11.621010] __kasan_kmalloc+0xb7/0xc0 [ 11.621344] __kmalloc_cache_noprof+0x189/0x420 [ 11.621758] kmalloc_memmove_invalid_size+0xac/0x330 [ 11.622451] kunit_try_run_case+0x1a5/0x480 [ 11.622863] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.623447] kthread+0x337/0x6f0 [ 11.623820] ret_from_fork+0x116/0x1d0 [ 11.624269] ret_from_fork_asm+0x1a/0x30 [ 11.624652] [ 11.624819] The buggy address belongs to the object at ffff88810277f300 [ 11.624819] which belongs to the cache kmalloc-64 of size 64 [ 11.626045] The buggy address is located 4 bytes inside of [ 11.626045] allocated 64-byte region [ffff88810277f300, ffff88810277f340) [ 11.627222] [ 11.627388] The buggy address belongs to the physical page: [ 11.628084] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10277f [ 11.628931] flags: 0x200000000000000(node=0|zone=2) [ 11.629458] page_type: f5(slab) [ 11.629817] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 11.630528] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 11.631290] page dumped because: kasan: bad access detected [ 11.631467] [ 11.631536] Memory state around the buggy address: [ 11.631712] ffff88810277f200: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 11.632402] ffff88810277f280: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.633171] >ffff88810277f300: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 11.633954] ^ [ 11.634451] ffff88810277f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.635123] ffff88810277f400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.635661] ==================================================================