{
  "id": "CVE-2025-38001",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38001",
  "published_at": "2025-06-06T13:41:45.462Z",
  "title": "net_sched: hfsc: Address reentrant enqueue adding class to eltree twice",
  "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": {
    "created_at": "2025-07-11T18:34:08Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 35.2,
    "repo": "0xdevil/CVE-2025-38001",
    "source": "github"
  },
  "poc_repo_count": 3,
  "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: Address reentrant enqueue adding class to eltree twice\n\nSavino says:\n    \"We are writing to report that this recent patch\n    (141d34391abbb315d68556b7c67ad97885407547) [1]\n    can be bypassed, and a UAF can still occur when HFSC is utilized with\n    NETEM.\n\n    The patch only checks the cl-\u003ecl_nactive field to determine whether\n    it is the first insertion or not [2], but this field is only\n    incremented by init_vf [3].\n\n    By using HFSC_RSC (which uses init_ed) [4], it is possible to bypass the\n    check and insert the class twice in the eltree.\n    Under normal conditions, this would lead to an infinite loop in\n    hfsc_dequeue for the reasons we already explained in this report [5].\n\n    However, if TBF is added as root qdisc and it is configured with a\n    very low rate,\n    it can be utilized to prevent packets from being dequeued.\n    This behavior can be exploited to perform subsequent insertions in the\n    HFSC eltree and cause a UAF.\"\n\nTo fix both the UAF and the infinite loop, with netem as an hfsc child,\ncheck explicitly in hfsc_enqueue whether the class is already in the eltree\nwhenever the HFSC_RSC flag is set.\n\n[1] https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=141d34391abbb315d68556b7c67ad97885407547\n[2] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/sch_hfsc.c#L1572\n[3] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/sch_hfsc.c#L677\n[4] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/sch_hfsc.c#L1574\n[5] https://lore.kernel.org/netdev/8DuRWwfqjoRDLDmBMlIfbrsZg9Gx50DHJc1ilxsEBNe2D6NMoigR_eIRIG0LOjMc3r10nUUZtArXx4oZBIdUfZQrwjcQhdinnMis_0G7VEk=@willsroot.io/T/#u",
  "cwe": "CWE-835",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:debian:debian_linux:12.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:5.0:-:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:5.0:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:5.0:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:5.0:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:5.0:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:5.0:rc7:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:5.0:rc8:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 5.5
  },
  "repos": [
    {
      "repo": "0xdevil/CVE-2025-38001",
      "url": "https://github.com/0xdevil/CVE-2025-38001",
      "created_at": "2025-07-11T18:34:08Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 90,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2019-07-11T09:32:40Z"
    },
    {
      "repo": "khoatran107/cve-2025-38001",
      "url": "https://github.com/khoatran107/cve-2025-38001",
      "created_at": "2025-08-25T09:10:40Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2018-02-22T06:46:43Z"
    },
    {
      "repo": "ngobao2002/CVE-2025-38001-test",
      "url": "https://github.com/ngobao2002/CVE-2025-38001-test",
      "created_at": "2025-10-10T07:46:48Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "no",
      "kind": "writeup",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2020-11-09T08:24:49Z"
    },
    {
      "repo": "Jevil36239/CVE-2025-38001",
      "url": "https://github.com/Jevil36239/CVE-2025-38001",
      "created_at": "2026-05-10T11:50:43Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2019-05-28T04:46:10Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c e5bee633cc276410337d54b99f77fbc1ad8801e5",
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c 6672e6c00810056acaac019fe26cdc26fee8a66c",
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c 2c928b3a0b04a431ffcd6c8b7d88a267124a3a28",
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c a0ec22fa20b252edbe070a9de8501eef63c17ef5",
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c 295f7c579b07b5b7cf2dffe485f71cc2f27647cb",
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c 2f2190ce4ca972051cac6a8d7937448f8cb9673c",
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c 4e38eaaabfb7fffbb371a51150203e19eee5d70e",
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c 39ed887b1dd2d6b720f87e86692ac3006cc111c8",
          "\u003e= 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea, \u003c ac9fe7dd8e730a103ae4481147395cc73492d786"
        ],
        "fixed_in": [
          "e5bee633cc276410337d54b99f77fbc1ad8801e5",
          "6672e6c00810056acaac019fe26cdc26fee8a66c",
          "2c928b3a0b04a431ffcd6c8b7d88a267124a3a28",
          "a0ec22fa20b252edbe070a9de8501eef63c17ef5",
          "295f7c579b07b5b7cf2dffe485f71cc2f27647cb",
          "2f2190ce4ca972051cac6a8d7937448f8cb9673c",
          "4e38eaaabfb7fffbb371a51150203e19eee5d70e",
          "39ed887b1dd2d6b720f87e86692ac3006cc111c8",
          "ac9fe7dd8e730a103ae4481147395cc73492d786"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.0"
        ],
        "fixed_in": [
          "0",
          "5.4.294",
          "5.10.238",
          "5.15.185",
          "6.1.141",
          "6.6.93",
          "6.12.32",
          "6.14.10",
          "6.15.1",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to e5bee633cc276410337d54b99f77fbc1ad8801e5 or 6672e6c00810056acaac019fe26cdc26fee8a66c or 2c928b3a0b04a431ffcd6c8b7d88a267124a3a28 or a0ec22fa20b252edbe070a9de8501eef63c17ef5 or 295f7c579b07b5b7cf2dffe485f71cc2f27647cb or 2f2190ce4ca972051cac6a8d7937448f8cb9673c or 4e38eaaabfb7fffbb371a51150203e19eee5d70e or 39ed887b1dd2d6b720f87e86692ac3006cc111c8 or ac9fe7dd8e730a103ae4481147395cc73492d786 or later.",
      "Upgrade Linux to 0 or 5.4.294 or 5.10.238 or 5.15.185 or 6.1.141 or 6.6.93 or 6.12.32 or 6.14.10 or 6.15.1 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
