CVE-2024-58008 (GCVE-0-2024-58008)

Vulnerability from cvelistv5 – Published: 2025-02-27 02:12 – Updated: 2026-08-05 11:47
VLAI
Title
KEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y
Summary
In the Linux kernel, the following vulnerability has been resolved: KEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y With vmalloc stack addresses enabled (CONFIG_VMAP_STACK=y) DCP trusted keys can crash during en- and decryption of the blob encryption key via the DCP crypto driver. This is caused by improperly using sg_init_one() with vmalloc'd stack buffers (plain_key_blob). Fix this by always using kmalloc() for buffers we give to the DCP crypto driver.
Assigner
Linux CNA
Impacted products
Vendor Product Version
Linux Linux Affected: 0e28bf61a5f9ab30be3f3b4eafb8d097e39446bb , < 3192f1c54dddb9b5820bf5e8677809949d8e9c66 (git)
Affected: 0e28bf61a5f9ab30be3f3b4eafb8d097e39446bb , < 3355594de46fb1cba663f12b9644b664b8a609f4 (git)
Affected: 0e28bf61a5f9ab30be3f3b4eafb8d097e39446bb , < e8d9fab39d1f87b52932646b2f1e7877aa3fc0f4 (git)
Affected: 9e3b266afcfe4294e84496f50f006f029d3100db (git)
Affected: 6.10.7 , < 6.11 (semver)
Create a notification for this product.
Linux Linux Affected: 6.11
Unaffected: 0 , < 6.11 (semver)
Unaffected: 6.12.14 , ≤ 6.12.* (semver)
Unaffected: 6.13.3 , ≤ 6.13.* (semver)
Unaffected: 6.14 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "security/keys/trusted-keys/trusted_dcp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "3192f1c54dddb9b5820bf5e8677809949d8e9c66",
              "status": "affected",
              "version": "0e28bf61a5f9ab30be3f3b4eafb8d097e39446bb",
              "versionType": "git"
            },
            {
              "lessThan": "3355594de46fb1cba663f12b9644b664b8a609f4",
              "status": "affected",
              "version": "0e28bf61a5f9ab30be3f3b4eafb8d097e39446bb",
              "versionType": "git"
            },
            {
              "lessThan": "e8d9fab39d1f87b52932646b2f1e7877aa3fc0f4",
              "status": "affected",
              "version": "0e28bf61a5f9ab30be3f3b4eafb8d097e39446bb",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "9e3b266afcfe4294e84496f50f006f029d3100db",
              "versionType": "git"
            },
            {
              "lessThan": "6.11",
              "status": "affected",
              "version": "6.10.7",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "security/keys/trusted-keys/trusted_dcp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.11"
            },
            {
              "lessThan": "6.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.14",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.14",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.14",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.3",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.10.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y\n\nWith vmalloc stack addresses enabled (CONFIG_VMAP_STACK=y) DCP trusted\nkeys can crash during en- and decryption of the blob encryption key via\nthe DCP crypto driver. This is caused by improperly using sg_init_one()\nwith vmalloc\u0027d stack buffers (plain_key_blob).\n\nFix this by always using kmalloc() for buffers we give to the DCP crypto\ndriver."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable paths are entered only through the `add_key(2)`/`keyctl` syscall interface (`trusted_instantiate()` \u2192 `trusted_dcp_seal()`/`trusted_dcp_unseal()`), which requires a local account or shell on the i.MX device. There is no network or adjacent-network protocol that reaches the DCP trusted-key code.\nAC:L - On an affected build (`CONFIG_VMAP_STACK=y`, which is `default y`, plus `CONFIG_TRUSTED_KEYS_DCP=y`, `default y` on i.MX defconfigs) the stack buffer is always a vmalloc address, so `sg_init_one()` unconditionally builds a scatterlist with an out-of-range `struct page *` on every seal and unseal \u2014 no race, timing window, or victim state is involved. The attacker can repeat `add_key()` from many threads to sweep different kernel-stack addresses and therefore different bogus PFNs, so success does not depend on conditions outside their control.\nPR:L - `add_key(2)` only needs write permission on a keyring the caller already owns (`@u`/`@s`), and `trusted_instantiate()` performs no `capable()` check on the DCP path \u2014 the sole `CAP_SYS_ADMIN` gate in trusted-keys is in TPM1 `pcrlock()`, which is unreachable here. Any unprivileged local user, including a sandboxed application, can create or load a DCP trusted key.\nUI:N - The attacker triggers the defect entirely on their own by issuing `keyctl add trusted k \"new 32\" @u` or `\"load \u003chexblob\u003e\"`; no other user must mount a filesystem, open a file, or take any action.\nS:U - The bogus scatterlist page and the resulting wild read/write stay within the kernel\u0027s own address space and are reached through an ordinary syscall, so the vulnerable and impacted components share one security authority. No VM, hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The seal path makes the mxs-dcp driver `memcpy()` 16 bytes from `sg_virt()` of a `struct page *` that lies outside `mem_map`, so with `CONFIG_HIGHMEM=y` the out-of-bounds `PageHighMem()` flag read can send `kmap_atomic()` at an arbitrary physical frame and the driver reads kernel memory it was never meant to touch. This wild-pointer read pairs with the wild write below to form a memory-corruption primitive that can be leveraged to disclose kernel memory, so High is the appropriate rating.\nI:H - The unseal path is worse than a read: `sg_pcopy_from_buffer()` writes 16 bytes of DCP-decrypted output through the out-of-bounds page into memory that does not belong to the buffer, an out-of-bounds write whose target is influenced by the attacker\u0027s choice of thread stack and whose contents derive from the attacker-supplied blob ciphertext. Out-of-bounds kernel writes are rated High because they can be groomed into control-flow hijacking.\nA:H - The commit explicitly states DCP trusted keys \"can crash during en- and decryption\"; dereferencing a `struct page *` past `mem_map` yields a NULL or unmapped source address for the `memcpy` or a fixmap entry pointing at nonexistent physical memory, producing a kernel oops or external abort. An unprivileged user can invoke this repeatedly via `add_key()` for a reliable denial of service on the device."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:47:24.494Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/3192f1c54dddb9b5820bf5e8677809949d8e9c66"
        },
        {
          "url": "https://git.kernel.org/stable/c/3355594de46fb1cba663f12b9644b664b8a609f4"
        },
        {
          "url": "https://git.kernel.org/stable/c/e8d9fab39d1f87b52932646b2f1e7877aa3fc0f4"
        }
      ],
      "title": "KEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-58008",
    "datePublished": "2025-02-27T02:12:04.100Z",
    "dateReserved": "2025-02-27T02:10:48.227Z",
    "dateUpdated": "2026-08-05T11:47:24.494Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2024-58008",
      "date": "2026-11-19",
      "epss": "0.00131",
      "percentile": "0.0282"
    },
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-11-09T18:22:23+00:00",
      "cve": "CVE-2024-58008",
      "id": "CVE-2024-58008",
      "initial_release_date": "2024-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "200",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: KEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-58008.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.