Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2024-35994
HistoryMay 20, 2024 - 10:15 a.m.

CVE-2024-35994

2024-05-2010:15:13
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
28
linux kernel
firmware
qcom
uefisecapp
memory errors
dma allocation

6.9 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

9.0%

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

firmware: qcom: uefisecapp: Fix memory related IO errors and crashes

It turns out that while the QSEECOM APP_SEND command has specific fields
for request and response buffers, uefisecapp expects them both to be in
a single memory region. Failure to adhere to this has (so far) resulted
in either no response being written to the response buffer (causing an
EIO to be emitted down the line), the SCM call to fail with EINVAL
(i.e., directly from TZ/firmware), or the device to be hard-reset.

While this issue can be triggered deterministically, in the current form
it seems to happen rather sporadically (which is why it has gone
unnoticed during earlier testing). This is likely due to the two
kzalloc() calls (for request and response) being directly after each
other. Which means that those likely return consecutive regions most of
the time, especially when not much else is going on in the system.

Fix this by allocating a single memory region for both request and
response buffers, properly aligning both structs inside it. This
unfortunately also means that the qcom_scm_qseecom_app_send() interface
needs to be restructured, as it should no longer map the DMA regions
separately. Therefore, move the responsibility of DMA allocation (or
mapping) to the caller.

Affected configurations

Vulners
Node
linuxlinux_kernelRange6.76.8.9
OR
linuxlinux_kernelRange6.9.0

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/firmware/qcom/qcom_qseecom_uefisecapp.c",
      "drivers/firmware/qcom/qcom_scm.c",
      "include/linux/firmware/qcom/qcom_qseecom.h",
      "include/linux/firmware/qcom/qcom_scm.h"
    ],
    "versions": [
      {
        "version": "759e7a2b62eb",
        "lessThan": "dd22b34fb53c",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "759e7a2b62eb",
        "lessThan": "ed09f81eeaa8",
        "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/firmware/qcom/qcom_qseecom_uefisecapp.c",
      "drivers/firmware/qcom/qcom_scm.c",
      "include/linux/firmware/qcom/qcom_qseecom.h",
      "include/linux/firmware/qcom/qcom_scm.h"
    ],
    "versions": [
      {
        "version": "6.7",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "6.7",
        "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"
      }
    ]
  }
]

6.9 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

9.0%