{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-38401",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2025-38401"
  ],
  "published": "2025-07-25T12:55:41Z",
  "summary": "mtk-sd: Prevent memory corruption from DMA map failure",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmtk-sd: Prevent memory corruption from DMA map failure\n\nIf msdc_prepare_data() fails to map the DMA region, the request is\nnot prepared for data receiving, but msdc_start_data() proceeds\nthe DMA with previous setting.\nSince this will lead a memory corruption, we have to stop the\nrequest operation soon after the msdc_prepare_data() fails to\nprepare it.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.144",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-38401"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5ac9e9e2e9cd6247d8c2d99780eae4556049e1cc"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d54771571f74a82c59830a32e76af78a8e57ac69"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/48bf4f3dfcdab02b22581d8e350a2d23130b72c0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/63e8953f16acdcb23e2d4dd8a566d3c34df3e200"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/61cdd663564674ea21ceb50aa9d3697cbe9e45f9"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3419bc6a7b65cbbb91417bb9970208478e034c79"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/a5f5f67b284d81776d4a3eb1f8607e4b7f91f11c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f5de469990f19569627ea0dd56536ff5a13beaa3"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T12:19:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerable path is the MMC/SD block request path reached through ordinary local file or block-device I/O on the eMMC/SD device; no network or remote peer is involved.\nAC:L - The only precondition is a dma_map_sg() failure, which a local attacker directly induces by exhausting swiotlb bounce buffers, a restricted-dma-pool, or M4U IOVA space with concurrent large O_DIRECT I/O and memory pressure, then reliably lands the corrupt transfer since every subsequent request re-arms the stale BD ring.\nPR:L - Any unprivileged local user can submit MMC requests simply by reading/writing files on the eMMC- or SD-backed filesystem and can generate the DMA-resource pressure needed; no capability or root check exists anywhere on the path.\nUI:N - The corrupt DMA is started by the driver itself as soon as a mapping failure occurs during normal I/O; no victim action is required.\nS:U - The corruption is device DMA into kernel memory managed by the same kernel security authority; no VM, sandbox, or IOMMU translation boundary is crossed.\nC:H - On write transfers the controller streams the contents of stale, already-unmapped and potentially reallocated kernel pages out to the SD/eMMC medium, and the resulting corruption is leverageable for broader kernel memory disclosure.\nI:H - On read transfers the hardware writes attacker-supplied card data into freed/reused kernel memory at stale physical addresses, an uncontrolled kernel write primitive suitable for control-flow hijacking \u2014 the commit itself states this \"will lead a memory corruption\".\nA:H - The mismatched descriptor state triggers DMA protect/checksum errors and data timeouts, and DMA into reallocated kernel memory readily produces oopses and panics."
    }
  }
}
