Date
July 24, 2025, 4:41 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 32.608528] ================================================================== [ 32.608998] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0 [ 32.609080] Read of size 64 at addr fff00000c9a87984 by task kunit_try_catch/213 [ 32.609132] [ 32.609205] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250724 #1 PREEMPT [ 32.609342] Tainted: [B]=BAD_PAGE, [N]=TEST [ 32.609400] Hardware name: linux,dummy-virt (DT) [ 32.609438] Call trace: [ 32.609462] show_stack+0x20/0x38 (C) [ 32.609845] dump_stack_lvl+0x8c/0xd0 [ 32.609977] print_report+0x118/0x5e8 [ 32.610063] kasan_report+0xdc/0x128 [ 32.610129] kasan_check_range+0x100/0x1a8 [ 32.610174] __asan_memmove+0x3c/0x98 [ 32.610321] kmalloc_memmove_invalid_size+0x154/0x2e0 [ 32.610375] kunit_try_run_case+0x170/0x3f0 [ 32.610429] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.610690] kthread+0x328/0x630 [ 32.610905] ret_from_fork+0x10/0x20 [ 32.611007] [ 32.611201] Allocated by task 213: [ 32.611242] kasan_save_stack+0x3c/0x68 [ 32.611286] kasan_save_track+0x20/0x40 [ 32.611555] kasan_save_alloc_info+0x40/0x58 [ 32.611629] __kasan_kmalloc+0xd4/0xd8 [ 32.611702] __kmalloc_cache_noprof+0x16c/0x3c0 [ 32.611839] kmalloc_memmove_invalid_size+0xb0/0x2e0 [ 32.611935] kunit_try_run_case+0x170/0x3f0 [ 32.612090] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.612362] kthread+0x328/0x630 [ 32.612517] ret_from_fork+0x10/0x20 [ 32.612647] [ 32.612714] The buggy address belongs to the object at fff00000c9a87980 [ 32.612714] which belongs to the cache kmalloc-64 of size 64 [ 32.612906] The buggy address is located 4 bytes inside of [ 32.612906] allocated 64-byte region [fff00000c9a87980, fff00000c9a879c0) [ 32.613011] [ 32.613130] The buggy address belongs to the physical page: [ 32.613300] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a87 [ 32.613586] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.613814] page_type: f5(slab) [ 32.613933] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 32.614094] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 32.614186] page dumped because: kasan: bad access detected [ 32.614564] [ 32.614609] Memory state around the buggy address: [ 32.614667] fff00000c9a87880: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 32.614738] fff00000c9a87900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 32.615609] >fff00000c9a87980: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 32.615688] ^ [ 32.615737] fff00000c9a87a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.615886] fff00000c9a87a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.615985] ==================================================================
[ 27.068502] ================================================================== [ 27.069032] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330 [ 27.069553] Read of size 64 at addr ffff888104a01904 by task kunit_try_catch/230 [ 27.069885] [ 27.070061] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc7-next-20250724 #1 PREEMPT(voluntary) [ 27.070117] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 27.070363] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.070389] Call Trace: [ 27.070426] <TASK> [ 27.070447] dump_stack_lvl+0x73/0xb0 [ 27.070558] print_report+0xd1/0x640 [ 27.070599] ? __virt_addr_valid+0x1db/0x2d0 [ 27.070625] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 27.070648] ? kasan_complete_mode_report_info+0x2a/0x200 [ 27.070673] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 27.070696] kasan_report+0x141/0x180 [ 27.070717] ? kmalloc_memmove_invalid_size+0x16f/0x330 [ 27.070745] kasan_check_range+0x10c/0x1c0 [ 27.070768] __asan_memmove+0x27/0x70 [ 27.070989] kmalloc_memmove_invalid_size+0x16f/0x330 [ 27.071016] ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10 [ 27.071041] ? __schedule+0x10da/0x2b60 [ 27.071068] ? __pfx_read_tsc+0x10/0x10 [ 27.071091] ? ktime_get_ts64+0x86/0x230 [ 27.071117] kunit_try_run_case+0x1a5/0x480 [ 27.071144] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.071165] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.071189] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.071213] ? __kthread_parkme+0x82/0x180 [ 27.071234] ? preempt_count_sub+0x50/0x80 [ 27.071265] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.071288] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.071311] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.071333] kthread+0x337/0x6f0 [ 27.071353] ? trace_preempt_on+0x20/0xc0 [ 27.071377] ? __pfx_kthread+0x10/0x10 [ 27.071396] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.071419] ? calculate_sigpending+0x7b/0xa0 [ 27.071442] ? __pfx_kthread+0x10/0x10 [ 27.071463] ret_from_fork+0x116/0x1d0 [ 27.071482] ? __pfx_kthread+0x10/0x10 [ 27.071502] ret_from_fork_asm+0x1a/0x30 [ 27.071534] </TASK> [ 27.071545] [ 27.082715] Allocated by task 230: [ 27.083210] kasan_save_stack+0x45/0x70 [ 27.083453] kasan_save_track+0x18/0x40 [ 27.083642] kasan_save_alloc_info+0x3b/0x50 [ 27.084482] __kasan_kmalloc+0xb7/0xc0 [ 27.084699] __kmalloc_cache_noprof+0x189/0x420 [ 27.085095] kmalloc_memmove_invalid_size+0xac/0x330 [ 27.085352] kunit_try_run_case+0x1a5/0x480 [ 27.085702] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.086110] kthread+0x337/0x6f0 [ 27.086402] ret_from_fork+0x116/0x1d0 [ 27.086561] ret_from_fork_asm+0x1a/0x30 [ 27.086867] [ 27.087019] The buggy address belongs to the object at ffff888104a01900 [ 27.087019] which belongs to the cache kmalloc-64 of size 64 [ 27.087722] The buggy address is located 4 bytes inside of [ 27.087722] allocated 64-byte region [ffff888104a01900, ffff888104a01940) [ 27.088642] [ 27.088960] The buggy address belongs to the physical page: [ 27.089203] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104a01 [ 27.089624] flags: 0x200000000000000(node=0|zone=2) [ 27.089879] page_type: f5(slab) [ 27.090190] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 27.090494] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 27.090881] page dumped because: kasan: bad access detected [ 27.091205] [ 27.091293] Memory state around the buggy address: [ 27.091524] ffff888104a01800: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 27.091858] ffff888104a01880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 27.092187] >ffff888104a01900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 27.092505] ^ [ 27.092747] ffff888104a01980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.092950] ffff888104a01a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.093315] ==================================================================