# CVE-2025-68178: blk-cgroup: fix possible deadlock while configuring policy

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **Published:** 2025-12-16T13:42:57.148Z
- **Modified:** 2026-10-30T13:18:17.020Z

## Who should check

- Anyone running Linux \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< e1729523759cda2c0afb76b1c88e0d2f2ef5b7cb; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 56ac639d6fa6fbb99caee74ee1c7276fc9bb47ed; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 0585b24d71197dd9ee8cf79c168a31628c631960; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 5d726c4dbeeddef612e6bed27edd29733f4d13af; f54c4ab8ffecf621ab20fb6d2b194af93616cd7e; 16398b4638b5cd8c1dc95fc940a1591a801d53ce; \>= 6.1.191, \< 6.2; \>= 6.4.4, \< 6.5
- Anyone running Linux 6.5

## Description

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

blk-cgroup: fix possible deadlock while configuring policy

Following deadlock can be triggered easily by lockdep:

WARNING: possible circular locking dependency detected
6.17.0-rc3-00124-ga12c2658ced0 \#1665 Not tainted
------------------------------------------------------
check/1334 is trying to acquire lock:
ff1100011d9d0678 (&q-\>sysfs\_lock){+.+.}-{4:4}, at: blk\_unregister\_queue+0x53/0x180

