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 B17D743174 for ; Fri, 17 May 2024 12:02:45 +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=1715947365; cv=none; b=brcq4Ry3ys0nJ24ZCjNnyDFD1APMFyhIE61SHMkbJPZyqR0OMgCxOmdojXcBGuEYA2ErzbBOSj6eOt6uW3st4orAg4K6WpduntvbypD1Zz+8X6SCZQnzdmjO+XG5qXFTpJFjnQxcVkdy9BTnoWqsBI6x3AU9aDYD76+qfkElWxo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715947365; c=relaxed/simple; bh=gmIkO1MoDC1V+1MokA3dCi1b2tk8IivbHAHjskPc9Hg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eupPZX4Zcgg0pOLStu/Aa/e/PkU/UtpRVHGjazmvjFJHZOPFWf/IMX1myzzYPuPuDJrywjz495Z//d7Iv5t+bCm/BcwqeKm4j0nIVX5h2dkPra787z/m+iJJ88h8brKaBSo/dDusyARf04NBsPmNwOkprsRBvcvvqjI7qfDolU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XV5ktj7u; 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="XV5ktj7u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21AA0C2BD10; Fri, 17 May 2024 12:02:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715947365; bh=gmIkO1MoDC1V+1MokA3dCi1b2tk8IivbHAHjskPc9Hg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=XV5ktj7u2y3Wn4MBasfKVMQYlLzCTUeHHzCtoJDZPWOqpv7dfUceiRoSlXJbRW6CF FROqKk7j/PxuL2kLBHsk5N6G3Uz+9RGlwLEr+gds7SZKJOFBBQpFBgo4h4gZFVeFjG /gyHBbjkoXJjefAORvJvLnzrnVtX/e4eL6AjndaY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27431: cpumap: Zero-initialise xdp_rxq_info struct before running XDP program Date: Fri, 17 May 2024 14:02:31 +0200 Message-ID: <2024051723-CVE-2024-27431-30ae@gregkh> X-Mailer: git-send-email 2.45.1 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=2851; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gmIkO1MoDC1V+1MokA3dCi1b2tk8IivbHAHjskPc9Hg=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnu7v7XrizaeLJW+2++S2eDuxaDhOmp1iXb/G4cSnlaH XpY83JlRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkTpphfsLyd0eDH70smWPk YraeQfR0hD63OMOCOZ07zRZ1tfnZ8EoWmx382d9yaMYjAA== 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: cpumap: Zero-initialise xdp_rxq_info struct before running XDP program When running an XDP program that is attached to a cpumap entry, we don't initialise the xdp_rxq_info data structure being used in the xdp_buff that backs the XDP program invocation. Tobias noticed that this leads to random values being returned as the xdp_md->rx_queue_index value for XDP programs running in a cpumap. This means we're basically returning the contents of the uninitialised memory, which is bad. Fix this by zero-initialising the rxq data structure before running the XDP program. The Linux kernel CVE team has assigned CVE-2024-27431 to this issue. Affected and fixed versions =========================== Issue introduced in 5.9 with commit 9216477449f3 and fixed in 5.10.213 with commit 5f4e51abfbe6 Issue introduced in 5.9 with commit 9216477449f3 and fixed in 5.15.152 with commit f0363af9619c Issue introduced in 5.9 with commit 9216477449f3 and fixed in 6.1.82 with commit 3420b3ff1ff4 Issue introduced in 5.9 with commit 9216477449f3 and fixed in 6.6.22 with commit f562e4c4aab0 Issue introduced in 5.9 with commit 9216477449f3 and fixed in 6.7.10 with commit eaa7cb836659 Issue introduced in 5.9 with commit 9216477449f3 and fixed in 6.8 with commit 2487007aa3b9 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-2024-27431 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/cpumap.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/5f4e51abfbe6eb444fa91906a5cd083044278297 https://git.kernel.org/stable/c/f0363af9619c77730764f10360e36c6445c12f7b https://git.kernel.org/stable/c/3420b3ff1ff489c177ea1cb7bd9fbbc4e9a0be95 https://git.kernel.org/stable/c/f562e4c4aab00986dde3093c4be919c3f2b85a4a https://git.kernel.org/stable/c/eaa7cb836659ced2d9f814ac32aa3ec193803ed6 https://git.kernel.org/stable/c/2487007aa3b9fafbd2cb14068f49791ce1d7ede5