Linux Kernel up to 6.3.2 btrfs_insert_delayed_dir_index privilege escalation

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 4.4 | $0-$5k | 0.00 |
Summary
A vulnerability classified as critical has been found in Linux Kernel up to 6.3.2. This issue affects the function btrfs_insert_delayed_dir_index. This manipulation causes an unknown weakness.
This vulnerability is registered as CVE-2023-54158. No exploit is available.
It is recommended to upgrade the affected component.
Details
A vulnerability was found in Linux Kernel up to 6.3.2. It has been declared as critical. The impact remains unknown. The summary by CVE is:
In the Linux kernel, the following vulnerability has been resolved: btrfs: don't free qgroup space unless specified Boris noticed in his simple quotas testing that he was getting a leak with Sweet Tea's change to subvol create that stopped doing a transaction commit. This was just a side effect of that change. In the delayed inode code we have an optimization that will free extra reservations if we think we can pack a dir item into an already modified leaf. Previously this wouldn't be triggered in the subvolume create case because we'd commit the transaction, it was still possible but much harder to trigger. It could actually be triggered if we did a mkdir && subvol create with qgroups enabled. This occurs because in btrfs_insert_delayed_dir_index(), which gets called when we're adding the dir item, we do the following: btrfs_block_rsv_release(fs_info, trans->block_rsv, bytes, NULL); if we're able to skip reserving space. The problem here is that trans->block_rsv points at the temporary block rsv for the subvolume create, which has qgroup reservations in the block rsv. This is a problem because btrfs_block_rsv_release() will do the following: if (block_rsv->qgroup_rsv_reserved >= block_rsv->qgroup_rsv_size) { qgroup_to_release = block_rsv->qgroup_rsv_reserved - block_rsv->qgroup_rsv_size; block_rsv->qgroup_rsv_reserved = block_rsv->qgroup_rsv_size; } The temporary block rsv just has ->qgroup_rsv_reserved set, ->qgroup_rsv_size == 0. The optimization in btrfs_insert_delayed_dir_index() sets ->qgroup_rsv_reserved = 0. Then later on when we call btrfs_subvolume_release_metadata() which has btrfs_block_rsv_release(fs_info, rsv, (u64)-1, &qgroup_to_release); btrfs_qgroup_convert_reserved_meta(root, qgroup_to_release); qgroup_to_release is set to 0, and we do not convert the reserved metadata space. The problem here is that the block rsv code has been unconditionally messing with ->qgroup_rsv_reserved, because the main place this is used is delalloc, and any time we call btrfs_block_rsv_release() we do it with qgroup_to_release set, and thus do the proper accounting. The subvolume code is the only other code that uses the qgroup reservation stuff, but it's intermingled with the above optimization, and thus was getting its reservation freed out from underneath it and thus leaking the reserved space. The solution is to simply not mess with the qgroup reservations if we don't have qgroup_to_release set. This works with the existing code as anything that messes with the delalloc reservations always have qgroup_to_release set. This fixes the leak that Boris was observing.
It is possible to read the advisory at git.kernel.org. This vulnerability is known as CVE-2023-54158 since 12/24/2025. The exploitation appears to be difficult. Technical details of the vulnerability are known, but there is no available exploit. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 01/03/2026).
The vulnerability scanner Nessus provides a plugin with the ID 280058 (Linux Distros Unpatched Vulnerability : CVE-2023-54158), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 5.4.243, 5.10.180, 5.15.112, 6.1.29, 6.2.16 or 6.3.3 eliminates this vulnerability. Applying the patch 1e05bf5e80bb1161b7294c9ce5292b26232ab853/148b16cd30b202999ec5b534e3e5d8ab4b766f21/f264be24146bee2d652010a18ae2517df5856261/15e877e5923ec6d6caa5e447dcc4b79a8ff7cc53/04ff6bd0317735791ef3e443c7c89f3c0dda548d/478bd15f46b6e3aae78aac4f3788697f1546eea6/d246331b78cbef86237f9c22389205bc9b4e1cc1 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (280058) and CERT Bund (WID-SEC-2025-2929). Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Affected
- Open Source Linux Kernel
Product
Type
Vendor
Name
Version
- 5.4.242
- 5.10.179
- 5.15.111
- 6.1.0
- 6.1.1
- 6.1.2
- 6.1.3
- 6.1.4
- 6.1.5
- 6.1.6
- 6.1.7
- 6.1.8
- 6.1.9
- 6.1.10
- 6.1.11
- 6.1.12
- 6.1.13
- 6.1.14
- 6.1.15
- 6.1.16
- 6.1.17
- 6.1.18
- 6.1.19
- 6.1.20
- 6.1.21
- 6.1.22
- 6.1.23
- 6.1.24
- 6.1.25
- 6.1.26
- 6.1.27
- 6.1.28
- 6.2.0
- 6.2.1
- 6.2.2
- 6.2.3
- 6.2.4
- 6.2.5
- 6.2.6
- 6.2.7
- 6.2.8
- 6.2.9
- 6.2.10
- 6.2.11
- 6.2.12
- 6.2.13
- 6.2.14
- 6.2.15
- 6.3.0
- 6.3.1
- 6.3.2
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 4.6VulDB Meta Temp Score: 4.4
VulDB Base Score: 4.6
VulDB Temp Score: 4.4
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Privilege escalationCWE: Unknown
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 280058
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2023-54158
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Kernel 5.4.243/5.10.180/5.15.112/6.1.29/6.2.16/6.3.3
Patch: 1e05bf5e80bb1161b7294c9ce5292b26232ab853/148b16cd30b202999ec5b534e3e5d8ab4b766f21/f264be24146bee2d652010a18ae2517df5856261/15e877e5923ec6d6caa5e447dcc4b79a8ff7cc53/04ff6bd0317735791ef3e443c7c89f3c0dda548d/478bd15f46b6e3aae78aac4f3788697f1546eea6/d246331b78cbef86237f9c22389205bc9b4e1cc1
Timeline
12/24/2025 Advisory disclosed12/24/2025 CVE reserved
12/24/2025 VulDB entry created
01/03/2026 VulDB entry last update
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2023-54158 (🔒)
GCVE (CVE): GCVE-0-2023-54158
GCVE (VulDB): GCVE-100-338155
CERT Bund: WID-SEC-2025-2929 - Linux Kernel: Mehrere Schwachstellen
Entry
Created: 12/24/2025 15:19Updated: 01/03/2026 08:56
Changes: 12/24/2025 15:19 (57), 12/27/2025 00:36 (2), 01/03/2026 08:56 (7)
Complete: 🔍
Cache ID: 216::103
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.