{
  "id": "CVE-2025-38413",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38413",
  "published_at": "2025-07-25T13:20:17.394Z",
  "title": "virtio-net: xsk: rx: fix the frame's length check",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.7,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/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\nvirtio-net: xsk: rx: fix the frame's length check\n\nWhen calling buf_to_xdp, the len argument is the frame data's length\nwithout virtio header's length (vi-\u003ehdr_len). We check that len with\n\n\txsk_pool_get_rx_frame_size() + vi-\u003ehdr_len\n\nto ensure the provided len does not larger than the allocated chunk\nsize. The additional vi-\u003ehdr_len is because in virtnet_add_recvbuf_xsk,\nwe use part of XDP_PACKET_HEADROOM for virtio header and ask the vhost\nto start placing data from\n\n\thard_start + XDP_PACKET_HEADROOM - vi-\u003ehdr_len\nnot\n\thard_start + XDP_PACKET_HEADROOM\n\nBut the first buffer has virtio_header, so the maximum frame's length in\nthe first buffer can only be\n\n\txsk_pool_get_rx_frame_size()\nnot\n\txsk_pool_get_rx_frame_size() + vi-\u003ehdr_len\n\nlike in the current check.\n\nThis commit adds an additional argument to buf_to_xdp differentiate\nbetween the first buffer and other ones to correctly calculate the maximum\nframe's length.",
  "cpes": [
    "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:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.7,
    "nvd": 5.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \u003c 892f6ed9a4a38bb3360fdff091b9241cfa105b61",
          "\u003e= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \u003c 6013bb6bc24c2cac3f45b37a15b71b232a5b00ff",
          "\u003e= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \u003c 5177373c31318c3c6a190383bfd232e6cf565c36"
        ],
        "fixed_in": [
          "892f6ed9a4a38bb3360fdff091b9241cfa105b61",
          "6013bb6bc24c2cac3f45b37a15b71b232a5b00ff",
          "5177373c31318c3c6a190383bfd232e6cf565c36"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.11"
        ],
        "fixed_in": [
          "0",
          "6.12.37",
          "6.15.6",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 892f6ed9a4a38bb3360fdff091b9241cfa105b61 or 6013bb6bc24c2cac3f45b37a15b71b232a5b00ff or 5177373c31318c3c6a190383bfd232e6cf565c36 or later.",
      "Upgrade Linux to 0 or 6.12.37 or 6.15.6 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
