CVE-2024-47676

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-47676
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-47676.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-47676
Downstream
Related
Published
2024-10-21T11:53:20Z
Modified
2025-10-14T23:34:31.472917Z
Summary
mm/hugetlb.c: fix UAF of vma in hugetlb fault pathway
Details

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

mm/hugetlb.c: fix UAF of vma in hugetlb fault pathway

Syzbot reports a UAF in hugetlbfault(). This happens because vmfanonprepare() could drop the per-VMA lock and allow the current VMA to be freed before hugetlbvmaunlockread() is called.

We can fix this by using a modified version of vmfanonprepare() that doesn't release the VMA lock on failure, and then release it ourselves after hugetlbvmaunlock_read().

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
9acad7ba3e25d11f4c96df1b7312ae89e6faca5c
Fixed
e897d184a8dd4a4e1f39c8c495598e4d9472776c
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
9acad7ba3e25d11f4c96df1b7312ae89e6faca5c
Fixed
d59ebc99dee0a2687a26df94b901eb8216dbf876
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
9acad7ba3e25d11f4c96df1b7312ae89e6faca5c
Fixed
98b74bb4d7e96b4da5ef3126511febe55b76b807

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.10.1
v6.10.10
v6.10.11
v6.10.12
v6.10.2
v6.10.3
v6.10.4
v6.10.5
v6.10.6
v6.10.7
v6.10.8
v6.10.9
v6.11
v6.11-rc1
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.11.1
v6.8
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7

Database specific

vanir_signatures

[
    {
        "signature_type": "Line",
        "id": "CVE-2024-47676-09c1d2e1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e897d184a8dd4a4e1f39c8c495598e4d9472776c",
        "signature_version": "v1",
        "target": {
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "27691640875347102512507550943368821515",
                "178474896638954850986838210970846624744",
                "279010256053626318884538279416651515119",
                "255832691058985467630314864637767151811",
                "137886611439912156114542640243049879222",
                "109493167932666439822453900941262421951",
                "106446093501677288454183160554569797059",
                "268920882884881362244248648360575644815",
                "187417617353507397146499520353926038951",
                "326404503705255851249846889648840202694",
                "165347949609800744667728243923620911524",
                "5060789044378636736682132072743670466",
                "103552308024276443318756864670116254763",
                "23682337026682010840448136815073863215",
                "246971920203805952874492476926459645131",
                "177928496265199643693775627688495974659"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2024-47676-3a6410ff",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d59ebc99dee0a2687a26df94b901eb8216dbf876",
        "signature_version": "v1",
        "target": {
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "27691640875347102512507550943368821515",
                "178474896638954850986838210970846624744",
                "279010256053626318884538279416651515119",
                "255832691058985467630314864637767151811",
                "137886611439912156114542640243049879222",
                "109493167932666439822453900941262421951",
                "106446093501677288454183160554569797059",
                "268920882884881362244248648360575644815",
                "187417617353507397146499520353926038951",
                "326404503705255851249846889648840202694",
                "165347949609800744667728243923620911524",
                "5060789044378636736682132072743670466",
                "103552308024276443318756864670116254763",
                "23682337026682010840448136815073863215",
                "246971920203805952874492476926459645131",
                "177928496265199643693775627688495974659"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-47676-3a9ea824",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d59ebc99dee0a2687a26df94b901eb8216dbf876",
        "signature_version": "v1",
        "target": {
            "function": "hugetlb_fault",
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "function_hash": "259768557904715110148587995439973543406",
            "length": 3358.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-47676-4c624a3b",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d59ebc99dee0a2687a26df94b901eb8216dbf876",
        "signature_version": "v1",
        "target": {
            "function": "hugetlb_no_page",
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "function_hash": "199615308819707388064443033453247554147",
            "length": 3134.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-47676-641651d9",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@98b74bb4d7e96b4da5ef3126511febe55b76b807",
        "signature_version": "v1",
        "target": {
            "function": "hugetlb_fault",
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "function_hash": "259768557904715110148587995439973543406",
            "length": 3358.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-47676-a34d7fd5",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e897d184a8dd4a4e1f39c8c495598e4d9472776c",
        "signature_version": "v1",
        "target": {
            "function": "hugetlb_fault",
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "function_hash": "307176421464977512773948035243251639738",
            "length": 3278.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-47676-afedd4ae",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@98b74bb4d7e96b4da5ef3126511febe55b76b807",
        "signature_version": "v1",
        "target": {
            "function": "hugetlb_no_page",
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "function_hash": "199615308819707388064443033453247554147",
            "length": 3134.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-47676-c9623743",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e897d184a8dd4a4e1f39c8c495598e4d9472776c",
        "signature_version": "v1",
        "target": {
            "function": "hugetlb_no_page",
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "function_hash": "335693543419834489664442313126587221854",
            "length": 3081.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2024-47676-ee34d22f",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@98b74bb4d7e96b4da5ef3126511febe55b76b807",
        "signature_version": "v1",
        "target": {
            "file": "mm/hugetlb.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "27691640875347102512507550943368821515",
                "178474896638954850986838210970846624744",
                "279010256053626318884538279416651515119",
                "255832691058985467630314864637767151811",
                "137886611439912156114542640243049879222",
                "109493167932666439822453900941262421951",
                "106446093501677288454183160554569797059",
                "268920882884881362244248648360575644815",
                "187417617353507397146499520353926038951",
                "326404503705255851249846889648840202694",
                "165347949609800744667728243923620911524",
                "5060789044378636736682132072743670466",
                "103552308024276443318756864670116254763",
                "23682337026682010840448136815073863215",
                "246971920203805952874492476926459645131",
                "177928496265199643693775627688495974659"
            ]
        },
        "deprecated": false
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.9.0
Fixed
6.10.13
Type
ECOSYSTEM
Events
Introduced
6.11.0
Fixed
6.11.2