---
id: CVE-2025-21745
title: |-
  In the Linux kernel, the following vulnerability has been resolved:

  blk-cgroup: Fix class @block_class's subsystem refcount leakage

  blkcg_fill_root_iostats() iterates over @block_class's devices by
  class_dev_iter_(init|next)(), but doe…
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  blk-cgroup: Fix class @block_class's subsystem refcount leakage

  blkcg_fill_root_iostats() iterates over @block_class's devices by
  class_dev_iter_(init|next)(), but doe…
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 5.9, < 6.1.129'
  - 'linux_kernel >= 6.2, < 6.6.78'
  - 'linux_kernel >= 6.7, < 6.12.14'
  - 'linux_kernel >= 6.13, < 6.13.3'
patched:
  - linux_kernel 6.13.3
published: '2025-02-27'
updated: '2026-07-14'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-21745'
references:
  - url: 'https://git.kernel.org/stable/c/2ce09aabe009453d641a2ceb79e6461a2d4f3876'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/38287f779b34dfe959b4b681e909f2d3d52b88be'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/431b6ef2714be4d5babb802114987541a88b43b0'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/67c7f213e052b1aa6caba4a7e25e303bc6997126'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/993121481b5a87829f1e8163f47158b72679f309'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/d1248436cbef1f924c04255367ff4845ccd9025e'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/ffb494f1e7a047bd7a41b13796fcfb08fe5beafb'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-019113.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-082556.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-265688.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
  - cve.org
epss: 0.00256
epssPercentile: 0.17622
ingestedAt: '2026-07-14T13:36:55.622Z'
---

## Overview

In the Linux kernel, the following vulnerability has been resolved:

blk-cgroup: Fix class @block_class's subsystem refcount leakage

blkcg_fill_root_iostats() iterates over @block_class's devices by
class_dev_iter_(init|next)(), but does not end iterating with
class_dev_iter_exit(), so causes the class's subsystem refcount leakage.

Fix by ending the iterating with class_dev_iter_exit().

## Affected

- `linux_kernel >= 5.9, < 6.1.129`
- `linux_kernel >= 6.2, < 6.6.78`
- `linux_kernel >= 6.7, < 6.12.14`
- `linux_kernel >= 6.13, < 6.13.3`

## Remediation

Upgrade past the affected range:

- `linux_kernel 6.13.3`
