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 ADEC01922C9 for ; Tue, 30 Jul 2024 07:52:09 +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=1722325929; cv=none; b=NdlD9mRNHZ6yWUu6nzHfGhmAtu8iDPnj8yqHw1NDQevFbTVJQgNue1kI6KG66kSsb1iqEdqS0qttF+a1b17GP4mlSlPYVNYn4Gh6IV7gNPRx1IlXchmFHkF1S5D0gaENlWTEI8LPHoqtVwn64edAUAK3LQyak5Pe+pH/9n6SWmI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325929; c=relaxed/simple; bh=qk84xyyuKbo9vAvCDodvY1O/2kOnsnOL6ni22+ygRe0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YhnXkYfXFx4Yc7A5nzfjFLIb6jVu41a8OiGmR7kE2Xx4qy/L+d2BdWt8Fpm8zfozvKiOaO3OpsnRpr1nWKvpXsBAntBcsWfMvliwlow52f/jp4iMfsGkCUUdJKrAZ+cpCgCqxde2tIylRrZ9sR7uDr6+roOiorGbALu0vUJGXk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=R7uF+L5m; 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="R7uF+L5m" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15FFEC4AF09; Tue, 30 Jul 2024 07:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722325929; bh=qk84xyyuKbo9vAvCDodvY1O/2kOnsnOL6ni22+ygRe0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=R7uF+L5mEghTxmTwI5Wn52GU7Iwv4+AryHz9r2F7U19exkJ76bYlYXo/Z7A6WSrQI USQOVE/BYLO0dDOhAxZvNHipKg5MrRPAyS5h42TI8WY5jAyvA+ue5oQU4pTo10pYMx Of6wMkCpCZjwC0cdnM8y6LPVy7EWiEsgElFX2QsM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42151: bpf: mark bpf_dummy_struct_ops.test_1 parameter as nullable Date: Tue, 30 Jul 2024 09:48:09 +0200 Message-ID: <2024073033-CVE-2024-42151-b34a@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=2089; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qk84xyyuKbo9vAvCDodvY1O/2kOnsnOL6ni22+ygRe0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkrZk2d6bjBaAfn/ogDEub2k/lmePw/eT96nuiTX4tnR e3ju/TsVUcsC4MgE4OsmCLLl208R/dXHFL0MrQ9DTOHlQlkCAMXpwBMZKMsw4KL2wOyHVlk/mda TFmxWuzB2YA1mT4Mc0WWy7ZNWJLR1s391aTAI/n5yvg/HwE= 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: mark bpf_dummy_struct_ops.test_1 parameter as nullable Test case dummy_st_ops/dummy_init_ret_value passes NULL as the first parameter of the test_1() function. Mark this parameter as nullable to make verifier aware of such possibility. Otherwise, NULL check in the test_1() code: SEC("struct_ops/test_1") int BPF_PROG(test_1, struct bpf_dummy_ops_state *state) { if (!state) return ...; ... access state ... } Might be removed by verifier, thus triggering NULL pointer dereference under certain conditions. The Linux kernel CVE team has assigned CVE-2024-42151 to this issue. Affected and fixed versions =========================== Fixed in 6.9.9 with commit 7f79097b0de9 Fixed in 6.10 with commit 1479eaff1f16 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-42151 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: net/bpf/bpf_dummy_struct_ops.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/7f79097b0de97a486b137b750d7dd7b20b519d23 https://git.kernel.org/stable/c/1479eaff1f16983d8fda7c5a08a586c21891087d