{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-48797",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-07-16T11:38:08.895Z",
        "datePublished": "2024-07-16T11:43:51.547Z",
        "dateUpdated": "2026-08-05T08:52:24.992Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:52:24.992Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm: don't try to NUMA-migrate COW pages that have other uses\n\nOded Gabbay reports that enabling NUMA balancing causes corruption with\nhis Gaudi accelerator test load:\n\n \"All the details are in the bug, but the bottom line is that somehow,\n  this patch causes corruption when the numa balancing feature is\n  enabled AND we don't use process affinity AND we use GUP to pin pages\n  so our accelerator can DMA to/from system memory.\n\n  Either disabling numa balancing, using process affinity to bind to\n  specific numa-node or reverting this patch causes the bug to\n  disappear\"\n\nand Oded bisected the issue to commit 09854ba94c6a (\"mm: do_wp_page()\nsimplification\").\n\nNow, the NUMA balancing shouldn't actually be changing the writability\nof a page, and as such shouldn't matter for COW.  But it appears it\ndoes.  Suspicious.\n\nHowever, regardless of that, the condition for enabling NUMA faults in\nchange_pte_range() is nonsensical.  It uses \"page_mapcount(page)\" to\ndecide if a COW page should be NUMA-protected or not, and that makes\nabsolutely no sense.\n\nThe number of mappings a page has is irrelevant: not only does GUP get a\nreference to a page as in Oded's case, but the other mappings migth be\npaged out and the only reference to them would be in the page count.\n\nSince we should never try to NUMA-balance a page that we can't move\nanyway due to other references, just fix the code to use 'page_count()'.\nOded confirms that that fixes his issue.\n\nNow, this does imply that something in NUMA balancing ends up changing\npage protections (other than the obvious one of making the page\ninaccessible to get the NUMA faulting information).  Otherwise the COW\nsimplification wouldn't matter - since doing the GUP on the page would\nmake sure it's writable.\n\nThe cause of that permission change would be good to figure out too,\nsince it clearly results in spurious COW events - but fixing the\nnonsensical test that just happened to work before is obviously the\nCorrectThing(tm) to do regardless."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
                        "baseScore": 7.1,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The vulnerable path is in mm NUMA balancing (task_numa_work/change_prot_numa/change_pte_range) or unprivileged mbind(MPOL_MF_LAZY); it is not reachable from network packet processing.\nAC:L - On NUMA systems with balancing enabled (common for accelerator/RDMA servers), an attacker who pins pages and writes them can trigger the bad COW path reliably, as demonstrated by the original reporter; mbind(MPOL_MF_LAZY) also forces the prot_numa path.\nPR:L - An unprivileged local user can obtain GUP/DMA pins (io_uring registered buffers, GPU/DRM, RDMA device access) and is subject to automatic NUMA balancing or can call mbind without capabilities.\nUI:N - No victim action is required; NUMA balancing runs in the attacker’s own process context, or the attacker invokes mbind directly.\nS:U - Impact stays within the same kernel privilege domain (process/DMA buffer coherence); this is not a VM escape, IOMMU bypass, or other cross-authority boundary violation.\nC:N - The failure mode is process/DMA desynchronization on the caller’s own pinned pages, not a kernel read primitive or cross-tenant disclosure of other subjects’ memory.\nI:H - The bug causes confirmed memory/data corruption: COW breaks the mapping while GUP/DMA still references the old page, so CPU and device see divergent contents with serious integrity impact on accelerator/RDMA workloads.\nA:H - Corrupting DMA-backed buffers can crash or hang affected userspace and drivers and disrupt service availability on shared accelerator/RDMA hosts; when uncertain versus availability-none, the higher impact is selected."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/mprotect.c"
                    ],
                    "versions": [
                        {
                            "version": "09854ba94c6aad7886996bfbee2530b3d8a7f4f4",
                            "lessThan": "254090925e16abd914c87b4ad1b489440d89c4c3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "09854ba94c6aad7886996bfbee2530b3d8a7f4f4",
                            "lessThan": "b3dc4b9d3ca68b370c4aeab5355007eedf948849",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "09854ba94c6aad7886996bfbee2530b3d8a7f4f4",
                            "lessThan": "d187eeb02d18446e5e54ed6bcbf8b47e6551daea",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "09854ba94c6aad7886996bfbee2530b3d8a7f4f4",
                            "lessThan": "80d47f5de5e311cbc0d01ebb6ee684e8f4c196c6",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/mprotect.c"
                    ],
                    "versions": [
                        {
                            "version": "5.9",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.9",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.102",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.25",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.16.11",
                            "lessThanOrEqual": "5.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.17",
                            "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.9",
                                    "versionEndExcluding": "5.10.102"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.9",
                                    "versionEndExcluding": "5.15.25"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.9",
                                    "versionEndExcluding": "5.16.11"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.9",
                                    "versionEndExcluding": "5.17"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/254090925e16abd914c87b4ad1b489440d89c4c3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b3dc4b9d3ca68b370c4aeab5355007eedf948849"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d187eeb02d18446e5e54ed6bcbf8b47e6551daea"
                },
                {
                    "url": "https://git.kernel.org/stable/c/80d47f5de5e311cbc0d01ebb6ee684e8f4c196c6"
                }
            ],
            "title": "mm: don't try to NUMA-migrate COW pages that have other uses",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-03T15:25:01.608Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/254090925e16abd914c87b4ad1b489440d89c4c3",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/b3dc4b9d3ca68b370c4aeab5355007eedf948849",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/d187eeb02d18446e5e54ed6bcbf8b47e6551daea",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/80d47f5de5e311cbc0d01ebb6ee684e8f4c196c6",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            },
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2022-48797",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-09-10T16:59:16.178583Z"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-09-11T17:34:14.839Z"
                }
            }
        ]
    }
}