From mboxrd@z Thu Jan 1 00:00:00 1970 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 C5EEA147C89 for ; Wed, 19 Jun 2024 13:37:33 +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=1718804253; cv=none; b=mWMEn/8z62PYJKGgfSAjvN5SWx0vrkG8p3fy/TGn9sqiqr4JC6bE3gdQaVY0Z1jHFrmmlAZy+UnvqWPMgzuolk2CYGleOHAtIG8tXDlhh47/JZUuA+bty1nL8zF5pec+PIQF+RBuBXxMhJlVY16WaiXgf6zOVgfoDARHtPz1v4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718804253; c=relaxed/simple; bh=G+LE666P/QmNjmaW5/akX4UqVK9H3GlctGPOE+2jnFs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=W9/CW3g7X7pRjJjx7LNvWvOGkpfZ/Ag52BlcGPdjRtR33efKkEwB4CRLJwXvMUXukG802bz7GOhkKs2F2CfuIqpxgpCYCskfoH263rqDe3hhnGsvOdS6o0UiOzmrnqsvvD0dh9CO4hpiE7CuKtm7+WBfW5Oq6el5uj4z0blcpAw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=a8BVJYlh; 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="a8BVJYlh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B94FC4AF1A; Wed, 19 Jun 2024 13:37:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718804253; bh=G+LE666P/QmNjmaW5/akX4UqVK9H3GlctGPOE+2jnFs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=a8BVJYlhYcqhjieuPMY77MEXVWZ4TN+4T2IsgddPzk91np1HCifPeBzWzywNEr9Tk r+qcDht5Zfo7Grh/OS0xUm/Oit5nSPWeXdUFCWECCQ61xitPUGaIqBs8LPBHQGHeQy gMUZL4TLRj/s8sds/V/Y+ZuPtIrWS8Y5W3ylvubY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-38564: bpf: Add BPF_PROG_TYPE_CGROUP_SKB attach type enforcement in BPF_LINK_CREATE Date: Wed, 19 Jun 2024 15:36:13 +0200 Message-ID: <2024061955-CVE-2024-38564-b069@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=2411; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=G+LE666P/QmNjmaW5/akX4UqVK9H3GlctGPOE+2jnFs=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlF93YHhl78EmWlcbb+5vuz4gmTLxZrL/505e72nyl8y qqHDLb+74hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJVN5lWLDKVb9b4pSNrkTu gpdBzfM8etfnMTDM9w+cUDgtyuOl0E+Xp4ufTLee8bufCQA= 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: Add BPF_PROG_TYPE_CGROUP_SKB attach type enforcement in BPF_LINK_CREATE bpf_prog_attach uses attach_type_to_prog_type to enforce proper attach type for BPF_PROG_TYPE_CGROUP_SKB. link_create uses bpf_prog_get and relies on bpf_prog_attach_check_attach_type to properly verify prog_type <> attach_type association. Add missing attach_type enforcement for the link_create case. Otherwise, it's currently possible to attach cgroup_skb prog types to other cgroup hooks. The Linux kernel CVE team has assigned CVE-2024-38564 to this issue. Affected and fixed versions =========================== Issue introduced in 5.7 with commit af6eea57437a and fixed in 6.6.33 with commit 6675c541f540 Issue introduced in 5.7 with commit af6eea57437a and fixed in 6.8.12 with commit 67929e973f5a Issue introduced in 5.7 with commit af6eea57437a and fixed in 6.9.3 with commit b34bbc766510 Issue introduced in 5.7 with commit af6eea57437a and fixed in 6.10-rc1 with commit 543576ec15b1 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-38564 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/syscall.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/6675c541f540a29487a802d3135280b69b9f568d https://git.kernel.org/stable/c/67929e973f5a347f05fef064fea4ae79e7cdb5fd https://git.kernel.org/stable/c/b34bbc76651065a5eafad8ddff1eb8d1f8473172 https://git.kernel.org/stable/c/543576ec15b17c0c93301ac8297333c7b6e84ac7