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 A7B3614D2A2 for ; Wed, 19 Jun 2024 13:39: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=1718804349; cv=none; b=p6lZjfI54FK98tI3BM9yaTM6LXvxmOvDcCwECTZv0xIO8YPkFrDEP96WSWOY2Nu4iP7tQZCb9uYeMxYrOGUOqdqJepAtAfD32f3KudlzjN6EsVhzyp43BRWKsXxTSnMd21IhKCMi00CGIM+N+zFdYQ+UkgUucGPIlbxh1Qzj76Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718804349; c=relaxed/simple; bh=+fiXF2+pD767tPYSVEqRIwb8WmkZsvh4MAMpTyohUFM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EXqeKnCjqR/PodQXhTb4C5M9QJZmPrTUCl8JsvEYgoYEHHtEZe9GoaA5tJe9q9jf+K0hyYAbB5q1Z/DOt9ECXqL8mHt8Uq92DWzPufciIZc/NY7zWHGt8/J/8OFK20uBahN/UfrfZM/QVMXLDrvinftYthtWyHetGA1vSoUKo6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KIzerm5L; 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="KIzerm5L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E053C2BBFC; Wed, 19 Jun 2024 13:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718804349; bh=+fiXF2+pD767tPYSVEqRIwb8WmkZsvh4MAMpTyohUFM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KIzerm5L5EFWgR22M4W4tEx8APWpEAhgEB1Xf3ezSd5Cy4Cgt3B5mUdB5sR6y+qAm WMVZPAiLNc/v8xsire38b8Qd7+zzsCS9jSuZff2+Dw+/T1uLQG60xLtZwieZEDGdF+ 9yg/ZbaxudxKYcta1yThm7HOwtOmEpwcylrUOmFU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-38575: wifi: brcmfmac: pcie: handle randbuf allocation failure Date: Wed, 19 Jun 2024 15:37:47 +0200 Message-ID: <2024061946-CVE-2024-38575-8b6b@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=2687; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=+fiXF2+pD767tPYSVEqRIwb8WmkZsvh4MAMpTyohUFM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlF97VmTIldzHX786a28lP83TP+1mz8mHXsRpKF/m7en clrZBXyO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiOYkMC45vmu/a8y0reVKH YdTL9y1Wv3sa3jLMLz+wI8Ayd4VNmVga02a3Gte7Ji2xAA== 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: wifi: brcmfmac: pcie: handle randbuf allocation failure The kzalloc() in brcmf_pcie_download_fw_nvram() will return null if the physical memory has run out. As a result, if we use get_random_bytes() to generate random bytes in the randbuf, the null pointer dereference bug will happen. In order to prevent allocation failure, this patch adds a separate function using buffer on kernel stack to generate random bytes in the randbuf, which could prevent the kernel stack from overflow. The Linux kernel CVE team has assigned CVE-2024-38575 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.30 with commit c35105f375b5 and fixed in 6.1.93 with commit 0eb2c0528e23 Issue introduced in 6.4 with commit 91918ce88d9f and fixed in 6.6.33 with commit c37466406f07 Issue introduced in 6.4 with commit 91918ce88d9f and fixed in 6.8.12 with commit 7c15eb344b0d Issue introduced in 6.4 with commit 91918ce88d9f and fixed in 6.9.3 with commit 3729ca9e48d1 Issue introduced in 6.4 with commit 91918ce88d9f and fixed in 6.10-rc1 with commit 316f790ebcf9 Issue introduced in 6.3.4 with commit ba72baed066f 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-38575 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: drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.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/0eb2c0528e232b3c32cde9d5e1c9f80ba2996e49 https://git.kernel.org/stable/c/c37466406f075476c2702ecc01917928af871f3b https://git.kernel.org/stable/c/7c15eb344b0d4d3468c9b2a7591ad2b859b29b88 https://git.kernel.org/stable/c/3729ca9e48d19a03ae049e2bde510e161c2f3720 https://git.kernel.org/stable/c/316f790ebcf94bdf59f794b7cdea4068dc676d4c