CVE-2025-71183

Source
https://cve.org/CVERecord?id=CVE-2025-71183
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-71183.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-71183
Downstream
BELL (1)
DEBIAN (1)
ECHO (1)
MGASA (2)
openSUSE (1)
ROOT (3)
SUSE (11)
UBUNTU (1)
Related
Published
2026-01-31T11:38:56Z
Modified
2026-10-08T02:51:11Z
Severity
  • 9.1 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H CVSS Calculator
Summary
btrfs: always detect conflicting inodes when logging inode refs
Details

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

btrfs: always detect conflicting inodes when logging inode refs

After rename exchanging (either with the rename exchange operation or regular renames in multiple non-atomic steps) two inodes and at least one of them is a directory, we can end up with a log tree that contains only of the inodes and after a power failure that can result in an attempt to delete the other inode when it should not because it was not deleted before the power failure. In some case that delete attempt fails when the target inode is a directory that contains a subvolume inside it, since the log replay code is not prepared to deal with directory entries that point to root items (only inode items).

  1. We have directories "dir1" (inode A) and "dir2" (inode B) under the same parent directory;

  2. We have a file (inode C) under directory "dir1" (inode A);

  3. We have a subvolume inside directory "dir2" (inode B);

  4. All these inodes were persisted in a past transaction and we are currently at transaction N;

  5. We rename the file (inode C), so at btrfs_log_new_name() we update inode C's last_unlink_trans to N;

  6. We get a rename exchange for "dir1" (inode A) and "dir2" (inode B), so after the exchange "dir1" is inode B and "dir2" is inode A. During the rename exchange we call btrfs_log_new_name() for inodes A and B, but because they are directories, we don't update their last_unlink_trans to N;

  7. An fsync against the file (inode C) is done, and because its inode has a last_unlink_trans with a value of N we log its parent directory (inode A) (through btrfs_log_all_parents(), called from btrfs_log_inode_parent()).

  8. So we end up with inode B not logged, which now has the old name of inode A. At copy_inode_items_to_log(), when logging inode A, we did not check if we had any conflicting inode to log because inode A has a generation lower than the current transaction (created in a past transaction);

  9. After a power failure, when replaying the log tree, since we find that inode A has a new name that conflicts with the name of inode B in the fs tree, we attempt to delete inode B... this is wrong since that directory was never deleted before the power failure, and because there is a subvolume inside that directory, attempting to delete it will fail since replay_dir_deletes() and btrfs_unlink_inode() are not prepared to deal with dir items that point to roots instead of inodes.

    When that happens the mount fails and we get a stack trace like the following:

    [87.2314] BTRFS info (device dm-0): start tree-log replay [87.2318] BTRFS critical (device dm-0): failed to delete reference to subvol, root 5 inode 256 parent 259 [87.2332] ------------[ cut here ]------------ [87.2338] BTRFS: Transaction aborted (error -2) [87.2346] WARNING: CPU: 1 PID: 638968 at fs/btrfs/inode.c:4345 __btrfs_unlink_inode+0x416/0x440 [btrfs] [87.2368] Modules linked in: btrfs loop dm_thin_pool (...) [87.2470] CPU: 1 UID: 0 PID: 638968 Comm: mount Tainted: G W 6.18.0-rc7-btrfs-next-218+ #2 PREEMPT(full) [87.2489] Tainted: [W]=WARN [87.2494] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014 [87.2514] RIP: 0010:__btrfs_unlink_inode+0x416/0x440 [btrfs] [87.2538] Code: c0 89 04 24 (...) [87.2568] RSP: 0018:ffffc0e741f4b9b8 EFLAGS: 00010286 [87.2574] RAX: 0000000000000000 RBX: ffff9d3ec8a6cf60 RCX: 0000000000000000 [87.2582] RDX: 0000000000000002 RSI: ffffffff84ab45a1 RDI: 00000000ffffffff [87.2591] RBP: ffff9d3ec8a6ef20 R08: 0000000000000000 R09: ffffc0e741f4b840 [87.2599] R10: ffff9d45dc1fffa8 R11: 0000000000000003 R12: ffff9d3ee26d77e0 [87.2608] R13: ffffc0e741f4ba98 R14: ffff9d4458040800 R15: ffff9d44b6b7ca10 [87.2618] FS: 00007f7b9603a840(0000) GS:ffff9d4658982000(0000) knlGS:0000000000000000 [87. ---truncated---

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71183.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
56f23fdbb600e6087db7b009775b95ce07cc3195
Fixed
c7f0207db68d5a1b4af23acbef1a8e8ddc431ebb
Fixed
a63998cd6687c14b160dccb0bbcf281b2eb0dab3
Fixed
0c2413c69129f6ce60157f7b53d9ba880260400b
Fixed
d52af58dd463821c5c516aebb031a58934f696ea
Fixed
7ba0b6461bc4edb3005ea6e00cdae189bcf908a5
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3.18.32
Fixed
3.19
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4.1.23
Fixed
4.2
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4.4.8
Fixed
4.5
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4.5.2
Fixed
4.6
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
048605483fbdd1e77ead32a7cd7b95cc17eaaf0e
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
033ad030df0ea932a21499582fea59e1df95769b
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1653a3b0e9436c10eb307c318776cf91fe18ff08
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
ff440e9185e96cbb94481fc8b6192b944dcfc061

