{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-38173",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2025-38173"
  ],
  "published": "2025-07-03T08:36:23Z",
  "summary": "crypto: marvell/cesa - Handle zero-length skcipher requests",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: marvell/cesa - Handle zero-length skcipher requests\n\nDo not access random memory for zero-length skcipher requests.\nJust return 0.",
  "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.142",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-38173"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/32d3e8049a8b60f18c5c39f5931bfb1130ac11c9"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c064ae2881d839709bd72d484d5f2af157f46024"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e1cc69da619588b1488689fe3535a0ba75a2b0e7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/78ea1ff6cb413a03ff6f7af4e28e24b4461a0965"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5e9666ac8b94c978690f937d59170c5237bd2c45"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7894694b5d5b2ecfd7fb081d6f60b9e169ab4d13"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c9610dda42bd382a96f97e68825cb5f66cd9e1dc"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8a4e047c6cc07676f637608a9dd675349b5de0a7"
    }
  ],
  "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 only trigger is a local `AF_ALG` socket (`algif_aead` with `authenc(...,cbc(aes))`) submitting an AAD-only request, or another in-kernel skcipher caller; the network consumers of `cbc(aes)` (IPsec ESP) explicitly reject `elen <= 0`, so no remote peer can drive `cryptlen == 0`.\nAC:L - The attacker directly and fully controls `req->cryptlen` by choosing the sendmsg payload length equal to the assoclen; the condition is deterministic with no race, memory-layout, or timing dependency.\nPR:L - Any unprivileged local user can open an `AF_ALG` socket and bind an `authenc(hmac(sha1),cbc(aes))` transform \u2014 no capabilities, no root, and no namespace tricks are required.\nUI:N - The attacker performs the entire sequence (socket/bind/sendmsg/recvmsg) on their own; no victim action or cooperation is involved.\nS:U - The faulty memory access and the resulting crash/leak are entirely within the kernel's own security authority on the same host; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The driver reads memory it never validated for a zero-length request (\"Do not access random memory\"), and on the non-TDMA path returns stale CESA SRAM contents \u2014 leftover IV/crypto state from a previous, potentially different-security-context operation \u2014 straight back into the caller's user-visible IV buffer.\nI:H - The unvalidated zero-length request is still programmed into a DMA-capable crypto engine with a zero-length descriptor and `nents == 0` scatterlists, so the out-of-contract memory access is not read-only and the resulting corrupted state is written back into caller buffers; the higher value is taken given the ambiguity of the \"random memory\" access direction.\nA:H - On the common TDMA-equipped CESA parts, `dma_map_sg()` with `nents == 0` returns 0 and trips `WARN_ON_ONCE()` in `__dma_map_sg_attrs()`, producing a kernel splat that becomes a full panic under `panic_on_warn`, and the zero-length descriptor handed to the engine leaves the hardware in an undefined state."
    }
  }
}
