CVE-2022-49820

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49820
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49820.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49820
Downstream
Published
2025-05-01T14:09:42Z
Modified
2025-10-16T00:47:20.204976Z
Summary
mctp i2c: don't count unused / invalid keys for flow release
Details

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 WARNON in mctpi2cflowrelease:

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, devflowstate 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.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5b8abf9fc3dacd7529d363e26fe8230935d65f8
Fixed
a5915a9a3ab4067ef8996a57738d156eabeb3a12
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5b8abf9fc3dacd7529d363e26fe8230935d65f8
Fixed
9cbd48d5fa14e4c65f8580de16686077f7cea02b

Affected versions

v5.*

v5.17
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.0.6
v6.0.7
v6.0.8
v6.0.9
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
6.0.10