{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2024-53096",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-11-19T17:17:24.983Z",
        "datePublished": "2024-11-25T21:17:48.691Z",
        "dateUpdated": "2026-08-05T11:43:40.137Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:43:40.137Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm: resolve faulty mmap_region() error path behaviour\n\nThe mmap_region() function is somewhat terrifying, with spaghetti-like\ncontrol flow and numerous means by which issues can arise and incomplete\nstate, memory leaks and other unpleasantness can occur.\n\nA large amount of the complexity arises from trying to handle errors late\nin the process of mapping a VMA, which forms the basis of recently\nobserved issues with resource leaks and observable inconsistent state.\n\nTaking advantage of previous patches in this series we move a number of\nchecks earlier in the code, simplifying things by moving the core of the\nlogic into a static internal function __mmap_region().\n\nDoing this allows us to perform a number of checks up front before we do\nany real work, and allows us to unwind the writable unmap check\nunconditionally as required and to perform a CONFIG_DEBUG_VM_MAPLE_TREE\nvalidation unconditionally also.\n\nWe move a number of things here:\n\n1. We preallocate memory for the iterator before we call the file-backed\n   memory hook, allowing us to exit early and avoid having to perform\n   complicated and error-prone close/free logic. We carefully free\n   iterator state on both success and error paths.\n\n2. The enclosing mmap_region() function handles the mapping_map_writable()\n   logic early. Previously the logic had the mapping_map_writable() at the\n   point of mapping a newly allocated file-backed VMA, and a matching\n   mapping_unmap_writable() on success and error paths.\n\n   We now do this unconditionally if this is a file-backed, shared writable\n   mapping. If a driver changes the flags to eliminate VM_MAYWRITE, however\n   doing so does not invalidate the seal check we just performed, and we in\n   any case always decrement the counter in the wrapper.\n\n   We perform a debug assert to ensure a driver does not attempt to do the\n   opposite.\n\n3. We also move arch_validate_flags() up into the mmap_region()\n   function. This is only relevant on arm64 and sparc64, and the check is\n   only meaningful for SPARC with ADI enabled. We explicitly add a warning\n   for this arch if a driver invalidates this check, though the code ought\n   eventually to be fixed to eliminate the need for this.\n\nWith all of these measures in place, we no longer need to explicitly close\nthe VMA on error paths, as we place all checks which might fail prior to a\ncall to any driver mmap hook.\n\nThis eliminates an entire class of errors, makes the code easier to reason\nabout and more robust."
                }
            ],
            "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 vulnerability is reached through the `mmap(2)` syscall on a locally-opened file descriptor (hugetlbfs/memfd, DRM, binder, perf, BPF map, etc.), requiring local access to the system. No network or physical component is involved.\nAC:L - The error path is triggered 100% deterministically: the attacker enables MDWE via the unprivileged `prctl(PR_SET_MDWE)` and then issues a single `mmap(PROT_READ|PROT_WRITE|PROT_EXEC)` on a driver-backed fd (or `PROT_MTE` on arm64), guaranteeing entry to `close_and_free_vma` after the `->mmap()` hook succeeded. There is no race and no attacker-uncontrollable precondition.\nPR:L - Only an ordinary unprivileged local user account is needed — `PR_SET_MDWE` has no capability check, and mmap-able file descriptors such as `memfd_create(MFD_HUGETLB)`, `/dev/binder`, DRM render nodes or perf events are available to normal users (including inside containers and Android apps). No root or capability is required.\nUI:N - The attacker's own process performs the prctl and the mmap; no victim action, no filesystem mount, and no interaction with any other user is needed.\nS:U - The corruption is confined to the kernel's own memory-management and driver state within the same security authority; there is no VM, IOMMU, or sandbox boundary crossed by the defect itself.\nC:H - `vma_close()` releases driver-owned objects and pages (e.g. `kref_put()` on the hugetlb `resv_map`, `hugetlb_vma_lock_free()`) while the PTEs installed by the driver's `->mmap()` are still live in the process page tables, so a sibling thread can read the freed memory directly through hardware without any VMA lookup, yielding an arbitrary kernel-memory read primitive.\nI:H - The same stale writable PTEs give write access to memory already handed back to the allocator, and the refcount underflow on driver objects enables heap-spray/type-confusion style corruption exploitable for control-flow hijack — a use-after-free write primitive.\nA:H - Even without full exploitation the path reliably oopses: `unmap_region()` reaches `__unmap_hugepage_range_final()` after `->close()` freed the VMA lock and after `vma->vm_file` was set to NULL, producing a use-after-free/NULL dereference and kernel panic that any local user can trigger at will."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/mmap.c"
                    ],
                    "versions": [
                        {
                            "version": "a3c08c021778dad30f69895e378843e9f423d734",
                            "lessThan": "43323a4e5b3f8ccc08e2f835abfdc7ee9da8f6ed",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "43bed0a13a5cdbb314d14f28c2bf2c60eb4e6e1e",
                            "lessThan": "44f48eb9a6051826227bbd375446064fb2a43c6c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "deb0f6562884b5b4beb883d73e66a7d3a1b96d99",
                            "lessThan": "52c81fd0f5a8bf8032687b94ccf00d13b44cc5c8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "deb0f6562884b5b4beb883d73e66a7d3a1b96d99",
                            "lessThan": "bdc136e2b05fabcd780fe5f165d154eb779dfcb0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "deb0f6562884b5b4beb883d73e66a7d3a1b96d99",
                            "lessThan": "5de195060b2e251a835f622759550e6202167641",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6757330b1be5b0606125b65ed50caac69bccf9a5",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "66f2ed0172af04a89677ae1898600e1264e25800",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5.10.150",
                            "lessThan": "5.10.231",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.75",
                            "lessThan": "5.15.174",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.19.17",
                            "lessThan": "5.20",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0.3",
                            "lessThan": "6.1",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/mmap.c"
                    ],
                    "versions": [
                        {
                            "version": "6.1",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.1",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.231",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.174",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.119",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.63",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12",
                            "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": "5.10.150",
                                    "versionEndExcluding": "5.10.231"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15.75",
                                    "versionEndExcluding": "5.15.174"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1",
                                    "versionEndExcluding": "6.1.119"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1",
                                    "versionEndExcluding": "6.6.63"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1",
                                    "versionEndExcluding": "6.12"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.19.17"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.0.3"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/43323a4e5b3f8ccc08e2f835abfdc7ee9da8f6ed"
                },
                {
                    "url": "https://git.kernel.org/stable/c/44f48eb9a6051826227bbd375446064fb2a43c6c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/52c81fd0f5a8bf8032687b94ccf00d13b44cc5c8"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bdc136e2b05fabcd780fe5f165d154eb779dfcb0"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5de195060b2e251a835f622759550e6202167641"
                },
                {
                    "url": "https://project-zero.issues.chromium.org/issues/374117290"
                }
            ],
            "title": "mm: resolve faulty mmap_region() error path behaviour",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 7.8,
                            "attackVector": "LOCAL",
                            "baseSeverity": "HIGH",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                            "integrityImpact": "HIGH",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "HIGH"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2024-53096",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2025-10-01T20:11:17.842524Z"
                            }
                        }
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "description": "CWE-noinfo Not enough information"
                            }
                        ]
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2025-10-01T20:17:12.853Z"
                }
            },
            {
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"
                    },
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"
                    }
                ],
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2025-11-03T22:29:09.669Z"
                }
            }
        ]
    }
}