{
  "id": "CVE-2025-37797",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-37797",
  "published_at": "2025-05-02T14:16:01.905Z",
  "title": "net_sched: hfsc: Fix a UAF vulnerability in class handling",
  "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\nnet_sched: hfsc: Fix a UAF vulnerability in class handling\n\nThis patch fixes a Use-After-Free vulnerability in the HFSC qdisc class\nhandling. The issue occurs due to a time-of-check/time-of-use condition\nin hfsc_change_class() when working with certain child qdiscs like netem\nor codel.\n\nThe vulnerability works as follows:\n1. hfsc_change_class() checks if a class has packets (q.qlen != 0)\n2. It then calls qdisc_peek_len(), which for certain qdiscs (e.g.,\n   codel, netem) might drop packets and empty the queue\n3. The code continues assuming the queue is still non-empty, adding\n   the class to vttree\n4. This breaks HFSC scheduler assumptions that only non-empty classes\n   are in vttree\n5. Later, when the class is destroyed, this can lead to a Use-After-Free\n\nThe fix adds a second queue length check after qdisc_peek_len() to verify\nthe queue wasn't emptied.",
  "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:4.14:-:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:4.14:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:4.14:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:4.14:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:4.14:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:4.14:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:4.14:rc7:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:4.14:rc8:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc3:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \u003c 28b09a067831f7317c3841812276022d6c940677",
          "\u003e= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \u003c 39b9095dd3b55d9b2743df038c32138efa34a9de",
          "\u003e= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \u003c fcc8ede663569c704fb00a702973bd6c00373283",
          "\u003e= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \u003c 20d584a33e480ae80d105f43e0e7b56784da41b9",
          "\u003e= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \u003c 3aa852e3605000d5c47035c3fc3a986d14ccfa9f",
          "\u003e= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \u003c 86cd4641c713455a4f1c8e54c370c598c2b1cee0",
          "\u003e= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \u003c bb583c88d23b72d8d16453d24856c99bd93dadf5",
          "\u003e= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \u003c 3df275ef0a6ae181e8428a6589ef5d5231e58b5c"
        ],
        "fixed_in": [
          "28b09a067831f7317c3841812276022d6c940677",
          "39b9095dd3b55d9b2743df038c32138efa34a9de",
          "fcc8ede663569c704fb00a702973bd6c00373283",
          "20d584a33e480ae80d105f43e0e7b56784da41b9",
          "3aa852e3605000d5c47035c3fc3a986d14ccfa9f",
          "86cd4641c713455a4f1c8e54c370c598c2b1cee0",
          "bb583c88d23b72d8d16453d24856c99bd93dadf5",
          "3df275ef0a6ae181e8428a6589ef5d5231e58b5c"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "4.14"
        ],
        "fixed_in": [
          "0",
          "5.4.293",
          "5.10.237",
          "5.15.181",
          "6.1.136",
          "6.6.89",
          "6.12.26",
          "6.14.5",
          "6.15"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 28b09a067831f7317c3841812276022d6c940677 or 39b9095dd3b55d9b2743df038c32138efa34a9de or fcc8ede663569c704fb00a702973bd6c00373283 or 20d584a33e480ae80d105f43e0e7b56784da41b9 or 3aa852e3605000d5c47035c3fc3a986d14ccfa9f or 86cd4641c713455a4f1c8e54c370c598c2b1cee0 or bb583c88d23b72d8d16453d24856c99bd93dadf5 or 3df275ef0a6ae181e8428a6589ef5d5231e58b5c or later.",
      "Upgrade Linux to 0 or 5.4.293 or 5.10.237 or 5.15.181 or 6.1.136 or 6.6.89 or 6.12.26 or 6.14.5 or 6.15 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
