{"id":"CVE-2025-38000","aliases":["CVE-2025-38000"],"related":[],"kind":"vulnerability","state":"published","title":"sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nsch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()\n\nWhen enqueuing the first packet to an HFSC class, hfsc_enqueue() calls the\nchild qdisc's peek() operation before incrementing sch->q.qlen and\nsch->qstats.backlog. If the child qdisc uses qdisc_peek_dequeued(), this may\ntrigger an immediate dequeue and potential packet drop. In such cases,\nqdisc_tree_reduce_backlog() is called, but the HFSC qdisc's qlen and backlog\nhave not yet been updated, leading to inconsistent queue accounting. This\ncan leave an empty HFSC class in the active list, causing further\nconsequences like use-after-free.\n\nThis patch fixes the bug by moving the increment of sch->q.qlen and\nsch->qstats.backlog before the call to the child qdisc's peek() operation.\nThis ensures that queue length and backlog are always accurate when packet\ndrops or dequeues are triggered during the peek.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nsch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()\n\nWhen enqueuing the first packet to an HFSC class, hfsc_enqueue() calls the\nchild qdisc's peek() operation before incrementing sch->q.qlen and\nsch->qstats.backlog. If the child qdisc uses qdisc_peek_dequeued(), this may\ntrigger an immediate dequeue and potential packet drop. In such cases,\nqdisc_tree_reduce_backlog() is called, but the HFSC qdisc's qlen and backlog\nhave not yet been updated, leading to inconsistent queue accounting. This\ncan leave an empty HFSC class in the active list, causing further\nconsequences like use-after-free.\n\nThis patch fixes the bug by moving the increment of sch->q.qlen and\nsch->qstats.backlog before the call to the child qdisc's peek() operation.\nThis ensures that queue length and backlog are always accurate when packet\ndrops or dequeues are triggered during the peek.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: sch_hfsc: Se corrige el error de contabilidad de qlen al usar peek en hfsc_enqueue(). Al encolar el primer paquete en una clase HFSC, hfsc_enqueue() llama a la operación peek() de la qdisc secundaria antes de incrementar sch-&gt;q.qlen y sch-&gt;qstats.backlog. Si la qdisc secundaria usa qdisc_peek_dequeued(), esto puede desencadenar una desencola inmediata y una posible pérdida de paquetes. En tales casos, se llama a qdisc_tree_reduce_backlog(), pero el qlen y el backlog de la qdisc HFSC aún no se han actualizado, lo que provoca una contabilidad de cola inconsistente. Esto puede dejar una clase HFSC vacía en la lista activa, lo que causa consecuencias adicionales como el use-after-free. Este parche corrige el error desplazando el incremento de sch-&gt;q.qlen y sch-&gt;qstats.backlog antes de la llamada a la operación peek() de la qdisc secundaria. Esto garantiza que la longitud de la cola y el backlog sean siempre precisos cuando se activan los descartes o las desencolas de paquetes durante la inspección.","source":"nvd"}],"published":"2025-06-06T13:03:35.405Z","modified":"2026-10-15T22:18:23.970Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"12d0ad3be9c3854e52ec74bb83bb6f43612827c7","fixed":"1034e3310752e8675e313f7271b348914008719a","status":"affected"},{"type":"git","introduced":"12d0ad3be9c3854e52ec74bb83bb6f43612827c7","fixed":"f9f593e34d2fb67644372c8f7b033bdc622ad228","status":"affected"},{"type":"git","introduced":"12d0ad3be9c3854e52ec74bb83bb6f43612827c7","fixed":"89c301e929a0db14ebd94b4d97764ce1d6981653","status":"affected"},{"type":"git","introduced":"12d0ad3be9c3854e52ec74bb83bb6f43612827c7","fixed":"f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4","status":"affected"},{"type":"git","introduced":"12d0ad3be9c3854e52ec74bb83bb6f43612827c7","fixed":"93c276942e75de0e5bc91576300d292e968f5a02","status":"affected"},{"type":"git","introduced":"12d0ad3be9c3854e52ec74bb83bb6f43612827c7","fixed":"49b21795b8e5654a7df3d910a12e1060da4c04cf","status":"affected"},{"type":"git","introduced":"12d0ad3be9c3854e52ec74bb83bb6f43612827c7","fixed":"3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335","status":"affected"},{"type":"git","introduced":"12d0ad3be9c3854e52ec74bb83bb6f43612827c7","fixed":"3f981138109f63232a5fb7165938d4c945cc1b9d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.8","status":"unaffected"},{"type":"semver","introduced":"5.4.294","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.238","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.185","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.141","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.93","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.31","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.14.9","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.8","fixed":"5.4.294"},{"status":"affected","introduced":"5.5","fixed":"5.10.238"},{"status":"affected","introduced":"5.11","fixed":"5.15.185"},{"status":"affected","introduced":"5.16","fixed":"6.1.141"},{"status":"affected","introduced":"6.2","fixed":"6.6.93"},{"status":"affected","introduced":"6.7","fixed":"6.12.31"},{"status":"affected","introduced":"6.13","fixed":"6.14.9"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/1034e3310752e8675e313f7271b348914008719a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f9f593e34d2fb67644372c8f7b033bdc622ad228","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/89c301e929a0db14ebd94b4d97764ce1d6981653","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/93c276942e75de0e5bc91576300d292e968f5a02","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/49b21795b8e5654a7df3d910a12e1060da4c04cf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3f981138109f63232a5fb7165938d4c945cc1b9d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:46:43.597Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38000","url":"https://www.cve.org/CVERecord?id=CVE-2025-38000","licence":"CVE Terms of Use","modified":"2026-10-15T21:52:06.159Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38000","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38000","licence":"Public domain","modified":"2026-10-15T22:18:23.970Z"}],"updatedAt":"2026-11-25T22:58:58.861Z","epss":{"score":0.00242,"percentile":0.16476,"date":"2026-12-01T12:00:22.000Z"}}