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 BA0361DDC5 for ; Wed, 28 Feb 2024 08:14:45 +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=1709108085; cv=none; b=i2ovEYHOstWqg6GkJxJVYH4Z5pyisAQLoVDo3magPhQZz77n6tvIaoXEl4G18KlcXAINCtctTtz8uJujfoqA5AoQa296ksScM6jKndT4FuhHNxKWRVn7uhUcZdCzXP7aKKc3BSjDTlQr4X/9sP6t02WXxYYSGAPZtTVk6hjm9LQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108085; c=relaxed/simple; bh=3oJmcmpUgamG2IKuscJSYUqHq1jD+8mn0/029NumH5Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rFIY0y0O4Iqw+bYsGpWowaXFL0bIDs/V77EfOFxqdKVMqoAYFfcD91Kyi/uW2Z+kbQg5SwQJMEYmEBWtJH/KUYVNGpvCs3gBhYWHD47N7NWk5qOr74Zqy3TMVzEVIjPS4SakzkQzIFxPb3VC99TU4cM6c7iE4LChsKJc19YYq+M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Wzgdv1Yl; 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="Wzgdv1Yl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E98ACC433C7; Wed, 28 Feb 2024 08:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709108085; bh=3oJmcmpUgamG2IKuscJSYUqHq1jD+8mn0/029NumH5Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Wzgdv1YllywhJVJ43GCQfiuiLnRj3V4Mm+xgJDSs2z5xhrDRfAZLVuPGyYJOchOLw dq35zibp7vG4XeRjIsfyaUgY4Mj9G/yeEz1TWxGRyZyZngBgyORDNSUh8TKyI83WcN xqLnbvZxWvyOapxj+7vZj+cr/6aMwOjjYTwMnzGM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: gregkh@kernel.org Subject: CVE-2020-36779: i2c: stm32f7: fix reference leak when pm_runtime_get_sync fails Date: Wed, 28 Feb 2024 09:14:17 +0100 Message-ID: <2024022819-CVE-2020-36779-9f1e@gregkh> X-Mailer: git-send-email 2.44.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=2351; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HUpEZTmHky1wwpdPC5VTc3BbFy0KS4DjhQWtON4mpE0=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn3Xsdc2DDlYcnFB1PMp/oqcm074rPr6s6PJU/07Gduu Pzmba6kR0csC4MgE4OsmCLLl208R/dXHFL0MrQ9DTOHlQlkCAMXpwBMRG83w4Jl7xO6ss7dkeO4 x5MQJBX39vm2p8cYFrTMPPKurcRTIdOvzWVJ3/MdbgefzAcA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: gregkh@kernel.org Description =========== In the Linux kernel, the following vulnerability has been resolved: i2c: stm32f7: fix reference leak when pm_runtime_get_sync fails The PM reference count is not expected to be incremented on return in these stm32f7_i2c_xx serious functions. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. The Linux kernel CVE team has assigned CVE-2020-36779 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit ea6dd25deeb5 and fixed in 5.10.37 with commit c323b270a52a Issue introduced in 5.6 with commit ea6dd25deeb5 and fixed in 5.11.21 with commit d791b90f5c5e Issue introduced in 5.6 with commit ea6dd25deeb5 and fixed in 5.12.4 with commit c7ea772c9fcf Issue introduced in 5.6 with commit ea6dd25deeb5 and fixed in 5.13 with commit 2c662660ce2b Please see https://www.kernel.org or 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-2020-36779 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/i2c/busses/i2c-stm32f7.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/c323b270a52a26aa8038a4d1fd9a850904a41166 https://git.kernel.org/stable/c/d791b90f5c5e5aa8ccf9e33386c16bd2b7e333a4 https://git.kernel.org/stable/c/c7ea772c9fcf711ed566814b92eecaffc0e2bfd0 https://git.kernel.org/stable/c/2c662660ce2bd3b09dae21a9a9ac9395e1e6c00b