Affected versions

v3.*
v3.18.100
v3.18.101
v3.18.102
v3.18.103
v3.18.104
v3.18.105
v3.18.106
v3.18.107
v3.18.108
v3.18.109
v3.18.110
v3.18.111
v3.18.112
v3.18.113
v3.18.114
v3.18.115
v3.18.116
v3.18.117
v3.18.118
v3.18.119
v3.18.120
v3.18.121
v3.18.122
v3.18.123
v3.18.124
v3.18.125
v3.18.126
v3.18.127
v3.18.128
v3.18.129
v3.18.130
v3.18.131
v3.18.132
v3.18.133
v3.18.134
v3.18.135
v3.18.136
v3.18.137
v3.18.138
v3.18.139
v3.18.140
v3.18.32
v3.18.33
v3.18.34
v3.18.35
v3.18.36
v3.18.37
v3.18.38
v3.18.39
v3.18.40
v3.18.41
v3.18.42
v3.18.43
v3.18.44
v3.18.45
v3.18.46
v3.18.47
v3.18.48
v3.18.49
v3.18.50
v3.18.51
v3.18.52
v3.18.53
v3.18.54
v3.18.55
v3.18.56
v3.18.57
v3.18.58
v3.18.59
v3.18.60
v3.18.61
v3.18.62
v3.18.63
v3.18.64
v3.18.65
v3.18.66
v3.18.67
v3.18.68
v3.18.69
v3.18.70
v3.18.71
v3.18.72
v3.18.73
v3.18.74
v3.18.75
v3.18.76
v3.18.77
v3.18.78
v3.18.79
v3.18.80
v3.18.81
v3.18.82
v3.18.83
v3.18.84
v3.18.85
v3.18.86
v3.18.87
v3.18.88
v3.18.89
v3.18.90
v3.18.91
v3.18.92
v3.18.93
v3.18.94
v3.18.95
v3.18.96
v3.18.97
v3.18.98
v3.18.99
v4.*
v4.1.23
v4.1.24
v4.1.25
v4.1.26
v4.1.27
v4.1.28
v4.1.29
v4.1.30
v4.1.31
v4.1.32
v4.1.33
v4.1.34
v4.1.35
v4.1.36
v4.1.37
v4.1.38
v4.1.39
v4.1.40
v4.1.41
v4.1.42
v4.1.43
v4.1.44
v4.1.45
v4.1.46
v4.1.47
v4.1.48
v4.1.49
v4.1.50
v4.1.51
v4.1.52
v4.4.10
v4.4.100
v4.4.101
v4.4.102
v4.4.103
v4.4.104
v4.4.105
v4.4.106
v4.4.107
v4.4.108
v4.4.109
v4.4.11
v4.4.110
v4.4.111
v4.4.112
v4.4.113
v4.4.114
v4.4.115
v4.4.116
v4.4.117
v4.4.118
v4.4.119
v4.4.12
v4.4.120
v4.4.121
v4.4.122
v4.4.123
v4.4.124
v4.4.125
v4.4.126
v4.4.127
v4.4.128
v4.4.129
v4.4.13
v4.4.130
v4.4.131
v4.4.132
v4.4.133
v4.4.134
v4.4.135
v4.4.136
v4.4.137
v4.4.138
v4.4.139
v4.4.14
v4.4.140
v4.4.141
v4.4.142
v4.4.143
v4.4.144
v4.4.145
v4.4.146
v4.4.147
v4.4.148
v4.4.149
v4.4.15
v4.4.150
v4.4.151
v4.4.152
v4.4.153
v4.4.154
v4.4.155
v4.4.156
v4.4.157
v4.4.158
v4.4.159
v4.4.16
v4.4.160
v4.4.161
v4.4.162
v4.4.163
v4.4.164
v4.4.165
v4.4.166
v4.4.167
v4.4.168
v4.4.169
v4.4.17
v4.4.170
v4.4.171
v4.4.172
v4.4.173
v4.4.174
v4.4.175
v4.4.176
v4.4.177
v4.4.178
v4.4.179
v4.4.18
v4.4.180
v4.4.181
v4.4.182
v4.4.183
v4.4.184
v4.4.185
v4.4.186
v4.4.187
v4.4.188
v4.4.189
v4.4.19
v4.4.190
v4.4.191
v4.4.192
v4.4.193
v4.4.194
v4.4.195
v4.4.196
v4.4.197
v4.4.198
v4.4.199
v4.4.20
v4.4.200
v4.4.201
v4.4.202
v4.4.203
v4.4.204
v4.4.205
v4.4.206
v4.4.207
v4.4.208
v4.4.209
v4.4.21
v4.4.210
v4.4.211
v4.4.212
v4.4.213
v4.4.214
v4.4.215
v4.4.216
v4.4.217
v4.4.218
v4.4.219
v4.4.22
v4.4.220
v4.4.221
v4.4.222
v4.4.223
v4.4.224
v4.4.225
v4.4.226
v4.4.227
v4.4.228
v4.4.229
v4.4.23
v4.4.230
v4.4.231
v4.4.232
v4.4.233
v4.4.234
v4.4.235
v4.4.236
v4.4.237
v4.4.238
v4.4.239
v4.4.24
v4.4.240
v4.4.241
v4.4.242
v4.4.243
v4.4.244
v4.4.245
v4.4.246
v4.4.247
v4.4.248
v4.4.249
v4.4.25
v4.4.250
v4.4.251
v4.4.252
v4.4.253
v4.4.254
v4.4.255
v4.4.256
v4.4.257
v4.4.258
v4.4.259
v4.4.26
v4.4.260
v4.4.261
v4.4.262
v4.4.263
v4.4.264
v4.4.265
v4.4.266
v4.4.267
v4.4.268
v4.4.269
v4.4.27
v4.4.270
v4.4.271
v4.4.272
v4.4.273
v4.4.274
v4.4.275
v4.4.276
v4.4.277
v4.4.278
v4.4.279
v4.4.28
v4.4.280
v4.4.281
v4.4.282
v4.4.283
v4.4.284
v4.4.285
v4.4.286
v4.4.287
v4.4.288
v4.4.289
v4.4.29
v4.4.290
v4.4.291
v4.4.292
v4.4.293
v4.4.294
v4.4.295
v4.4.296
v4.4.297
v4.4.298
v4.4.299
v4.4.30
v4.4.300
v4.4.301
v4.4.302
v4.4.31
v4.4.32
v4.4.33
v4.4.34
v4.4.35
v4.4.36
v4.4.37
v4.4.38
v4.4.39
v4.4.40
v4.4.41
v4.4.42
v4.4.43
v4.4.44
v4.4.45
v4.4.46
v4.4.47
v4.4.48
v4.4.49
v4.4.50
v4.4.51
v4.4.52
v4.4.53
v4.4.54
v4.4.55
v4.4.56
v4.4.57
v4.4.58
v4.4.59
v4.4.60
v4.4.61
v4.4.62
v4.4.63
v4.4.64
v4.4.65
v4.4.66
v4.4.67
v4.4.68
v4.4.69
v4.4.70
v4.4.71
v4.4.72
v4.4.73
v4.4.74
v4.4.75
v4.4.76
v4.4.77
v4.4.78
v4.4.79
v4.4.8
v4.4.80
v4.4.81
v4.4.82
v4.4.83
v4.4.84
v4.4.85
v4.4.86
v4.4.87
v4.4.88
v4.4.89
v4.4.9
v4.4.90
v4.4.91
v4.4.92
v4.4.93
v4.4.94
v4.4.95
v4.4.96
v4.4.97
v4.4.98
v4.4.99
v4.5.2
v4.5.3
v4.5.4
v4.5.5
v4.5.6
v4.5.7

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-71183.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.6.0
Fixed
6.1.161
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.121
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.66
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-71183.json"