Date
March 19, 2025, 10:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 34.415293] ================================================================== [ 34.415970] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e8 [ 34.416178] Read of size 64 at addr fff00000c5d89904 by task kunit_try_catch/184 [ 34.416340] [ 34.416436] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.14.0-rc7-next-20250319 #1 PREEMPT [ 34.417342] Tainted: [B]=BAD_PAGE, [N]=TEST [ 34.417451] Hardware name: linux,dummy-virt (DT) [ 34.417555] Call trace: [ 34.417629] show_stack+0x20/0x38 (C) [ 34.417779] dump_stack_lvl+0x8c/0xd0 [ 34.417928] print_report+0x118/0x5f0 [ 34.418676] kasan_report+0xc8/0x118 [ 34.418952] kasan_check_range+0x100/0x1a8 [ 34.419153] __asan_memmove+0x3c/0x98 [ 34.419374] kmalloc_memmove_invalid_size+0x154/0x2e8 [ 34.419579] kunit_try_run_case+0x14c/0x3d0 [ 34.419739] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 34.419982] kthread+0x318/0x618 [ 34.420217] ret_from_fork+0x10/0x20 [ 34.420423] [ 34.420517] Allocated by task 184: [ 34.420667] kasan_save_stack+0x3c/0x68 [ 34.420872] kasan_save_track+0x20/0x40 [ 34.420984] kasan_save_alloc_info+0x40/0x58 [ 34.421154] __kasan_kmalloc+0xd4/0xd8 [ 34.421270] __kmalloc_cache_noprof+0x15c/0x3c0 [ 34.421445] kmalloc_memmove_invalid_size+0xb0/0x2e8 [ 34.421583] kunit_try_run_case+0x14c/0x3d0 [ 34.421785] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 34.421945] kthread+0x318/0x618 [ 34.422142] ret_from_fork+0x10/0x20 [ 34.422304] [ 34.422408] The buggy address belongs to the object at fff00000c5d89900 [ 34.422408] which belongs to the cache kmalloc-64 of size 64 [ 34.422712] The buggy address is located 4 bytes inside of [ 34.422712] allocated 64-byte region [fff00000c5d89900, fff00000c5d89940) [ 34.422942] [ 34.423016] The buggy address belongs to the physical page: [ 34.423134] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105d89 [ 34.423305] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 34.423460] page_type: f5(slab) [ 34.423571] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 34.423734] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 34.423878] page dumped because: kasan: bad access detected [ 34.423984] [ 34.424047] Memory state around the buggy address: [ 34.424600] fff00000c5d89800: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 34.425044] fff00000c5d89880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 34.425392] >fff00000c5d89900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 34.425884] ^ [ 34.426278] fff00000c5d89980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.427220] fff00000c5d89a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.427755] ==================================================================
[ 22.088350] ================================================================== [ 22.089850] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330 [ 22.090263] Read of size 64 at addr ffff88810321e104 by task kunit_try_catch/203 [ 22.090740] [ 22.091007] CPU: 1 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G B N 6.14.0-rc7-next-20250319 #1 PREEMPT(voluntary) [ 22.091154] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.091190] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 22.091247] Call Trace: [ 22.091279] <TASK> [ 22.091314] dump_stack_lvl+0x73/0xb0 [ 22.091361] print_report+0xd1/0x660 [ 22.091396] ? __virt_addr_valid+0x1db/0x2d0 [ 22.091476] ? kasan_complete_mode_report_info+0x2a/0x200 [ 22.091525] kasan_report+0x104/0x140 [ 22.091555] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 22.091602] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 22.091664] kasan_check_range+0x10c/0x1c0 [ 22.091700] __asan_memmove+0x27/0x70 [ 22.091984] kmalloc_memmove_invalid_size+0x16f/0x330 [ 22.092068] ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10 [ 22.092167] ? __schedule+0xd46/0x29c0 [ 22.092234] ? __pfx_read_tsc+0x10/0x10 [ 22.092293] ? ktime_get_ts64+0x86/0x240 [ 22.092367] kunit_try_run_case+0x1b2/0x490 [ 22.092439] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.092500] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 22.092563] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 22.092627] ? __kthread_parkme+0x82/0x160 [ 22.092751] ? preempt_count_sub+0x50/0x80 [ 22.092865] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.092920] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.092956] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 22.092990] kthread+0x323/0x710 [ 22.093020] ? trace_preempt_on+0x20/0xc0 [ 22.093054] ? __pfx_kthread+0x10/0x10 [ 22.093086] ? _raw_spin_unlock_irq+0x47/0x80 [ 22.093139] ? calculate_sigpending+0x7b/0xa0 [ 22.093172] ? __pfx_kthread+0x10/0x10 [ 22.093204] ret_from_fork+0x41/0x80 [ 22.093237] ? __pfx_kthread+0x10/0x10 [ 22.093268] ret_from_fork_asm+0x1a/0x30 [ 22.093315] </TASK> [ 22.093331] [ 22.109049] Allocated by task 203: [ 22.109433] kasan_save_stack+0x3d/0x60 [ 22.110087] kasan_save_track+0x18/0x40 [ 22.110576] kasan_save_alloc_info+0x3b/0x50 [ 22.111329] __kasan_kmalloc+0xb7/0xc0 [ 22.111852] __kmalloc_cache_noprof+0x183/0x410 [ 22.112202] kmalloc_memmove_invalid_size+0xac/0x330 [ 22.113028] kunit_try_run_case+0x1b2/0x490 [ 22.113530] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.114295] kthread+0x323/0x710 [ 22.114876] ret_from_fork+0x41/0x80 [ 22.115321] ret_from_fork_asm+0x1a/0x30 [ 22.115731] [ 22.115894] The buggy address belongs to the object at ffff88810321e100 [ 22.115894] which belongs to the cache kmalloc-64 of size 64 [ 22.116930] The buggy address is located 4 bytes inside of [ 22.116930] allocated 64-byte region [ffff88810321e100, ffff88810321e140) [ 22.118455] [ 22.118649] The buggy address belongs to the physical page: [ 22.120599] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10321e [ 22.122370] flags: 0x200000000000000(node=0|zone=2) [ 22.122853] page_type: f5(slab) [ 22.124324] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 22.125368] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 22.126182] page dumped because: kasan: bad access detected [ 22.126553] [ 22.126760] Memory state around the buggy address: [ 22.127319] ffff88810321e000: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 22.127995] ffff88810321e080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 22.128748] >ffff88810321e100: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 22.129508] ^ [ 22.129985] ffff88810321e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.130429] ffff88810321e200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.131306] ==================================================================