Date
Dec. 4, 2024, 3:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 32.258398] ================================================================== [ 32.259920] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 32.260504] Read of size 18446744073709551614 at addr fff00000c66e4d84 by task kunit_try_catch/168 [ 32.262573] [ 32.263100] CPU: 0 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241204 #1 [ 32.264468] Tainted: [B]=BAD_PAGE, [N]=TEST [ 32.264868] Hardware name: linux,dummy-virt (DT) [ 32.265651] Call trace: [ 32.266415] show_stack+0x20/0x38 (C) [ 32.267207] dump_stack_lvl+0x8c/0xd0 [ 32.267977] print_report+0x118/0x5e0 [ 32.268454] kasan_report+0xc8/0x118 [ 32.269044] kasan_check_range+0x100/0x1a8 [ 32.269936] __asan_memmove+0x3c/0x98 [ 32.270695] kmalloc_memmove_negative_size+0x154/0x2e0 [ 32.271475] kunit_try_run_case+0x14c/0x3d0 [ 32.272132] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.272898] kthread+0x24c/0x2d0 [ 32.273365] ret_from_fork+0x10/0x20 [ 32.274369] [ 32.274685] Allocated by task 168: [ 32.275132] kasan_save_stack+0x3c/0x68 [ 32.275450] kasan_save_track+0x20/0x40 [ 32.275823] kasan_save_alloc_info+0x40/0x58 [ 32.276563] __kasan_kmalloc+0xd4/0xd8 [ 32.277760] __kmalloc_cache_noprof+0x15c/0x3c0 [ 32.278896] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 32.279650] kunit_try_run_case+0x14c/0x3d0 [ 32.280411] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.281321] kthread+0x24c/0x2d0 [ 32.282436] ret_from_fork+0x10/0x20 [ 32.283403] [ 32.283727] The buggy address belongs to the object at fff00000c66e4d80 [ 32.283727] which belongs to the cache kmalloc-64 of size 64 [ 32.285180] The buggy address is located 4 bytes inside of [ 32.285180] 64-byte region [fff00000c66e4d80, fff00000c66e4dc0) [ 32.286828] [ 32.287324] The buggy address belongs to the physical page: [ 32.288263] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066e4 [ 32.289309] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.290900] page_type: f5(slab) [ 32.291406] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 32.292528] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 32.293573] page dumped because: kasan: bad access detected [ 32.294719] [ 32.295170] Memory state around the buggy address: [ 32.295867] fff00000c66e4c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 32.296809] fff00000c66e4d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 32.298110] >fff00000c66e4d80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 32.299011] ^ [ 32.299855] fff00000c66e4e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.300866] fff00000c66e4e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.302103] ==================================================================
[ 23.079135] ================================================================== [ 23.080282] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x172/0x330 [ 23.081984] Read of size 18446744073709551614 at addr ffff888101ae6e84 by task kunit_try_catch/188 [ 23.083313] [ 23.084267] CPU: 0 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241204 #1 [ 23.085655] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.086065] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.086801] Call Trace: [ 23.087102] <TASK> [ 23.087348] dump_stack_lvl+0x73/0xb0 [ 23.088013] print_report+0xd1/0x640 [ 23.088516] ? __virt_addr_valid+0x1db/0x2d0 [ 23.089312] ? kasan_complete_mode_report_info+0x2a/0x200 [ 23.090481] kasan_report+0x102/0x140 [ 23.091103] ? kmalloc_memmove_negative_size+0x172/0x330 [ 23.092130] ? kmalloc_memmove_negative_size+0x172/0x330 [ 23.093254] kasan_check_range+0x10c/0x1c0 [ 23.094090] __asan_memmove+0x27/0x70 [ 23.094679] kmalloc_memmove_negative_size+0x172/0x330 [ 23.095493] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 23.096045] ? __schedule+0xc3e/0x2790 [ 23.096671] ? __pfx_read_tsc+0x10/0x10 [ 23.097102] ? ktime_get_ts64+0x86/0x230 [ 23.097773] kunit_try_run_case+0x1b3/0x490 [ 23.098217] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.098659] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 23.099121] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.099555] ? __kthread_parkme+0x82/0x160 [ 23.100406] ? preempt_count_sub+0x50/0x80 [ 23.100830] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.101617] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.102067] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.102943] kthread+0x257/0x310 [ 23.103493] ? __pfx_kthread+0x10/0x10 [ 23.103999] ret_from_fork+0x41/0x80 [ 23.104593] ? __pfx_kthread+0x10/0x10 [ 23.105064] ret_from_fork_asm+0x1a/0x30 [ 23.105861] </TASK> [ 23.106227] [ 23.106589] Allocated by task 188: [ 23.106948] kasan_save_stack+0x3d/0x60 [ 23.107694] kasan_save_track+0x18/0x40 [ 23.108622] kasan_save_alloc_info+0x3b/0x50 [ 23.109240] __kasan_kmalloc+0xb7/0xc0 [ 23.109765] __kmalloc_cache_noprof+0x184/0x410 [ 23.110786] kmalloc_memmove_negative_size+0xad/0x330 [ 23.111478] kunit_try_run_case+0x1b3/0x490 [ 23.111989] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.112635] kthread+0x257/0x310 [ 23.113179] ret_from_fork+0x41/0x80 [ 23.113932] ret_from_fork_asm+0x1a/0x30 [ 23.114574] [ 23.114891] The buggy address belongs to the object at ffff888101ae6e80 [ 23.114891] which belongs to the cache kmalloc-64 of size 64 [ 23.116456] The buggy address is located 4 bytes inside of [ 23.116456] 64-byte region [ffff888101ae6e80, ffff888101ae6ec0) [ 23.117747] [ 23.117939] The buggy address belongs to the physical page: [ 23.118717] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101ae6 [ 23.119698] flags: 0x200000000000000(node=0|zone=2) [ 23.120220] page_type: f5(slab) [ 23.120780] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 23.121736] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 23.122503] page dumped because: kasan: bad access detected [ 23.123026] [ 23.123178] Memory state around the buggy address: [ 23.123823] ffff888101ae6d80: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 23.124389] ffff888101ae6e00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 23.125334] >ffff888101ae6e80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 23.126095] ^ [ 23.127409] ffff888101ae6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.127918] ffff888101ae6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.129097] ==================================================================