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