| From bippy-1.1.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2022-49820: mctp i2c: don't count unused / invalid keys for flow release |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| mctp i2c: don't count unused / invalid keys for flow release |
| |
| We're currently hitting the WARN_ON in mctp_i2c_flow_release: |
| |
| if (midev->release_count > midev->i2c_lock_count) { |
| WARN_ONCE(1, "release count overflow"); |
| |
| This may be hit if we expire a flow before sending the first packet it |
| contains - as we will not be pairing the increment of release_count |
| (performed on flow release) with the i2c lock operation (only |
| performed on actual TX). |
| |
| To fix this, only release a flow if we've encountered it previously (ie, |
| dev_flow_state does not indicate NEW), as we will mark the flow as |
| ACTIVE at the same time as accounting for the i2c lock operation. We |
| also need to add an INVALID flow state, to indicate when we've done the |
| release. |
| |
| The Linux kernel CVE team has assigned CVE-2022-49820 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.18 with commit f5b8abf9fc3dacd7529d363e26fe8230935d65f8 and fixed in 6.0.10 with commit a5915a9a3ab4067ef8996a57738d156eabeb3a12 |
| Issue introduced in 5.18 with commit f5b8abf9fc3dacd7529d363e26fe8230935d65f8 and fixed in 6.1 with commit 9cbd48d5fa14e4c65f8580de16686077f7cea02b |
| |
| 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-2022-49820 |
| 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/net/mctp/mctp-i2c.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/a5915a9a3ab4067ef8996a57738d156eabeb3a12 |
| https://git.kernel.org/stable/c/9cbd48d5fa14e4c65f8580de16686077f7cea02b |