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().
[ { "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 } ]