{
  "id": "CVE-2025-38488",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38488",
  "published_at": "2025-07-28T11:21:52.085Z",
  "title": "smb: client: fix use-after-free in crypt_message when using async crypto",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 9.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix use-after-free in crypt_message when using async crypto\n\nThe CVE-2024-50047 fix removed asynchronous crypto handling from\ncrypt_message(), assuming all crypto operations are synchronous.\nHowever, when hardware crypto accelerators are used, this can cause\nuse-after-free crashes:\n\n  crypt_message()\n    // Allocate the creq buffer containing the req\n    creq = smb2_get_aead_req(..., \u0026req);\n\n    // Async encryption returns -EINPROGRESS immediately\n    rc = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req);\n\n    // Free creq while async operation is still in progress\n    kvfree_sensitive(creq, ...);\n\nHardware crypto modules often implement async AEAD operations for\nperformance. When crypto_aead_encrypt/decrypt() returns -EINPROGRESS,\nthe operation completes asynchronously. Without crypto_wait_req(),\nthe function immediately frees the request buffer, leading to crashes\nwhen the driver later accesses the freed memory.\n\nThis results in a use-after-free condition when the hardware crypto\ndriver later accesses the freed request structure, leading to kernel\ncrashes with NULL pointer dereferences.\n\nThe issue occurs because crypto_alloc_aead() with mask=0 doesn't\nguarantee synchronous operation. Even without CRYPTO_ALG_ASYNC in\nthe mask, async implementations can be selected.\n\nFix by restoring the async crypto handling:\n- DECLARE_CRYPTO_WAIT(wait) for completion tracking\n- aead_request_set_callback() for async completion notification\n- crypto_wait_req() to wait for operation completion\n\nThis ensures the request buffer isn't freed until the crypto operation\ncompletes, whether synchronous or asynchronous, while preserving the\nCVE-2024-50047 fix.",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc6:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 9.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 8f14a476abba13144df5434871a7225fd29af633, \u003c 5d047b12f86cc3b9fde1171c02d9bccf4dba0632",
          "\u003e= ef51c0d544b1518b35364480317ab6d3468f205d, \u003c 6550b2bef095d0dd2d2c8390d2ea4c3837028833",
          "\u003e= bce966530fd5542bbb422cb45ecb775f7a1a6bc3, \u003c 9a1d3e8d40f151c2d5a5f40c410e6e433f62f438",
          "\u003e= 0809fb86ad13b29e1d6d491364fc7ea4fb545995, \u003c 15a0a5de49507062bc3be4014a403d8cea5533de",
          "\u003e= b0abcd65ec545701b8793e12bc27dc98042b151a, \u003c 2a76bc2b24ed889a689fb1c9015307bf16aafb5b",
          "\u003e= b0abcd65ec545701b8793e12bc27dc98042b151a, \u003c 8ac90f6824fc44d2e55a82503ddfc95defb19ae0",
          "\u003e= b0abcd65ec545701b8793e12bc27dc98042b151a, \u003c b220bed63330c0e1733dc06ea8e75d5b9962b6b6",
          "538c26d9bf70c90edc460d18c81008a4e555925a",
          "\u003e= 5.10.237, \u003c 5.10.241",
          "\u003e= 5.15.181, \u003c 5.15.190",
          "\u003e= 6.1.128, \u003c 6.1.147",
          "\u003e= 6.6.57, \u003c 6.6.100",
          "\u003e= 6.11.4, \u003c 6.12"
        ],
        "fixed_in": [
          "5d047b12f86cc3b9fde1171c02d9bccf4dba0632",
          "6550b2bef095d0dd2d2c8390d2ea4c3837028833",
          "9a1d3e8d40f151c2d5a5f40c410e6e433f62f438",
          "15a0a5de49507062bc3be4014a403d8cea5533de",
          "2a76bc2b24ed889a689fb1c9015307bf16aafb5b",
          "8ac90f6824fc44d2e55a82503ddfc95defb19ae0",
          "b220bed63330c0e1733dc06ea8e75d5b9962b6b6",
          "5.10.241",
          "5.15.190",
          "6.1.147",
          "6.6.100",
          "6.12"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.12"
        ],
        "fixed_in": [
          "0",
          "5.10.241",
          "5.15.190",
          "6.1.147",
          "6.6.100",
          "6.12.40",
          "6.15.8",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 5d047b12f86cc3b9fde1171c02d9bccf4dba0632 or 6550b2bef095d0dd2d2c8390d2ea4c3837028833 or 9a1d3e8d40f151c2d5a5f40c410e6e433f62f438 or 15a0a5de49507062bc3be4014a403d8cea5533de or 2a76bc2b24ed889a689fb1c9015307bf16aafb5b or 8ac90f6824fc44d2e55a82503ddfc95defb19ae0 or b220bed63330c0e1733dc06ea8e75d5b9962b6b6 or 5.10.241 or 5.15.190 or 6.1.147 or 6.6.100 or 6.12 or later.",
      "Upgrade Linux to 0 or 5.10.241 or 5.15.190 or 6.1.147 or 6.6.100 or 6.12.40 or 6.15.8 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
