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 1D72D3DBB3 for ; Fri, 17 May 2024 11:52:42 +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=1715946762; cv=none; b=UK4Xk6iWUYw3WLedr0tzV9gTyYXfQx5pMKKRRZ7HXGB8uvYVdSNp1Bl6CDAMmI4/ffldzGCrunbnxobtomRHOqYuRlJ+dPPJ0QcGaXGb2CqaeoMe/jTa64anADbYrRGDernbbFRc2Gdk1A67ZZF2wPiHNuwYpPPJ6j4bZZ0a220= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715946762; c=relaxed/simple; bh=MdvUd+0KfK70PpMf4KkDyYBQMl2ET3DjQ44TOCjoGf4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gH06yLZ88CzCjaUVm0UR3w6F8/ZT+zoXzEWZ7NYdIhxGKyIc3460puPcsQTslFhF2Sbe6sqDXpf1b9lDoUAnLvtqVtr0GfzdeNkTdjn+/Iqz2MRId0XHf4cGpipdlvqNzryLeiy500A+z0B4Gt9kKnQzQMuJXgnqAjakeCSdPps= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=r0YsPqe+; 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="r0YsPqe+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99A8DC2BD11; Fri, 17 May 2024 11:52:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715946762; bh=MdvUd+0KfK70PpMf4KkDyYBQMl2ET3DjQ44TOCjoGf4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=r0YsPqe+yvrkDJH00tLc82vuyhk6pvDrhdAfR3HbwAwrSB+u9J7qS8t+hMd+Jqpn7 x405eNS0g49pYni9ev0qeHlMhL8wtGAIqGmffIVhs7pVtM0FwMtoT5+/zDofEt6BGC IAvhYiqbsiGiBfKYL0oBqHiGvLl+z3NC7TfeF9P8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27413: efi/capsule-loader: fix incorrect allocation size Date: Fri, 17 May 2024 13:52:05 +0200 Message-ID: <2024051702-CVE-2024-27413-bccd@gregkh> X-Mailer: git-send-email 2.45.1 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=3263; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=MdvUd+0KfK70PpMf4KkDyYBQMl2ET3DjQ44TOCjoGf4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnuLo+Yebe5lzWxnWTs5nV58XTXxlOFOqHHYtLiGfO5e eS9TM51xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQyPjPML/jknXmlrtxeKsPM YwnzF+2/8rqJDPMjP11ZZ3u0oHpt5F+u19kiOVo6190A 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: efi/capsule-loader: fix incorrect allocation size gcc-14 notices that the allocation with sizeof(void) on 32-bit architectures is not enough for a 64-bit phys_addr_t: drivers/firmware/efi/capsule-loader.c: In function 'efi_capsule_open': drivers/firmware/efi/capsule-loader.c:295:24: error: allocation of insufficient size '4' for type 'phys_addr_t' {aka 'long long unsigned int'} with size '8' [-Werror=alloc-size] 295 | cap_info->phys = kzalloc(sizeof(void *), GFP_KERNEL); | ^ Use the correct type instead here. The Linux kernel CVE team has assigned CVE-2024-27413 to this issue. Affected and fixed versions =========================== Issue introduced in 4.15 with commit f24c4d478013 and fixed in 4.19.309 with commit 00cf21ac5260 Issue introduced in 4.15 with commit f24c4d478013 and fixed in 5.4.271 with commit 950d4d74d311 Issue introduced in 4.15 with commit f24c4d478013 and fixed in 5.10.212 with commit 537e3f49dbe8 Issue introduced in 4.15 with commit f24c4d478013 and fixed in 5.15.151 with commit 4b73473c050a Issue introduced in 4.15 with commit f24c4d478013 and fixed in 6.1.81 with commit ddc547dd05a4 Issue introduced in 4.15 with commit f24c4d478013 and fixed in 6.6.21 with commit 11aabd748785 Issue introduced in 4.15 with commit f24c4d478013 and fixed in 6.7.9 with commit 62a5dcd9bd30 Issue introduced in 4.15 with commit f24c4d478013 and fixed in 6.8 with commit fccfa646ef36 Issue introduced in 4.14.13 with commit 95a362c9a689 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-27413 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/firmware/efi/capsule-loader.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/00cf21ac526011a29fc708f8912da446fac19f7b https://git.kernel.org/stable/c/950d4d74d311a18baed6878dbfba8180d7e5dddd https://git.kernel.org/stable/c/537e3f49dbe88881a6f0752beaa596942d9efd64 https://git.kernel.org/stable/c/4b73473c050a612fb4317831371073eda07c3050 https://git.kernel.org/stable/c/ddc547dd05a46720866c32022300f7376c40119f https://git.kernel.org/stable/c/11aabd7487857b8e7d768fefb092f66dfde68492 https://git.kernel.org/stable/c/62a5dcd9bd3097e9813de62fa6f22815e84a0172 https://git.kernel.org/stable/c/fccfa646ef3628097d59f7d9c1a3e84d4b6bb45e