{
  "id": "CVE-2025-68795",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-68795",
  "published_at": "2026-01-13T15:29:06.217Z",
  "title": "ethtool: Avoid overflowing userspace buffer on stats query",
  "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\nethtool: Avoid overflowing userspace buffer on stats query\n\nThe ethtool -S command operates across three ioctl calls:\nETHTOOL_GSSET_INFO for the size, ETHTOOL_GSTRINGS for the names, and\nETHTOOL_GSTATS for the values.\n\nIf the number of stats changes between these calls (e.g., due to device\nreconfiguration), userspace's buffer allocation will be incorrect,\npotentially leading to buffer overflow.\n\nDrivers are generally expected to maintain stable stat counts, but some\ndrivers (e.g., mlx5, bnx2x, bna, ksz884x) use dynamic counters, making\nthis scenario possible.\n\nSome drivers try to handle this internally:\n- bnad_get_ethtool_stats() returns early in case stats.n_stats is not\n  equal to the driver's stats count.\n- micrel/ksz884x also makes sure not to write anything beyond\n  stats.n_stats and overflow the buffer.\n\nHowever, both use stats.n_stats which is already assigned with the value\nreturned from get_sset_count(), hence won't solve the issue described\nhere.\n\nChange ethtool_get_strings(), ethtool_get_stats(),\nethtool_get_phy_stats() to not return anything in case of a mismatch\nbetween userspace's size and get_sset_size(), to prevent buffer\noverflow.\nThe returned n_stats value will be equal to zero, to reflect that\nnothing has been returned.\n\nThis could result in one of two cases when using upstream ethtool,\ndepending on when the size change is detected:\n1. When detected in ethtool_get_strings():\n    # ethtool -S eth2\n    no stats available\n\n2. When detected in get stats, all stats will be reported as zero.\n\nBoth cases are presumably transient, and a subsequent ethtool call\nshould succeed.\n\nOther than the overflow avoidance, these two cases are very evident (no\noutput/cleared stats), which is arguably better than presenting\nincorrect/shifted stats.\nI also considered returning an error instead of a \"silent\" response, but\nthat seems more destructive towards userspace apps.\n\nNotes:\n- This patch does not claim to fix the inherent race, it only makes sure\n  that we do not overflow the userspace buffer, and makes for a more\n  predictable behavior.\n\n- RTNL lock is held during each ioctl, the race window exists between\n  the separate ioctl calls when the lock is released.\n\n- Userspace ethtool always fills stats.n_stats, but it is likely that\n  these stats ioctls are implemented in other userspace applications\n  which might not fill it. The added code checks that it's not zero,\n  to prevent any regressions.",
  "cwe": "CWE-122",
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 3df375a1e75483b7d973c3cc2e46aa374db8428b",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c f9dc0f45d2cd0189ce666288a29d2cc32c2e44d5",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 4afcb985355210e1688560dc47e64b94dad35d71",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c ca9983bc3a1189bd72f9ae449d925a66b2616326",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 7bea09f60f2ad5d232e2db8f1c14e850fd3fd416",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 4066b5b546293f44cd6d0e84ece6e3ee7ff27093",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 7b07be1ff1cb6c49869910518650e8d0abc7d25f"
        ],
        "fixed_in": [
          "3df375a1e75483b7d973c3cc2e46aa374db8428b",
          "f9dc0f45d2cd0189ce666288a29d2cc32c2e44d5",
          "4afcb985355210e1688560dc47e64b94dad35d71",
          "ca9983bc3a1189bd72f9ae449d925a66b2616326",
          "7bea09f60f2ad5d232e2db8f1c14e850fd3fd416",
          "4066b5b546293f44cd6d0e84ece6e3ee7ff27093",
          "7b07be1ff1cb6c49869910518650e8d0abc7d25f"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.12"
        ],
        "fixed_in": [
          "0",
          "5.10.248",
          "5.15.198",
          "6.1.160",
          "6.6.120",
          "6.12.64",
          "6.18.3",
          "6.19"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 3df375a1e75483b7d973c3cc2e46aa374db8428b or f9dc0f45d2cd0189ce666288a29d2cc32c2e44d5 or 4afcb985355210e1688560dc47e64b94dad35d71 or ca9983bc3a1189bd72f9ae449d925a66b2616326 or 7bea09f60f2ad5d232e2db8f1c14e850fd3fd416 or 4066b5b546293f44cd6d0e84ece6e3ee7ff27093 or 7b07be1ff1cb6c49869910518650e8d0abc7d25f or later.",
      "Upgrade Linux to 0 or 5.10.248 or 5.15.198 or 6.1.160 or 6.6.120 or 6.12.64 or 6.18.3 or 6.19 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
