{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-142914",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.337Z",
        "datePublished": "2026-12-03T03:25:56.133Z",
        "dateUpdated": "2026-12-04T03:26:03.353Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-04T03:26:03.353Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix dangling nodes in tree-mod-log after error in btrfs_tree_mod_log_insert_root()\n\nIf in btrfs_tree_mod_log_insert_root() there is an error in the call to\ntree_mod_log_insert() (the only possible error is -EEXIST, which means we\nhave a bug or some memory corruption maybe) we free all the nodes in the\n'tm_list' array but we don't remove them from the tree-mod-log rbtree,\nwhich can result in use-after-free bugs later.\n\nSo make sure we remove the nodes from the rbtree before freeing them after\nan error."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - btrfs_tree_mod_log_insert_root() is reached from btrfs_search_slot() through btrfs_cow_block() and btrfs_force_cow_block() when a local write, create, or unlink COWs the subvolume root; the failing input is the -EEXIST returned by tree_mod_log_insert() for a duplicate (logical, seq) already in fs_info->tree_mod_log.\nAC:H - The still-linked tm_list nodes are freed only if tree_mod_log_insert() of the BTRFS_MOD_LOG_ROOT_REPLACE element returns -EEXIST, which requires an existing tree_mod_log node with the same logical and the same seq that atomic64_inc_return() just issued under tree_mod_log_lock, a collision the caller cannot force.\nPR:L - A local user who can create or unlink a file in a mounted btrfs subvolume drives btrfs_search_slot() into btrfs_force_cow_block(), and FS_IOC_FIEMAP reaches btrfs_get_tree_mod_seq() via btrfs_is_data_extent_shared() with no CAP_SYS_ADMIN check on either path.\nUI:N - The same caller opens the tree-mod log with its own FS_IOC_FIEMAP and COWs the root with its own write or unlink.\nS:U - The dangling tree_mod_elem nodes and the second kfree() in btrfs_put_tree_mod_seq() corrupt only this kernel's heap and btrfs buffers, with no guest-to-host or IOMMU boundary crossed.\nC:H - The free_tms path kfree()s tm_list entries that stay linked in fs_info->tree_mod_log, and __tree_mod_log_search() plus tree_mod_log_rewind() then read that freed tree_mod_elem (rb children, seq, slot, key, blockptr), an arbitrary read once the slab slot is reused.\nI:H - btrfs_put_tree_mod_seq() rb_erase()s and kfree()s those same nodes a second time, and tree_mod_log_rewind() copies the freed slot_change.key and blockptr into a node via btrfs_set_node_key() and btrfs_set_node_blockptr().\nA:H - A use of the dangling rb_node in __tree_mod_log_search(), BUG_ON(tm->slot < n) on BTRFS_MOD_LOG_KEY_REMOVE_WHILE_FREEING in tree_mod_log_rewind(), or the double kfree() in btrfs_put_tree_mod_seq() panics the kernel."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/btrfs/tree-mod-log.c"
                    ],
                    "versions": [
                        {
                            "version": "5de865eebb8330eee19c37b31fb6f315a09d4273",
                            "lessThan": "38b9f8ad50bd12d3c3cdd8ef78203eafabc4dab6",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5de865eebb8330eee19c37b31fb6f315a09d4273",
                            "lessThan": "ece924917ba5d9b76fc27382d3cb958b7dcf24f3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5de865eebb8330eee19c37b31fb6f315a09d4273",
                            "lessThan": "649887e68f913af415cd7a681f2c0c27073dea67",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5de865eebb8330eee19c37b31fb6f315a09d4273",
                            "lessThan": "cbbee43ed8aec90bdd8967b893fe3f33c991a485",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5de865eebb8330eee19c37b31fb6f315a09d4273",
                            "lessThan": "f5111f6f16696983595fb25b3e62fce06f6feb02",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5de865eebb8330eee19c37b31fb6f315a09d4273",
                            "lessThan": "057e3c350a9185df598c88b4081168ed047c9247",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3939448a3adb1a157d4b01ca9082b6a19b6c4a34",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "fc2345d56d07227350981e4528a9dc9ca7f1b570",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3.12.14",
                            "lessThan": "3.13",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "3.13.7",
                            "lessThan": "3.14",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/btrfs/tree-mod-log.c"
                    ],
                    "versions": [
                        {
                            "version": "3.14",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.14",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.119",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.65",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.6",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.14",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.14",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.14",
                                    "versionEndExcluding": "6.12.119"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.14",
                                    "versionEndExcluding": "6.18.65"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.14",
                                    "versionEndExcluding": "7.3.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.14",
                                    "versionEndExcluding": "7.4-rc1"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.12.14"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.13.7"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/38b9f8ad50bd12d3c3cdd8ef78203eafabc4dab6"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ece924917ba5d9b76fc27382d3cb958b7dcf24f3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/649887e68f913af415cd7a681f2c0c27073dea67"
                },
                {
                    "url": "https://git.kernel.org/stable/c/cbbee43ed8aec90bdd8967b893fe3f33c991a485"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f5111f6f16696983595fb25b3e62fce06f6feb02"
                },
                {
                    "url": "https://git.kernel.org/stable/c/057e3c350a9185df598c88b4081168ed047c9247"
                }
            ],
            "title": "btrfs: fix dangling nodes in tree-mod-log after error in btrfs_tree_mod_log_insert_root()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}