Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14325FC0C for ; Thu, 20 Jun 2024 11:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882187; cv=none; b=BhcjutRE6W7XUe5L+i/MgcHo6mgWZ0xSmvM6YgeDRW28w3rogDbGVGrvOQSaLH4G6Z4ae3YfDUxSNkk+DeDrV/TcLJErnyMeZikVOAtqSqTICjoRHtAij55hGW3U3glfU39ZqsqHuzb5LYx04b3aN8Q/z/frSGOuD1Kq4zDc4Z0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882187; c=relaxed/simple; bh=hM6kh9bFQGZIo9at5XhewyROffZD/NCOfY8HuUBtHno=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HTjzw8iQ/KqHRwVwlzFoyg8ozi1vp/vr5FqekOBEPyEeS5Th8nnDJjtyOSG6LDuJXmSNRquY2+/PK897kVpw8IkQYaKArii3bIruF1Frx8URD89beUY8duzESlnRENy0YRAWEKvFKtifr3GnNqGoZ08eIeZz5KCD2CG6wBoAA4c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Lw16Ky1J; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Lw16Ky1J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F5DCC2BD10; Thu, 20 Jun 2024 11:16:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718882186; bh=hM6kh9bFQGZIo9at5XhewyROffZD/NCOfY8HuUBtHno=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Lw16Ky1JkqYzu/wmQZtZHzgvw1UGLrBfkUQKeSAcd70x/RZPqGpQQlRuws38BeF+n PSKV7WW4uzkIXm2TAfE2GKtTCIsTZ5MBx/6KkDH0KA5GP4QF29EF4H/X4DrDuzdz7v 0n4Fnz6USolhNIaoK6cgUZjNClCp7tcOlqwCiLrc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48714: bpf: Use VM_MAP instead of VM_ALLOC for ringbuf Date: Thu, 20 Jun 2024 13:15:54 +0200 Message-ID: <2024062054-CVE-2022-48714-726f@gregkh> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2569; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hM6kh9bFQGZIo9at5XhewyROffZD/NCOfY8HuUBtHno=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkl/FkB2UHaAjVbFdw2WFVaRASEFk1iSjc4ftJClc3qj O2NW/c7YlkYBJkYZMUUWb5s4zm6v+KQopeh7WmYOaxMIEMYuDgFYCI5rxkWTNF+v/r9xEslJ9eL 1N5uffc/5Ma5boZ55uuZ/lqejvY7tnfdT86LcSk601WkAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: bpf: Use VM_MAP instead of VM_ALLOC for ringbuf After commit 2fd3fb0be1d1 ("kasan, vmalloc: unpoison VM_ALLOC pages after mapping"), non-VM_ALLOC mappings will be marked as accessible in __get_vm_area_node() when KASAN is enabled. But now the flag for ringbuf area is VM_ALLOC, so KASAN will complain out-of-bound access after vmap() returns. Because the ringbuf area is created by mapping allocated pages, so use VM_MAP instead. After the change, info in /proc/vmallocinfo also changes from [start]-[end] 24576 ringbuf_map_alloc+0x171/0x290 vmalloc user to [start]-[end] 24576 ringbuf_map_alloc+0x171/0x290 vmap user The Linux kernel CVE team has assigned CVE-2022-48714 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 457f44363a88 and fixed in 5.10.99 with commit 6304a613a97d Issue introduced in 5.8 with commit 457f44363a88 and fixed in 5.15.22 with commit 5e457aeab52a Issue introduced in 5.8 with commit 457f44363a88 and fixed in 5.16.8 with commit d578933f6226 Issue introduced in 5.8 with commit 457f44363a88 and fixed in 5.17 with commit b293dcc473d2 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2022-48714 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: kernel/bpf/ringbuf.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/6304a613a97d6dcd49b93fbad31e9f39d1e138d6 https://git.kernel.org/stable/c/5e457aeab52a5947619e1f18047f4d2f3212b3eb https://git.kernel.org/stable/c/d578933f6226d5419af9306746efa1c693cbaf9c https://git.kernel.org/stable/c/b293dcc473d22a62dc6d78de2b15e4f49515db56