Lucene search

K
cvelistLinuxCVELIST:CVE-2024-35997
HistoryMay 20, 2024 - 9:48 a.m.

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

2024-05-2009:48:00
Linux
www.cve.org
1
linux kernel
vulnerability
hid
i2c
operation locking
lock-up prevention

0.0004 Low

EPSS

Percentile

5.1%

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.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/hid/i2c-hid/i2c-hid-core.c"
    ],
    "versions": [
      {
        "version": "4a200c3b9a40",
        "lessThan": "21bfca822cfc",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "4a200c3b9a40",
        "lessThan": "c448a9fd50f7",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "4a200c3b9a40",
        "lessThan": "5095b93021b8",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "4a200c3b9a40",
        "lessThan": "b65fb50e04a9",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "4a200c3b9a40",
        "lessThan": "0561b65fbd53",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "4a200c3b9a40",
        "lessThan": "29e94f295bad",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "4a200c3b9a40",
        "lessThan": "418c5575d564",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "4a200c3b9a40",
        "lessThan": "9c0f59e47a90",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/hid/i2c-hid/i2c-hid-core.c"
    ],
    "versions": [
      {
        "version": "3.8",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "3.8",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.19.313",
        "lessThanOrEqual": "4.19.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.275",
        "lessThanOrEqual": "5.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.216",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.158",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.90",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.30",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.8.9",
        "lessThanOrEqual": "6.8.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

0.0004 Low

EPSS

Percentile

5.1%

Related for CVELIST:CVE-2024-35997