{"id":"CVE-2025-71183","revision":null,"records":[{"revision":"e8be80fd8a9f4fdea54429a4c53406be","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-71183","aliases":[],"title":"btrfs: always detect conflicting inodes when logging inode refs","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: always detect conflicting inodes when logging inode refs\n\nAfter rename exchanging (either with the rename exchange operation or\nregular renames in multiple non-atomic steps) two inodes and at least\none of them is a directory, we can end up with a log tree that contains\nonly of the inodes and after a power failure that can result in an attempt\nto delete the other inode when it should not because it was not deleted\nbefore the power failure. In some case that delete attempt fails when\nthe target inode is a directory that contains a subvolume inside it, since\nthe log replay code is not prepared to deal with directory entries that\npoint to root items (only inode items).\n\n1) We have directories \"dir1\" (inode A) and \"dir2\" (inode B) under the\n   same parent directory;\n\n2) We have a file (inode C) under directory \"dir1\" (inode A);\n\n3) We have a subvolume inside directory \"dir2\" (inode B);\n\n4) All these inodes were persisted in a past transaction and we are\n   currently at transaction N;\n\n5) We rename the file (inode C), so at btrfs_log_new_name() we update\n   inode C's last_unlink_trans to N;\n\n6) We get a rename exchange for \"dir1\" (inode A) and \"dir2\" (inode B),\n   so after the exchange \"dir1\" is inode B and \"dir2\" is inode A.\n   During the rename exchange we call btrfs_log_new_name() for inodes\n   A and B, but because they are directories, we don't update their\n   last_unlink_trans to N;\n\n7) An fsync against the file (inode C) is done, and because its inode\n   has a last_unlink_trans with a value of N we log its parent directory\n   (inode A) (through btrfs_log_all_parents(), called from\n   btrfs_log_inode_parent()).\n\n8) So we end up with inode B not logged, which now has the old name\n   of inode A. At copy_inode_items_to_log(), when logging inode A, we\n   did not check if we had any conflicting inode to log because inode\n   A has a generation lower than the current transaction (created in\n   a past transaction);\n\n9) After a power failure, when replaying the log tree, since we find that\n   inode A has a new name that conflicts with the name of inode B in the\n   fs tree, we attempt to delete inode B... this is wrong since that\n   directory was never deleted before the power failure, and because there\n   is a subvolume inside that directory, attempting to delete it will fail\n   since replay_dir_deletes() and btrfs_unlink_inode() are not prepared\n   to deal with dir items that point to roots instead of inodes.\n\n   When that happens the mount fails and we get a stack trace like the\n   following:\n\n   [87.2314] BTRFS info (device dm-0): start tree-log replay\n   [87.2318] BTRFS critical (device dm-0): failed to delete reference to subvol, root 5 inode 256 parent 259\n   [87.2332] ------------[ cut here ]------------\n   [87.2338] BTRFS: Transaction aborted (error -2)\n   [87.2346] WARNING: CPU: 1 PID: 638968 at fs/btrfs/inode.c:4345 __btrfs_unlink_inode+0x416/0x440 [btrfs]\n   [87.2368] Modules linked in: btrfs loop dm_thin_pool (...)\n   [87.2470] CPU: 1 UID: 0 PID: 638968 Comm: mount Tainted: G        W           6.18.0-rc7-btrfs-next-218+ #2 PREEMPT(full)\n   [87.2489] Tainted: [W]=WARN\n   [87.2494] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014\n   [87.2514] RIP: 0010:__btrfs_unlink_inode+0x416/0x440 [btrfs]\n   [87.2538] Code: c0 89 04 24 (...)\n   [87.2568] RSP: 0018:ffffc0e741f4b9b8 EFLAGS: 00010286\n   [87.2574] RAX: 0000000000000000 RBX: ffff9d3ec8a6cf60 RCX: 0000000000000000\n   [87.2582] RDX: 0000000000000002 RSI: ffffffff84ab45a1 RDI: 00000000ffffffff\n   [87.2591] RBP: ffff9d3ec8a6ef20 R08: 0000000000000000 R09: ffffc0e741f4b840\n   [87.2599] R10: ffff9d45dc1fffa8 R11: 0000000000000003 R12: ffff9d3ee26d77e0\n   [87.2608] R13: ffffc0e741f4ba98 R14: ffff9d4458040800 R15: ffff9d44b6b7ca10\n   [87.2618] FS:  00007f7b9603a840(0000) GS:ffff9d4658982000(0000) knlGS:0000000000000000\n   [87.\n---truncated---","state":0,"publishedAt":"2026-01-31T11:38:56.067+00:00","modifiedAt":"2026-10-19T18:15:16.685+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"fs/btrfs/tree-log.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"56f23fdbb600e6087db7b009775b95ce07cc3195\",\n                            \"lessThan\": \"c7f0207db68d5a1b4af23acbef1a8e8ddc431ebb\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"56f23fdbb600e6087db7b009775b95ce07cc3195\",\n                            \"lessThan\": \"a63998cd6687c14b160dccb0bbcf281b2eb0dab3\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"56f23fdbb600e6087db7b009775b95ce07cc3195\",\n                            \"lessThan\": \"0c2413c69129f6ce60157f7b53d9ba880260400b\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"56f23fdbb600e6087db7b009775b95ce07cc3195\",\n                            \"lessThan\": \"d52af58dd463821c5c516aebb031a58934f696ea\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"56f23fdbb600e6087db7b009775b95ce07cc3195\",\n                            \"lessThan\": \"7ba0b6461bc4edb3005ea6e00cdae189bcf908a5\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"048605483fbdd1e77ead32a7cd7b95cc17eaaf0e\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"033ad030df0ea932a21499582fea59e1df95769b\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"1653a3b0e9436c10eb307c318776cf91fe18ff08\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"ff440e9185e96cbb94481fc8b6192b944dcfc061\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"3.18.32\",\n                            \"lessThan\": \"3.19\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"4.1.23\",\n                            \"lessThan\": \"4.2\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"4.4.8\",\n                            \"lessThan\": \"4.5\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"4.5.2\",\n                            \"lessThan\": \"4.6\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"fs/btrfs/tree-log.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"4.6\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"4.6\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.1.161\",\n                            \"lessThanOrEqual\": \"6.1.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.6.121\",\n                            \"lessThanOrEqual\": \"6.6.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.12.66\",\n                            \"lessThanOrEqual\": \"6.12.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.18.6\",\n                            \"lessThanOrEqual\": \"6.18.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.19\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":9.1,"severity":"CRITICAL"}],"references":["https://git.kernel.org/stable/c/c7f0207db68d5a1b4af23acbef1a8e8ddc431ebb","https://git.kernel.org/stable/c/a63998cd6687c14b160dccb0bbcf281b2eb0dab3","https://git.kernel.org/stable/c/0c2413c69129f6ce60157f7b53d9ba880260400b","https://git.kernel.org/stable/c/d52af58dd463821c5c516aebb031a58934f696ea","https://git.kernel.org/stable/c/7ba0b6461bc4edb3005ea6e00cdae189bcf908a5"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-71183","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-71183","identifiers":["CVE-2025-71183"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-08T22:02:16.0606753+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-08T22:02:16.0606753+00:00","lastSuccessAt":"2026-11-08T22:02:16.2994172+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:16.2994182+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-eaa64dac63caa79c8d4905619258c41c51b39e461b996124e1a21b5e85e7e738-5c1b3bec2d88ca854826c6481a0dc8d7444a0d42f1465638fb0ec19ea1213afc","complete":true,"records":421267,"lastAttemptAt":"2026-11-08T22:02:15.5779251+00:00","lastSuccessAt":"2026-11-08T22:02:15.4942534+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:15.5779251+00:00","snapshotPublishedAt":"2026-11-08T21:27:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-fd9e659eac384b31b6b54c14a478a6b6","complete":true,"records":13654,"lastAttemptAt":"2026-11-08T22:02:46.9922536+00:00","lastSuccessAt":"2026-11-08T22:02:46.989+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:46.989+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13706,"expectedIdentifiers":13706,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-08T22:02:16.0606753+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-08T22:02:16.0606753+00:00","lastSuccessAt":"2026-11-08T22:02:16.3005264+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:16.3005266+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d44f9ddfc3b944cf9f918f0296ab9362","complete":true,"records":13666,"lastAttemptAt":"2026-11-08T22:02:41.4763214+00:00","lastSuccessAt":"2026-11-08T22:02:41.472+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:41.472+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13706,"expectedIdentifiers":13706,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-980593e6977a6d1b4fb1eed5a1ffe88a468736f89f0a06f710924ad59132c023","complete":true,"records":9914,"lastAttemptAt":"2026-11-08T22:02:15.9240904+00:00","lastSuccessAt":"2026-11-08T11:07:07.068788+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:15.9240904+00:00","snapshotPublishedAt":"2026-11-08T11:02:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-08T22:02:15.7236649+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:15.7236649+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-964c14035e6f0f6478b2870fad6a7ef9f6045876d4a12af2c2e514521e54b6af","complete":true,"records":3055,"lastAttemptAt":"2026-11-08T22:02:16.0280445+00:00","lastSuccessAt":"2026-11-08T11:07:12.1927025+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:16.0280445+00:00","snapshotPublishedAt":"2026-11-08T11:02:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-f8647d7ba64b1ba0dfdc7130944766d5b36d5b77d18fff0c79e651a4cff3c2b9","complete":true,"records":231293,"lastAttemptAt":"2026-11-08T22:02:15.8267172+00:00","lastSuccessAt":"2026-11-08T11:06:56.2918717+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:15.8267172+00:00","snapshotPublishedAt":"2026-11-08T11:02:50+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}