but task is already holding lock:
ff1100011d9d00e0 (&q-\>q\_usage\_counter(queue)\#3){++++}-{0:0}, at: del\_gendisk+0xba/0x110

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-\> \#2 (&q-\>q\_usage\_counter(queue)\#3){++++}-{0:0}:
       blk\_queue\_enter+0x40b/0x470
       blkg\_conf\_prep+0x7b/0x3c0
       tg\_set\_limit+0x10a/0x3e0
       cgroup\_file\_write+0xc6/0x420
       kernfs\_fop\_write\_iter+0x189/0x280
       vfs\_write+0x256/0x490
       ksys\_write+0x83/0x190
       \_\_x64\_sys\_write+0x21/0x30
       x64\_sys\_call+0x4608/0x4630
       do\_syscall\_64+0xdb/0x6b0
       entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e

-\> \#1 (&q-\>rq\_qos\_mutex){+.+.}-{4:4}:
       \_\_mutex\_lock+0xd8/0xf50
       mutex\_lock\_nested+0x2b/0x40
       wbt\_init+0x17e/0x280
       wbt\_enable\_default+0xe9/0x140
       blk\_register\_queue+0x1da/0x2e0
       \_\_add\_disk+0x38c/0x5d0
       add\_disk\_fwnode+0x89/0x250
       device\_add\_disk+0x18/0x30
       virtblk\_probe+0x13a3/0x1800
       virtio\_dev\_probe+0x389/0x610
       really\_probe+0x136/0x620
       \_\_driver\_probe\_device+0xb3/0x230
       driver\_probe\_device+0x2f/0xe0
       \_\_driver\_attach+0x158/0x250
       bus\_for\_each\_dev+0xa9/0x130
       driver\_attach+0x26/0x40
       bus\_add\_driver+0x178/0x3d0
       driver\_register+0x7d/0x1c0
       \_\_register\_virtio\_driver+0x2c/0x60
       virtio\_blk\_init+0x6f/0xe0
       do\_one\_initcall+0x94/0x540
       kernel\_init\_freeable+0x56a/0x7b0
       kernel\_init+0x2b/0x270
       ret\_from\_fork+0x268/0x4c0
       ret\_from\_fork\_asm+0x1a/0x30

-\> \#0 (&q-\>sysfs\_lock){+.+.}-{4:4}:
       \_\_lock\_acquire+0x1835/0x2940
       lock\_acquire+0xf9/0x450
       \_\_mutex\_lock+0xd8/0xf50
       mutex\_lock\_nested+0x2b/0x40
       blk\_unregister\_queue+0x53/0x180
       \_\_del\_gendisk+0x226/0x690
       del\_gendisk+0xba/0x110
       sd\_remove+0x49/0xb0 \[sd\_mod\]
       device\_remove+0x87/0xb0
       device\_release\_driver\_internal+0x11e/0x230
       device\_release\_driver+0x1a/0x30
       bus\_remove\_device+0x14d/0x220
       device\_del+0x1e1/0x5a0
       \_\_scsi\_remove\_device+0x1ff/0x2f0
       scsi\_remove\_device+0x37/0x60
       sdev\_store\_delete+0x77/0x100
       dev\_attr\_store+0x1f/0x40
       sysfs\_kf\_write+0x65/0x90
       kernfs\_fop\_write\_iter+0x189/0x280
       vfs\_write+0x256/0x490
       ksys\_write+0x83/0x190
       \_\_x64\_sys\_write+0x21/0x30
       x64\_sys\_call+0x4608/0x4630
       do\_syscall\_64+0xdb/0x6b0
       entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e

other info that might help us debug this:

Chain exists of:
  &q-\>sysfs\_lock --\> &q-\>rq\_qos\_mutex --\> &q-\>q\_usage\_counter(queue)\#3

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&q-\>q\_usage\_counter(queue)\#3);
                               lock(&q-\>rq\_qos\_mutex);
                               lock(&q-\>q\_usage\_counter(queue)\#3);
  lock(&q-\>sysfs\_lock);

Root cause is that queue\_usage\_counter is grabbed with rq\_qos\_mutex
held in blkg\_conf\_prep(), while queue should be freezed before
rq\_qos\_mutex from other context.

The blk\_queue\_enter() from blkg\_conf\_prep() is used to protect against
policy deactivation, which is already protected with blkcg\_mutex, hence
convert blk\_queue\_enter() to blkcg\_mutex to fix this problem. Meanwhile,
consider that blkcg\_mutex is held after queue is freezed from policy
deactivation, also convert blkg\_alloc() to use GFP\_NOIO.

## Affected and fixed versions

- Linux: \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< e1729523759cda2c0afb76b1c88e0d2f2ef5b7cb; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 56ac639d6fa6fbb99caee74ee1c7276fc9bb47ed; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 0585b24d71197dd9ee8cf79c168a31628c631960; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 5d726c4dbeeddef612e6bed27edd29733f4d13af; f54c4ab8ffecf621ab20fb6d2b194af93616cd7e; 16398b4638b5cd8c1dc95fc940a1591a801d53ce; \>= 6.1.191, \< 6.2; \>= 6.4.4, \< 6.5 (cvelist)
- Linux: 6.5 (cvelist)

## Mitigation

- Upgrade Linux to 6.5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-68178. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-68178.md
Affected: Linux >= a13bd91be22318768d55470cbc0b0f4488ef9edf, < e1729523759cda2c0afb76b1c88e0d2f2ef5b7cb; >= a13bd91be22318768d55470cbc0b0f4488ef9edf, < 56ac639d6fa6fbb99caee74ee1c7276fc9bb47ed; >= a13bd91be22318768d55470cbc0b0f4488ef9edf, < 0585b24d71197dd9ee8cf79c168a31628c631960; >= a13bd91be22318768d55470…
Fixed in: Linux 56ac639d6fa6fbb99caee74ee1c7276fc9bb47ed, Linux 0585b24d71197dd9ee8cf79c168a31628c631960, Linux 5d726c4dbeeddef612e6bed27edd29733f4d13af, Linux 6.2, Linux 6.5

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-68178 being exploited?

There is no confirmed exploitation: CVE-2025-68178 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-68178?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-68178?

Linux \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< e1729523759cda2c0afb76b1c88e0d2f2ef5b7cb; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 56ac639d6fa6fbb99caee74ee1c7276fc9bb47ed; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 0585b24d71197dd9ee8cf79c168a31628c631960; \>= a13bd91be22318768d55470cbc0b0f4488ef9edf, \< 5d726c4dbeeddef612e6bed27edd29733f4d13af; f54c4ab8ffecf621ab20fb6d2b194af93616cd7e; 16398b4638b5cd8c1dc95fc940a1591a801d53ce; \>= 6.1.191, \< 6.2; \>= 6.4.4, \< 6.5; Linux 6.5.

### Is there a fix for CVE-2025-68178?

Yes. Fixed in Linux 56ac639d6fa6fbb99caee74ee1c7276fc9bb47ed, Linux 0585b24d71197dd9ee8cf79c168a31628c631960, Linux 5d726c4dbeeddef612e6bed27edd29733f4d13af, Linux 6.2, Linux 6.5. Upgrade Linux to 6.5 or later.

### How do I check if I'm affected by CVE-2025-68178?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/e1729523759cda2c0afb76b1c88e0d2f2ef5b7cb>
- other: <https://git.kernel.org/stable/c/56ac639d6fa6fbb99caee74ee1c7276fc9bb47ed>
- other: <https://git.kernel.org/stable/c/0585b24d71197dd9ee8cf79c168a31628c631960>
- other: <https://git.kernel.org/stable/c/5d726c4dbeeddef612e6bed27edd29733f4d13af>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-68178>

HTML: <https://flawdb.com/CVE-2025-68178> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-68178>
