Date
July 18, 2025, 1:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.618201] ================================================================== [ 31.618590] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0 [ 31.618654] Read of size 64 at addr fff00000c9aa9f84 by task kunit_try_catch/213 [ 31.619003] [ 31.619038] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250718 #1 PREEMPT [ 31.619675] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.619978] Hardware name: linux,dummy-virt (DT) [ 31.620026] Call trace: [ 31.620070] show_stack+0x20/0x38 (C) [ 31.620160] dump_stack_lvl+0x8c/0xd0 [ 31.620269] print_report+0x118/0x5e8 [ 31.620373] kasan_report+0xdc/0x128 [ 31.620424] kasan_check_range+0x100/0x1a8 [ 31.620469] __asan_memmove+0x3c/0x98 [ 31.620511] kmalloc_memmove_invalid_size+0x154/0x2e0 [ 31.620850] kunit_try_run_case+0x170/0x3f0 [ 31.621150] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.621340] kthread+0x328/0x630 [ 31.621390] ret_from_fork+0x10/0x20 [ 31.621816] [ 31.621874] Allocated by task 213: [ 31.622336] kasan_save_stack+0x3c/0x68 [ 31.622657] kasan_save_track+0x20/0x40 [ 31.622697] kasan_save_alloc_info+0x40/0x58 [ 31.622754] __kasan_kmalloc+0xd4/0xd8 [ 31.622819] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.622998] kmalloc_memmove_invalid_size+0xb0/0x2e0 [ 31.623424] kunit_try_run_case+0x170/0x3f0 [ 31.623602] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.623690] kthread+0x328/0x630 [ 31.623799] ret_from_fork+0x10/0x20 [ 31.623929] [ 31.624011] The buggy address belongs to the object at fff00000c9aa9f80 [ 31.624011] which belongs to the cache kmalloc-64 of size 64 [ 31.624126] The buggy address is located 4 bytes inside of [ 31.624126] allocated 64-byte region [fff00000c9aa9f80, fff00000c9aa9fc0) [ 31.624190] [ 31.624219] The buggy address belongs to the physical page: [ 31.624250] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109aa9 [ 31.624605] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.624759] page_type: f5(slab) [ 31.624819] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 31.625165] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 31.625293] page dumped because: kasan: bad access detected [ 31.625352] [ 31.625475] Memory state around the buggy address: [ 31.625513] fff00000c9aa9e80: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 31.625594] fff00000c9aa9f00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 31.626199] >fff00000c9aa9f80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 31.626287] ^ [ 31.626383] fff00000c9aaa000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.626426] fff00000c9aaa080: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc [ 31.626743] ==================================================================
[ 25.038605] ================================================================== [ 25.039331] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330 [ 25.039630] Read of size 64 at addr ffff8881053b8004 by task kunit_try_catch/230 [ 25.039924] [ 25.040084] CPU: 0 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) [ 25.040133] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.040145] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.040166] Call Trace: [ 25.040178] <TASK> [ 25.040195] dump_stack_lvl+0x73/0xb0 [ 25.040237] print_report+0xd1/0x640 [ 25.040259] ? __virt_addr_valid+0x1db/0x2d0 [ 25.040284] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 25.040307] ? kasan_complete_mode_report_info+0x2a/0x200 [ 25.040332] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 25.040355] kasan_report+0x141/0x180 [ 25.040376] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 25.040403] kasan_check_range+0x10c/0x1c0 [ 25.040425] __asan_memmove+0x27/0x70 [ 25.040449] kmalloc_memmove_invalid_size+0x16f/0x330 [ 25.040472] ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10 [ 25.040496] ? __schedule+0x10da/0x2b60 [ 25.040519] ? __pfx_read_tsc+0x10/0x10 [ 25.040540] ? ktime_get_ts64+0x86/0x230 [ 25.040564] kunit_try_run_case+0x1a5/0x480 [ 25.040589] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.040610] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.040643] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.040675] ? __kthread_parkme+0x82/0x180 [ 25.040695] ? preempt_count_sub+0x50/0x80 [ 25.040717] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.040739] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.040761] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.040783] kthread+0x337/0x6f0 [ 25.040802] ? trace_preempt_on+0x20/0xc0 [ 25.040824] ? __pfx_kthread+0x10/0x10 [ 25.040844] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.040873] ? calculate_sigpending+0x7b/0xa0 [ 25.040897] ? __pfx_kthread+0x10/0x10 [ 25.040917] ret_from_fork+0x116/0x1d0 [ 25.040935] ? __pfx_kthread+0x10/0x10 [ 25.040954] ret_from_fork_asm+0x1a/0x30 [ 25.040984] </TASK> [ 25.040995] [ 25.048858] Allocated by task 230: [ 25.049042] kasan_save_stack+0x45/0x70 [ 25.049247] kasan_save_track+0x18/0x40 [ 25.049432] kasan_save_alloc_info+0x3b/0x50 [ 25.049640] __kasan_kmalloc+0xb7/0xc0 [ 25.049818] __kmalloc_cache_noprof+0x189/0x420 [ 25.049994] kmalloc_memmove_invalid_size+0xac/0x330 [ 25.050281] kunit_try_run_case+0x1a5/0x480 [ 25.050498] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.050716] kthread+0x337/0x6f0 [ 25.050933] ret_from_fork+0x116/0x1d0 [ 25.051094] ret_from_fork_asm+0x1a/0x30 [ 25.051263] [ 25.051327] The buggy address belongs to the object at ffff8881053b8000 [ 25.051327] which belongs to the cache kmalloc-64 of size 64 [ 25.051675] The buggy address is located 4 bytes inside of [ 25.051675] allocated 64-byte region [ffff8881053b8000, ffff8881053b8040) [ 25.052654] [ 25.052747] The buggy address belongs to the physical page: [ 25.052986] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053b8 [ 25.053292] flags: 0x200000000000000(node=0|zone=2) [ 25.053455] page_type: f5(slab) [ 25.053578] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 25.053855] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 25.054179] page dumped because: kasan: bad access detected [ 25.054473] [ 25.054587] Memory state around the buggy address: [ 25.055014] ffff8881053b7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.055321] ffff8881053b7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.055534] >ffff8881053b8000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 25.055738] ^ [ 25.056250] ffff8881053b8080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.056578] ffff8881053b8100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.056888] ==================================================================