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 13A0825634 for ; Thu, 8 Aug 2024 08:46:47 +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=1723106808; cv=none; b=s86XuwH9e92VLhLHgheF/Gnszdr87/n8RpCppNoAp2OIjUw7tX/U5kvlDm9lBQeeW7U5ByISZpw7Vw27u3uZp7CarBx0FRymoHv8rIDLyggrDvPeMqKMXxGTI5jKa0tFg3O0YYuIQaRPRclUEgO4EL26WBTWifHPgLWbZUi0UQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723106808; c=relaxed/simple; bh=eaeCL/kw8kk4lkMA7vnHqe66sHe+hudmDPQvaH9HhMM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qgiKTSQI0o6EblSVhvMaQr6j+iHTqGuF9Rd2b6J1bE17rqfW0wOMLc3qIE9b23rawBnEDhIQprzssELZsLYYOokYfKEkKHdTa7mQgOLVBJIBUdKJ5HHdOxl37SWwet90m3AWGy0LmgBMjjKzUrzcWkFsEVMORrrixUoZOkuGDKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uxwtuFFP; 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="uxwtuFFP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 312F0C32782; Thu, 8 Aug 2024 08:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723106807; bh=eaeCL/kw8kk4lkMA7vnHqe66sHe+hudmDPQvaH9HhMM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=uxwtuFFPE078bJe8vrALFQ4Uv0wDRMtlBXnjPvc8eOeGSfbMC/5qJWJAA8gL43w7f IWE0Qeqs19cGotZOpLtmcMydphE0qJe1IRPr+lxm/QA8UkeunDosDz9ogSba+MFxhp kSNMSsyEW8d8b+tAo8dmtC7+Fk75DfjFgQnnQR4c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42253: gpio: pca953x: fix pca953x_irq_bus_sync_unlock race Date: Thu, 8 Aug 2024 10:46:35 +0200 Message-ID: <2024080835-CVE-2024-42253-0c21@gregkh> X-Mailer: git-send-email 2.46.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=2728; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=eaeCL/kw8kk4lkMA7vnHqe66sHe+hudmDPQvaH9HhMM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlbWl+ffvoqML01wErmzgfDn/vVj9R7C87Nd9A/UnKq/ PxGY7+zHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjAR/xqGBat0n4S33rSz/VD/ XeP1ff3qM7HbHzHMj+NwY5RyTc7jD5YydJdvayoX+30SAA== 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: gpio: pca953x: fix pca953x_irq_bus_sync_unlock race Ensure that `i2c_lock' is held when setting interrupt latch and mask in pca953x_irq_bus_sync_unlock() in order to avoid races. The other (non-probe) call site pca953x_gpio_set_multiple() ensures the lock is held before calling pca953x_write_regs(). The problem occurred when a request raced against irq_bus_sync_unlock() approximately once per thousand reboots on an i.MX8MP based system. * Normal case 0-0022: write register AI|3a {03,02,00,00,01} Input latch P0 0-0022: write register AI|49 {fc,fd,ff,ff,fe} Interrupt mask P0 0-0022: write register AI|08 {ff,00,00,00,00} Output P3 0-0022: write register AI|12 {fc,00,00,00,00} Config P3 * Race case 0-0022: write register AI|08 {ff,00,00,00,00} Output P3 0-0022: write register AI|08 {03,02,00,00,01} *** Wrong register *** 0-0022: write register AI|12 {fc,00,00,00,00} Config P3 0-0022: write register AI|49 {fc,fd,ff,ff,fe} Interrupt mask P0 The Linux kernel CVE team has assigned CVE-2024-42253 to this issue. Affected and fixed versions =========================== Fixed in 6.1.101 with commit 58a5c93bd1a6 Fixed in 6.6.42 with commit e2ecdddca80d Fixed in 6.9.11 with commit de7cffa53149 Fixed in 6.10 with commit bfc6444b57dc 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-42253 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/gpio/gpio-pca953x.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/58a5c93bd1a6e949267400080f07e57ffe05ec34 https://git.kernel.org/stable/c/e2ecdddca80dd845df42376e4b0197fe97018ba2 https://git.kernel.org/stable/c/de7cffa53149c7b48bd1bb29b02390c9f05b7f41 https://git.kernel.org/stable/c/bfc6444b57dc7186b6acc964705d7516cbaf3904