{
  "id": "CVE-2025-40159",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-40159",
  "published_at": "2025-11-12T10:24:36.104Z",
  "title": "xsk: Harden userspace-supplied xdp_desc validation",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/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\nxsk: Harden userspace-supplied xdp_desc validation\n\nTurned out certain clearly invalid values passed in xdp_desc from\nuserspace can pass xp_{,un}aligned_validate_desc() and then lead\nto UBs or just invalid frames to be queued for xmit.\n\ndesc-\u003elen close to ``U32_MAX`` with a non-zero pool-\u003etx_metadata_len\ncan cause positive integer overflow and wraparound, the same way low\nenough desc-\u003eaddr with a non-zero pool-\u003etx_metadata_len can cause\nnegative integer overflow. Both scenarios can then pass the\nvalidation successfully.\nThis doesn't happen with valid XSk applications, but can be used\nto perform attacks.\n\nAlways promote desc-\u003elen to ``u64`` first to exclude positive\noverflows of it. Use explicit check_{add,sub}_overflow() when\nvalidating desc-\u003eaddr (which is ``u64`` already).\n\nbloat-o-meter reports a little growth of the code size:\n\nadd/remove: 0/0 grow/shrink: 2/1 up/down: 60/-16 (44)\nFunction                                     old     new   delta\nxskq_cons_peek_desc                          299     330     +31\nxsk_tx_peek_release_desc_batch               973    1002     +29\nxsk_generic_xmit                            3148    3132     -16\n\nbut hopefully this doesn't hurt the performance much.",
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 341ac980eab90ac1f6c22ee9f9da83ed9604d899, \u003c 1463cd066f32efd56ddfd3ac4e3524200f362980",
          "\u003e= 341ac980eab90ac1f6c22ee9f9da83ed9604d899, \u003c 5b5fffa7c81e55d8c8edf05ad40d811ec7047e21",
          "\u003e= 341ac980eab90ac1f6c22ee9f9da83ed9604d899, \u003c 07ca98f906a403637fc5e513a872a50ef1247f3b"
        ],
        "fixed_in": [
          "1463cd066f32efd56ddfd3ac4e3524200f362980",
          "5b5fffa7c81e55d8c8edf05ad40d811ec7047e21",
          "07ca98f906a403637fc5e513a872a50ef1247f3b"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.8"
        ],
        "fixed_in": [
          "0",
          "6.12.54",
          "6.17.4",
          "6.18"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 1463cd066f32efd56ddfd3ac4e3524200f362980 or 5b5fffa7c81e55d8c8edf05ad40d811ec7047e21 or 07ca98f906a403637fc5e513a872a50ef1247f3b or later.",
      "Upgrade Linux to 0 or 6.12.54 or 6.17.4 or 6.18 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
