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 A09FC1FF7CC for ; Thu, 6 Mar 2025 15:54:50 +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=1741276490; cv=none; b=faTekWYXlJBMo4nc+hDcUHwQO0uOgND3rbxD3MkJVu2RvnDCNofyGlWM8b3B8alvUAQ/FdruEquGhFofuDDH9ZPm6AmIw5kcgtvIzsSsSGjYGJZ+QsB/nKvsclYnqUAaiAE8mEpycRnVdXhtULxrfLFwRbHBgLyp7hDxdB4FKCw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741276490; c=relaxed/simple; bh=YmgoagnQLK7MhJQg24WcPMS7qxnny9fiMy3zPVC/49I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=X2oaOf/QYSWLxaLgKfjD/fA4kRYl0tOaDfjM+zhgUcq2eXZdUPFrvDN/inxuJaxuI/sW+daVcNA8KDlaadHK/CIM31wxGDwhNlOtUcDP5HxsNlTMX6iak5gnUARE+wDEnr3kFA8g8JgiG+UfuC9l+wJYH4LbNFyVrLvZu9vqc3k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CtKQ1UF9; 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="CtKQ1UF9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA22DC4CEE0; Thu, 6 Mar 2025 15:54:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741276490; bh=YmgoagnQLK7MhJQg24WcPMS7qxnny9fiMy3zPVC/49I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=CtKQ1UF9OmPtVVgpdN/kG2nV9AlgHp2wQV65+Pm+NS+Owbf5wzt7tmH3CsAeEXqvs L+j+eTKWyF3F39jWDgno1sXw4U2Gz7wan9fjl9rf26gP+f6jzkqKiZlI1k+Q414MB9 rmRTxnVzUA6jF6NWHzvT4R9+TQYiItZKw/QuKEaI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-58069: rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read Date: Thu, 6 Mar 2025 16:54:22 +0100 Message-ID: <2025030611-CVE-2024-58069-d1d4@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=2788; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YmgoagnQLK7MhJQg24WcPMS7qxnny9fiMy3zPVC/49I=; b=owGbwMvMwCRo6H6F97bub03G02pJDOknjyp3b7yf6d1s/dtDavnl2wf3HPOzvL9+tdQW/9Urb 8U9EGZf1xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATWb+DYcEU2WTFGx8EvCOq EvmjVl15u8j/iB7Dgnm7o6XW6HaF1b9KFjvJfElz0axObQA= 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: rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read The nvmem interface supports variable buffer sizes, while the regmap interface operates with fixed-size storage. If an nvmem client uses a buffer size less than 4 bytes, regmap_read will write out of bounds as it expects the buffer to point at an unsigned int. Fix this by using an intermediary unsigned int to hold the value. The Linux kernel CVE team has assigned CVE-2024-58069 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit fadfd092ee9138825d8c2a4f95719d2e2e3202b9 and fixed in 6.1.129 with commit c72b7a474d3f445bf0c5bcf8ffed332c78eb28a1 Issue introduced in 5.2 with commit fadfd092ee9138825d8c2a4f95719d2e2e3202b9 and fixed in 6.6.76 with commit 9adefa7b9559d0f21034a5d5ec1b55840c9348b9 Issue introduced in 5.2 with commit fadfd092ee9138825d8c2a4f95719d2e2e3202b9 and fixed in 6.12.13 with commit e5e06455760f2995b16a176033909347929d1128 Issue introduced in 5.2 with commit fadfd092ee9138825d8c2a4f95719d2e2e3202b9 and fixed in 6.13.2 with commit 517aedb365f2c94e2d7e0b908ac7127df76203a1 Issue introduced in 5.2 with commit fadfd092ee9138825d8c2a4f95719d2e2e3202b9 and fixed in 6.14-rc1 with commit 3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c 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-58069 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/rtc/rtc-pcf85063.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/c72b7a474d3f445bf0c5bcf8ffed332c78eb28a1 https://git.kernel.org/stable/c/9adefa7b9559d0f21034a5d5ec1b55840c9348b9 https://git.kernel.org/stable/c/e5e06455760f2995b16a176033909347929d1128 https://git.kernel.org/stable/c/517aedb365f2c94e2d7e0b908ac7127df76203a1 https://git.kernel.org/stable/c/3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c