Date
Nov. 20, 2024, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 36.986006] ================================================================== [ 36.987419] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e8 [ 36.988183] Read of size 64 at addr fff00000c5bc9e84 by task kunit_try_catch/171 [ 36.989035] [ 36.989433] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241120 #1 [ 36.990375] Tainted: [B]=BAD_PAGE, [N]=TEST [ 36.990945] Hardware name: linux,dummy-virt (DT) [ 36.991767] Call trace: [ 36.992210] show_stack+0x20/0x38 (C) [ 36.994077] dump_stack_lvl+0x8c/0xd0 [ 36.994712] print_report+0x118/0x5e0 [ 36.995245] kasan_report+0xc8/0x118 [ 36.996045] kasan_check_range+0x100/0x1a8 [ 36.996592] __asan_memmove+0x3c/0x98 [ 36.997173] kmalloc_memmove_invalid_size+0x154/0x2e8 [ 36.998255] kunit_try_run_case+0x14c/0x3d0 [ 36.998827] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 36.999554] kthread+0x24c/0x2d0 [ 37.000054] ret_from_fork+0x10/0x20 [ 37.000682] [ 37.001020] Allocated by task 171: [ 37.001815] kasan_save_stack+0x3c/0x68 [ 37.002394] kasan_save_track+0x20/0x40 [ 37.002970] kasan_save_alloc_info+0x40/0x58 [ 37.003594] __kasan_kmalloc+0xd4/0xd8 [ 37.004084] __kmalloc_cache_noprof+0x15c/0x3c8 [ 37.004727] kmalloc_memmove_invalid_size+0xb0/0x2e8 [ 37.005616] kunit_try_run_case+0x14c/0x3d0 [ 37.006249] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 37.006968] kthread+0x24c/0x2d0 [ 37.007476] ret_from_fork+0x10/0x20 [ 37.007946] [ 37.008294] The buggy address belongs to the object at fff00000c5bc9e80 [ 37.008294] which belongs to the cache kmalloc-64 of size 64 [ 37.010512] The buggy address is located 4 bytes inside of [ 37.010512] allocated 64-byte region [fff00000c5bc9e80, fff00000c5bc9ec0) [ 37.011622] [ 37.011968] The buggy address belongs to the physical page: [ 37.012642] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105bc9 [ 37.013921] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 37.014659] page_type: f5(slab) [ 37.015180] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 37.016011] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 [ 37.016740] page dumped because: kasan: bad access detected [ 37.017716] [ 37.017985] Memory state around the buggy address: [ 37.018815] fff00000c5bc9d80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 37.019662] fff00000c5bc9e00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 37.020325] >fff00000c5bc9e80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 37.020962] ^ [ 37.021766] fff00000c5bc9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.022438] fff00000c5bc9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.023257] ==================================================================
[ 28.465781] ================================================================== [ 28.466933] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x170/0x330 [ 28.467835] Read of size 64 at addr ffff888101ac7484 by task kunit_try_catch/189 [ 28.469408] [ 28.469605] CPU: 0 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241120 #1 [ 28.471618] Tainted: [B]=BAD_PAGE, [N]=TEST [ 28.472302] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 28.473271] Call Trace: [ 28.473861] <TASK> [ 28.474211] dump_stack_lvl+0x73/0xb0 [ 28.474529] print_report+0xd1/0x640 [ 28.475127] ? __virt_addr_valid+0x1db/0x2d0 [ 28.475629] ? kasan_complete_mode_report_info+0x2a/0x200 [ 28.476359] kasan_report+0x102/0x140 [ 28.476658] ? kmalloc_memmove_invalid_size+0x170/0x330 [ 28.477450] ? kmalloc_memmove_invalid_size+0x170/0x330 [ 28.478374] kasan_check_range+0x10c/0x1c0 [ 28.479092] __asan_memmove+0x27/0x70 [ 28.479944] kmalloc_memmove_invalid_size+0x170/0x330 [ 28.480863] ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10 [ 28.481923] ? __schedule+0xc3e/0x2790 [ 28.482700] ? __pfx_read_tsc+0x10/0x10 [ 28.482917] ? ktime_get_ts64+0x84/0x230 [ 28.483110] kunit_try_run_case+0x1b3/0x490 [ 28.483308] ? __pfx_kunit_try_run_case+0x10/0x10 [ 28.483516] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 28.483766] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 28.484099] ? __kthread_parkme+0x82/0x160 [ 28.484444] ? preempt_count_sub+0x50/0x80 [ 28.485373] ? __pfx_kunit_try_run_case+0x10/0x10 [ 28.486099] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 28.486882] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.487567] kthread+0x257/0x310 [ 28.489007] ? __pfx_kthread+0x10/0x10 [ 28.490874] ret_from_fork+0x41/0x80 [ 28.491778] ? __pfx_kthread+0x10/0x10 [ 28.493680] ret_from_fork_asm+0x1a/0x30 [ 28.494137] </TASK> [ 28.494462] [ 28.495055] Allocated by task 189: [ 28.495523] kasan_save_stack+0x3d/0x60 [ 28.495830] kasan_save_track+0x18/0x40 [ 28.496325] kasan_save_alloc_info+0x3b/0x50 [ 28.496913] __kasan_kmalloc+0xb7/0xc0 [ 28.497370] __kmalloc_cache_noprof+0x184/0x410 [ 28.497935] kmalloc_memmove_invalid_size+0xad/0x330 [ 28.499219] kunit_try_run_case+0x1b3/0x490 [ 28.499498] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.499837] kthread+0x257/0x310 [ 28.500056] ret_from_fork+0x41/0x80 [ 28.500291] ret_from_fork_asm+0x1a/0x30 [ 28.500536] [ 28.500665] The buggy address belongs to the object at ffff888101ac7480 [ 28.500665] which belongs to the cache kmalloc-64 of size 64 [ 28.502506] The buggy address is located 4 bytes inside of [ 28.502506] allocated 64-byte region [ffff888101ac7480, ffff888101ac74c0) [ 28.504004] [ 28.504326] The buggy address belongs to the physical page: [ 28.504621] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101ac7 [ 28.505063] flags: 0x200000000000000(node=0|zone=2) [ 28.505763] page_type: f5(slab) [ 28.506016] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 28.506498] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 [ 28.507110] page dumped because: kasan: bad access detected [ 28.507411] [ 28.507546] Memory state around the buggy address: [ 28.508292] ffff888101ac7380: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc [ 28.508723] ffff888101ac7400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 28.509223] >ffff888101ac7480: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 28.509657] ^ [ 28.509979] ffff888101ac7500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.510459] ffff888101ac7580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.511072] ==================================================================