From mboxrd@z Thu Jan 1 00:00:00 1970 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 0C8DE2CAB for ; Thu, 27 Feb 2025 02:18:53 +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=1740622733; cv=none; b=uD12AlvDEzzAQNnnDYGh83PUZ/wC8FCwpurEe6LtsE+C6iQD4vd/KuCsHdzI/J2C3D0bnS20ew8jeEd5J3v5B4OBNKIorvTLKVvjnY4GFlAmIzMMVEzfsYinWRHIpUHL2Vk98QafsZayEkZezzXn3tvKvSbgyoZWs4Rselzx4Zw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740622733; c=relaxed/simple; bh=0Y+1+V0M3p+bDzBr+OnKE9uNWbUkvMrMlzvjIRyQl5A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=e96JNNc6ClYr1BiQgxUq81crJGn4dgqgVdSmrsMqQFz6tdZ+Yck/ozsDkIN3efRm2RoqRSIftY0lhrS1CpGnZ4aBZEeHJUNYDu+XsPyQYOiFw6Z+q0WFRibZxwLf3+1wKijP5HsTRM5OrQHeBHaNHYLFdKgWPdO7MJAU0gQfnHM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YpQDwgUy; 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="YpQDwgUy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C72F1C4CED6; Thu, 27 Feb 2025 02:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740622732; bh=0Y+1+V0M3p+bDzBr+OnKE9uNWbUkvMrMlzvjIRyQl5A=; h=From:To:Cc:Subject:Date:Reply-to:From; b=YpQDwgUyjTM8n/Lk1jLLHA8vqvHWpZE89tnQdV6HJLAogVOos+ER12GJf0Mo9AvPg 0pjnsgc/C8vMCQl8ehnH92fH9CeKJ9WX5c28QCkCOw2dB41Rjbx/nr5QKKYSw8fBbd 8CTJYd+vRCvyCc04kyh0VFwn6rkxToKHoyuU952c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21772: partitions: mac: fix handling of bogus partition table Date: Wed, 26 Feb 2025 18:17:28 -0800 Message-ID: <2025022606-CVE-2025-21772-5ec0@gregkh> X-Mailer: git-send-email 2.48.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=2556; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0Y+1+V0M3p+bDzBr+OnKE9uNWbUkvMrMlzvjIRyQl5A=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Tytl64q0H/klcddGqVXhyoyeCT0dZtofN0XxLf2/N Vnva9m0jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI0skMC/qnPr53YvXDFqGF EdXllWb1TqKnFRnmGeTv+SX5KX+GV5iFwrYFyx9u3Vj6AAA= 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: partitions: mac: fix handling of bogus partition table Fix several issues in partition probing: - The bailout for a bad partoffset must use put_dev_sector(), since the preceding read_part_sector() succeeded. - If the partition table claims a silly sector size like 0xfff bytes (which results in partition table entries straddling sector boundaries), bail out instead of accessing out-of-bounds memory. - We must not assume that the partition table contains proper NUL termination - use strnlen() and strncmp() instead of strlen() and strcmp(). The Linux kernel CVE team has assigned CVE-2025-21772 to this issue. Affected and fixed versions =========================== Fixed in 6.1.129 with commit 27a39d006f85e869be68c1d5d2ce05e5d6445bf5 Fixed in 6.6.79 with commit 92527100be38ede924768f4277450dfe8a40e16b Fixed in 6.12.16 with commit 6578717ebca91678131d2b1f4ba4258e60536e9f Fixed in 6.13.4 with commit 7fa9706722882f634090bfc9af642bf9ed719e27 Fixed in 6.14-rc3 with commit 80e648042e512d5a767da251d44132553fe04ae0 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-2025-21772 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: block/partitions/mac.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/27a39d006f85e869be68c1d5d2ce05e5d6445bf5 https://git.kernel.org/stable/c/92527100be38ede924768f4277450dfe8a40e16b https://git.kernel.org/stable/c/6578717ebca91678131d2b1f4ba4258e60536e9f https://git.kernel.org/stable/c/7fa9706722882f634090bfc9af642bf9ed719e27 https://git.kernel.org/stable/c/80e648042e512d5a767da251d44132553fe04ae0