{
  "id": "CVE-2025-40063",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-40063",
  "published_at": "2025-10-28T11:48:34.549Z",
  "title": "crypto: comp - Use same definition of context alloc and free ops",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:H/PR:L/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\ncrypto: comp - Use same definition of context alloc and free ops\n\nIn commit 42d9f6c77479 (\"crypto: acomp - Move scomp stream allocation\ncode into acomp\"), the crypto_acomp_streams struct was made to rely on\nhaving the alloc_ctx and free_ctx operations defined in the same order\nas the scomp_alg struct. But in that same commit, the alloc_ctx and\nfree_ctx members of scomp_alg may be randomized by structure layout\nrandomization, since they are contained in a pure ops structure\n(containing only function pointers). If the pointers within scomp_alg\nare randomized, but those in crypto_acomp_streams are not, then\nthe order may no longer match. This fixes the problem by removing the\nunion from scomp_alg so that both crypto_acomp_streams and scomp_alg\nwill share the same definition of alloc_ctx and free_ctx, ensuring\nthey will always have the same layout.",
  "cvss_by_source": {
    "cna": 7
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 42d9f6c774790d290c175e8775ce9f1366438098, \u003c 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b",
          "\u003e= 42d9f6c774790d290c175e8775ce9f1366438098, \u003c f75f66683ded09f7135aef2e763c245a07c8271a"
        ],
        "fixed_in": [
          "779d3b6f2d32c5f1da6163e959abe1e1ffe2945b",
          "f75f66683ded09f7135aef2e763c245a07c8271a"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.16"
        ],
        "fixed_in": [
          "0",
          "6.17.3",
          "6.18"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b or f75f66683ded09f7135aef2e763c245a07c8271a or later.",
      "Upgrade Linux to 0 or 6.17.3 or 6.18 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
