{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-54062",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-24T12:21:05.092Z",
        "datePublished": "2025-12-24T12:23:08.649Z",
        "dateUpdated": "2026-08-05T09:16:50.491Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:16:50.491Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix invalid free tracking in ext4_xattr_move_to_block()\n\nIn ext4_xattr_move_to_block(), the value of the extended attribute\nwhich we need to move to an external block may be allocated by\nkvmalloc() if the value is stored in an external inode.  So at the end\nof the function the code tried to check if this was the case by\ntesting entry->e_value_inum.\n\nHowever, at this point, the pointer to the xattr entry is no longer\nvalid, because it was removed from the original location where it had\nbeen stored.  So we could end up calling kvfree() on a pointer which\nwas not allocated by kvmalloc(); or we could also potentially leak\nmemory by not freeing the buffer when it should be freed.  Fix this by\nstoring whether it should be freed in a separate variable."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The bug is reached through local filesystem operations — `setxattr()` plus any inode-dirtying syscall on a mounted ext4 volume, or by mounting a crafted ext4 image. No network or remote peer is involved.\nAC:L - No race and no memory-layout luck is needed; the invalid free happens deterministically whenever the moved inline-value xattr is followed by an EA-inode-backed entry, and the attacker controls both the entry ordering (name-sorted) and the sizes that drive `ext4_xattr_make_inode_space()`'s selection, or controls everything outright via a crafted image.\nPR:L - An ordinary unprivileged user only needs a file they own to set `user.*` xattrs on and then dirty the inode; no capability, and `ext4_expand_extra_isize_ea()` runs from the ordinary `ext4_mark_inode_dirty()` path.\nUI:N - In the local-user scenario the attacker performs every step themselves — setxattr, then touch/write to dirty the inode — with no victim action required.\nS:U - The corruption stays within the kernel's own security authority; there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - `__free_pages()` on a still-referenced page-cache page underflows its refcount, so the page is recycled while ext4 keeps reading the inode table through the stale `buffer_head`, disclosing whatever kernel data now occupies that page; the `WARN` also leaks a kernel pointer.\nI:H - After the premature page free, ext4 continues writing inode and xattr bytes into the reallocated page through the stale `buffer_head`, giving a page-granularity kernel write primitive suitable for privilege escalation; slab/memcg accounting is corrupted as well.\nA:H - On 4.19/5.10-era kernels `kfree()` on the non-slab pointer hits `BUG_ON(!PageCompound(page))` for an immediate panic; on 6.x it produces a `WARN_ON_ONCE` (panic under `panic_on_warn`) plus a page refcount underflow that leads to a later oops, and the inverse case leaks memory on every attempt."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ext4/xattr.c"
                    ],
                    "versions": [
                        {
                            "version": "c7851208abffe5ae4deb01cf48763911dc14fc67",
                            "lessThan": "76887be2a96193cd11be818551b8934ecdb3123f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "f5cdc6a7339f250d44d4d469ed7a474ac0d6c7a7",
                            "lessThan": "f30f3391d089dc91aef91d08f4b04a6c0df2b067",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3b28c799a1334adb5a19f42f03abe0d8cbb05938",
                            "lessThan": "ba04d6af5ac440a6d5a2d35dc1d8e2cb0323550a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d738789ae9ec47d3458a008788f3cdc862ebf0cb",
                            "lessThan": "1a8822343e67432b658145d2760a524c884da9d4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a6744e14ce7045ab1a728bde9595f62fbd39f1d2",
                            "lessThan": "8beaa3cb293a8f7bacf711cf52201d59859dbc40",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8b6d06b3be7648b3b0f428558293ddf6e2cb94bf",
                            "lessThan": "c5fa4eedddd1c8342ce533cb401c0e693e55b4e3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d2efaf8c870c7067b8d1779773134f3481cd8f68",
                            "lessThan": "a18670395e5f28acddeca037c5e4bd2ea961b70a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1e9d62d252812575ded7c620d8fc67c32ff06c16",
                            "lessThan": "b2fab1807d26acd1c6115b95b5eddd697d84751b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1e9d62d252812575ded7c620d8fc67c32ff06c16",
                            "lessThan": "b87c7cdf2bed4928b899e1ce91ef0d147017ba45",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4.14.308",
                            "lessThan": "4.14.315",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.276",
                            "lessThan": "4.19.283",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.235",
                            "lessThan": "5.4.243",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.173",
                            "lessThan": "5.10.180",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.99",
                            "lessThan": "5.15.112",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.16",
                            "lessThan": "6.1.29",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.2.3",
                            "lessThan": "6.2.16",
                            "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/ext4/xattr.c"
                    ],
                    "versions": [
                        {
                            "version": "6.3",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.3",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.14.315",
                            "lessThanOrEqual": "4.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.283",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.243",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.180",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.112",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.29",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.2.16",
                            "lessThanOrEqual": "6.2.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3.3",
                            "lessThanOrEqual": "6.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4",
                            "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": "4.14.308",
                                    "versionEndExcluding": "4.14.315"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19.276",
                                    "versionEndExcluding": "4.19.283"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4.235",
                                    "versionEndExcluding": "5.4.243"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10.173",
                                    "versionEndExcluding": "5.10.180"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15.99",
                                    "versionEndExcluding": "5.15.112"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1.16",
                                    "versionEndExcluding": "6.1.29"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.2.3",
                                    "versionEndExcluding": "6.2.16"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.3",
                                    "versionEndExcluding": "6.3.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.3",
                                    "versionEndExcluding": "6.4"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/76887be2a96193cd11be818551b8934ecdb3123f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f30f3391d089dc91aef91d08f4b04a6c0df2b067"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ba04d6af5ac440a6d5a2d35dc1d8e2cb0323550a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1a8822343e67432b658145d2760a524c884da9d4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8beaa3cb293a8f7bacf711cf52201d59859dbc40"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c5fa4eedddd1c8342ce533cb401c0e693e55b4e3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a18670395e5f28acddeca037c5e4bd2ea961b70a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b2fab1807d26acd1c6115b95b5eddd697d84751b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b87c7cdf2bed4928b899e1ce91ef0d147017ba45"
                }
            ],
            "title": "ext4: fix invalid free tracking in ext4_xattr_move_to_block()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}