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 010F91F4295 for ; Mon, 21 Oct 2024 12:17:00 +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=1729513021; cv=none; b=EA3a41m3IaVCbbqWI1ox8JENXtzzG+44B9UC0l24Nj6/NqMLm94y6FGGeu7GrbpOOlRCdozmUp0UYlXLaivovFx8riBgRDI+zxW/j1wCHZ9piiMsFe2WIxndh6IkY7cCCsx6E1fqq3hG/julVw8/FI+HgsbuEA1SJYG9Z9I4AT8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729513021; c=relaxed/simple; bh=wmnDKOX7nV2wrh5INeH5O3vK/5WT1Bs5n0P17LmPdXY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Uk7kQKrWaKLHEN8GedBuMhbbl2m9XMRFCzgU1ZGYaIsSsgWOpCf8hthEQY/CBqpyDbgnMkTCJcZR/k5mBCaF0IdmMaWEGdoQhJNBuXEXgz2MzOl7nFcVbEIkhAnNy7kFvG9e7eiYHRCXijjMDnk5QpRjX4gGxVsTWonqgKqv+8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=K5MWjqGY; 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="K5MWjqGY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3537DC4CEC3; Mon, 21 Oct 2024 12:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729513020; bh=wmnDKOX7nV2wrh5INeH5O3vK/5WT1Bs5n0P17LmPdXY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=K5MWjqGYV4qfJZyyK/a2z0VWvI0xP1wgYx/4XCjQCPvOvjRJwz/J8QEWhBBZvRSyo XIBn9jxuTK5k5TuMnsEwv/vYZ1pR/qjx/Nwy+Z4mGIlb2ADr/bGn38Xlgl0zp8iXuy PUjKqZp5My6MeMmFa2EqomVbcuovcWGHNc6cKEPI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-47743: KEYS: prevent NULL pointer dereference in find_asymmetric_key() Date: Mon, 21 Oct 2024 14:16:22 +0200 Message-ID: <2024102110-CVE-2024-47743-77c3@gregkh> X-Mailer: git-send-email 2.47.0 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=2568; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wmnDKOX7nV2wrh5INeH5O3vK/5WT1Bs5n0P17LmPdXY=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliblwHdPpVjt+5d2Zx+NtSO53nLCy9sbwnipS+qhZfa /sysbyqI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbCdIFhwUTDn1z2bo//XFsQ yi44/aQ5M5+nCcM8m8b2d0HbLgmIWqSFRLv0c5aGpLIDAA== 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: KEYS: prevent NULL pointer dereference in find_asymmetric_key() In find_asymmetric_key(), if all NULLs are passed in the id_{0,1,2} arguments, the kernel will first emit WARN but then have an oops because id_2 gets dereferenced anyway. Add the missing id_2 check and move WARN_ON() to the final else branch to avoid duplicate NULL checks. Found by Linux Verification Center (linuxtesting.org) with Svace static analysis tool. The Linux kernel CVE team has assigned CVE-2024-47743 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 7d30198ee24f and fixed in 6.1.113 with commit 3322fa8f2aa4 Issue introduced in 5.17 with commit 7d30198ee24f and fixed in 6.6.54 with commit a3765b497a4f Issue introduced in 5.17 with commit 7d30198ee24f and fixed in 6.10.13 with commit 13b5b401ead9 Issue introduced in 5.17 with commit 7d30198ee24f and fixed in 6.11.2 with commit 0d3b0706ada1 Issue introduced in 5.17 with commit 7d30198ee24f and fixed in 6.12-rc1 with commit 70fd1966c93b 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-47743 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: crypto/asymmetric_keys/asymmetric_type.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/3322fa8f2aa40b0b3651034cd541647a600cc6c0 https://git.kernel.org/stable/c/a3765b497a4f5224cb2f7a6a2d3357d3066214ee https://git.kernel.org/stable/c/13b5b401ead95b5d8266f64904086c55b6024900 https://git.kernel.org/stable/c/0d3b0706ada15c333e6f9faf19590ff715e45d1e https://git.kernel.org/stable/c/70fd1966c93bf3bfe3fe6d753eb3d83a76597eef