CVE-2022-49820
JSON

5.5medium

mctp i2c: don't count unused / invalid keys for flow release

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.17% (higher than 7% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom f5b8abf9fc3dacd7529d363e26fe8230935d65f8 before a5915a9a3ab4067ef8996a57738d156eabeb3a12, from f5b8abf9fc3dacd7529d363e26fe8230935d65f8 before 9cbd48d5fa14e4c65f8580de16686077f7cea02b, 5.18
Not affected: before 5.18, from 6.0.10 up to 6.0.*, from 6.1 up to *
CVE List
linux linux_kernelfrom 5.18 before 6.0.10, 6.1NVD

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mctp i2c: no cuente las claves no utilizadas o no válidas para la liberación del flujo Actualmente estamos alcanzando el WARN_ON en mctp_i2c_flow_release: if (midev->release_count > midev->i2c_lock_count) { WARN_ONCE(1, "release count overflow"); Esto puede ser alcanzado si expiramos un flujo antes de enviar el primer paquete que contiene, ya que no estaremos emparejando el incremento de release_count (realizado en la liberación del flujo) con la operación de bloqueo i2c (solo se realiza en TX real). Para corregir esto, solo libere un flujo si lo hemos encontrado previamente (es decir, dev_flow_state no indica NUEVO), ya que marcaremos el flujo como ACTIVO al mismo tiempo que contabilizamos la operación de bloqueo i2c. También necesitamos agregar un estado de flujo INVÁLIDO, para indicar cuándo hemos realizado la liberación.

References

Sources

SourceRecordLicence
CVE ListCVE-2022-49820 changed 2026-05-11CVE Terms of Use
NVDCVE-2022-49820 changed 2026-06-17Public domain