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 A97AE147C89 for ; Wed, 19 Jun 2024 13:37:39 +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=1718804259; cv=none; b=LBt5fmgzSahZ8zSXRMOVnpraFqkmvD6uSlCmfN9cKZp7RsVOPd2VL7AWRqto0N+G1/5ZkbH1uQQJO4/v7MYRSN9N1/B3o4kOLPWop3/LXadUFp9l0SpuHUxjxTYDl+9kxzuKIXhRX6Mac2x7JcUydPE2n9FMVEMRoRqgSVyZt+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718804259; c=relaxed/simple; bh=7+HL2WOJAS/PY45Uy3LTNbKMuCP9M28WtSytp0ODYAs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bdD0EizV+ZrofUSPUIrPaFZv9IP4Siby+aRHGwrjwpv34FUu1qNJrwI3oh5JDkRmOcyis9uwzS1EdSs73eTnVtC+Nmhnpg5nD7bRqMEPH697enAjN19JSO49HP0CxWeCp0DFGsZIu0ApcdnfDV9+XTUunZFURAmUc/+X/aDPO8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=maNfkPm4; 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="maNfkPm4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A57FC2BBFC; Wed, 19 Jun 2024 13:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718804259; bh=7+HL2WOJAS/PY45Uy3LTNbKMuCP9M28WtSytp0ODYAs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=maNfkPm4uwbO8BIQ5LMu+EFKDqB786UpITUcJeh/MXVciO8Jj4MOIU6C94mWqo+ft hd4/f5WZ13tOuxlo+p1mlyl2FeGJtZ97SwVHqRRYhySQ7mIqdXWKY/DccPuEIgL4kF ZXZMVmotdZ7jqpBROKwvcPuJ7Steda5rIohaVVfA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-38566: bpf: Fix verifier assumptions about socket->sk Date: Wed, 19 Jun 2024 15:36:15 +0200 Message-ID: <2024061955-CVE-2024-38566-0ac6@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=2422; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=7+HL2WOJAS/PY45Uy3LTNbKMuCP9M28WtSytp0ODYAs=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlF93aniW5frcITyOnHuOtSMqOBxed85VU9+UYRMw/Pj ex7tk+oI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbyLJdhQcOTvU+TeOVYk34l Pc5S0rlo2aK2l2Gexa5iqXOPXV8t+skfL3T9RQCvR+t9AA== 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: Fix verifier assumptions about socket->sk The verifier assumes that 'sk' field in 'struct socket' is valid and non-NULL when 'socket' pointer itself is trusted and non-NULL. That may not be the case when socket was just created and passed to LSM socket_accept hook. Fix this verifier assumption and adjust tests. The Linux kernel CVE team has assigned CVE-2024-38566 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 6fcd486b3a0a and fixed in 6.6.33 with commit 39f8a29330f4 Issue introduced in 6.4 with commit 6fcd486b3a0a and fixed in 6.8.12 with commit 6f5ae91172a9 Issue introduced in 6.4 with commit 6fcd486b3a0a and fixed in 6.9.3 with commit c58ccdd2483a Issue introduced in 6.4 with commit 6fcd486b3a0a and fixed in 6.10-rc1 with commit 0db63c0b86e9 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-38566 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/verifier.c tools/testing/selftests/bpf/progs/bench_local_storage_create.c tools/testing/selftests/bpf/progs/local_storage.c tools/testing/selftests/bpf/progs/lsm_cgroup.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/39f8a29330f433000e716eefc4b9abda05b71a82 https://git.kernel.org/stable/c/6f5ae91172a93abac9720ba94edf3ec8f4d7f24f https://git.kernel.org/stable/c/c58ccdd2483a1d990748cdaf94206b5d5986a001 https://git.kernel.org/stable/c/0db63c0b86e981a1e97d2596d64ceceba1a5470e