// For flags

CVE-2024-35997

HID: i2c-hid: remove I2C_HID_READ_PENDING flag to prevent lock-up

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

In the Linux kernel, the following vulnerability has been resolved:

HID: i2c-hid: remove I2C_HID_READ_PENDING flag to prevent lock-up

The flag I2C_HID_READ_PENDING is used to serialize I2C operations.
However, this is not necessary, because I2C core already has its own
locking for that.

More importantly, this flag can cause a lock-up: if the flag is set in
i2c_hid_xfer() and an interrupt happens, the interrupt handler
(i2c_hid_irq) will check this flag and return immediately without doing
anything, then the interrupt handler will be invoked again in an
infinite loop.

Since interrupt handler is an RT task, it takes over the CPU and the
flag-clearing task never gets scheduled, thus we have a lock-up.

Delete this unnecessary flag.

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: HID: i2c-hid: elimine el indicador I2C_HID_READ_PENDING para evitar el bloqueo. El indicador I2C_HID_READ_PENDING se utiliza para serializar operaciones I2C. Sin embargo, esto no es necesario, porque el núcleo I2C ya tiene su propio bloqueo para ello. Más importante aún, este indicador puede causar un bloqueo: si el indicador está configurado en i2c_hid_xfer() y ocurre una interrupción, el controlador de interrupciones (i2c_hid_irq) verificará este indicador y regresará inmediatamente sin hacer nada, entonces se invocará el controlador de interrupciones. nuevamente en un bucle infinito. Dado que el controlador de interrupciones es una tarea RT, se hace cargo de la CPU y la tarea de limpieza de banderas nunca se programa, por lo que tenemos un bloqueo. Elimine esta bandera innecesaria.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-05-17 CVE Reserved
  • 2024-05-20 CVE Published
  • 2024-05-24 EPSS Updated
  • 2024-08-02 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-400: Uncontrolled Resource Consumption
  • CWE-667: Improper Locking
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.8 < 4.19.313
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 4.19.313"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.8 < 5.4.275
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.4.275"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.8 < 5.10.216
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.10.216"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.8 < 5.15.158
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 5.15.158"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.8 < 6.1.90
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 6.1.90"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.8 < 6.6.30
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 6.6.30"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.8 < 6.8.9
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 6.8.9"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.8 < 6.9
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.8 < 6.9"
en
Affected