CVE-2022-50240 (GCVE-0-2022-50240)
Vulnerability from cvelistv5
Published
2025-09-15 14:01
Modified
2025-10-10 15:53
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: android: binder: stop saving a pointer to the VMA Do not record a pointer to a VMA outside of the mmap_lock for later use. This is unsafe and there are a number of failure paths *after* the recorded VMA pointer may be freed during setup. There is no callback to the driver to clear the saved pointer from generic mm code. Furthermore, the VMA pointer may become stale if any number of VMA operations end up freeing the VMA so saving it was fragile to being with. Instead, change the binder_alloc struct to record the start address of the VMA and use vma_lookup() to get the vma when needed. Add lockdep mmap_lock checks on updates to the vma pointer to ensure the lock is held and depend on that lock for synchronization of readers and writers - which was already the case anyways, so the smp_wmb()/smp_rmb() was not necessary. [akpm@linux-foundation.org: fix drivers/android/binder_alloc_selftest.c]
Impacted products
Vendor Product Version
Linux Linux Version: dd2283f2605e3b3e9c61bcae844b34f2afa4813f
Version: dd2283f2605e3b3e9c61bcae844b34f2afa4813f
Version: dd2283f2605e3b3e9c61bcae844b34f2afa4813f
Version: dd2283f2605e3b3e9c61bcae844b34f2afa4813f
Version: dd2283f2605e3b3e9c61bcae844b34f2afa4813f
Version: dd2283f2605e3b3e9c61bcae844b34f2afa4813f
Create a notification for this product.
   Linux Linux Version: 4.20
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/android/binder_alloc.c",
            "drivers/android/binder_alloc.h",
            "drivers/android/binder_alloc_selftest.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "27a594bc7a7c8238d239e3cdbcf2edfa3bbe9a1b",
              "status": "affected",
              "version": "dd2283f2605e3b3e9c61bcae844b34f2afa4813f",
              "versionType": "git"
            },
            {
              "lessThan": "015ac18be7de25d17d6e5f1643cb3b60bfbe859e",
              "status": "affected",
              "version": "dd2283f2605e3b3e9c61bcae844b34f2afa4813f",
              "versionType": "git"
            },
            {
              "lessThan": "622ef885a89ad04cfb76ee478fb44f051125d1f1",
              "status": "affected",
              "version": "dd2283f2605e3b3e9c61bcae844b34f2afa4813f",
              "versionType": "git"
            },
            {
              "lessThan": "925e6b6f82c9c80ab3c17acbde8d16f349da7d26",
              "status": "affected",
              "version": "dd2283f2605e3b3e9c61bcae844b34f2afa4813f",
              "versionType": "git"
            },
            {
              "lessThan": "1ec3f76a436d750fd5023caec5da0494fc2870d2",
              "status": "affected",
              "version": "dd2283f2605e3b3e9c61bcae844b34f2afa4813f",
              "versionType": "git"
            },
            {
              "lessThan": "a43cfc87caaf46710c8027a8c23b8a55f1078f19",
              "status": "affected",
              "version": "dd2283f2605e3b3e9c61bcae844b34f2afa4813f",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/android/binder_alloc.c",
            "drivers/android/binder_alloc.h",
            "drivers/android/binder_alloc_selftest.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.20"
            },
            {
              "lessThan": "4.20",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.224",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.154",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.61",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.18.*",
              "status": "unaffected",
              "version": "5.18.18",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.224",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.154",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.61",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18.18",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.2",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nandroid: binder: stop saving a pointer to the VMA\n\nDo not record a pointer to a VMA outside of the mmap_lock for later use. \nThis is unsafe and there are a number of failure paths *after* the\nrecorded VMA pointer may be freed during setup.  There is no callback to\nthe driver to clear the saved pointer from generic mm code.  Furthermore,\nthe VMA pointer may become stale if any number of VMA operations end up\nfreeing the VMA so saving it was fragile to being with.\n\nInstead, change the binder_alloc struct to record the start address of the\nVMA and use vma_lookup() to get the vma when needed.  Add lockdep\nmmap_lock checks on updates to the vma pointer to ensure the lock is held\nand depend on that lock for synchronization of readers and writers - which\nwas already the case anyways, so the smp_wmb()/smp_rmb() was not\nnecessary.\n\n[akpm@linux-foundation.org: fix drivers/android/binder_alloc_selftest.c]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-10-10T15:53:38.644Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/27a594bc7a7c8238d239e3cdbcf2edfa3bbe9a1b"
        },
        {
          "url": "https://git.kernel.org/stable/c/015ac18be7de25d17d6e5f1643cb3b60bfbe859e"
        },
        {
          "url": "https://git.kernel.org/stable/c/622ef885a89ad04cfb76ee478fb44f051125d1f1"
        },
        {
          "url": "https://git.kernel.org/stable/c/925e6b6f82c9c80ab3c17acbde8d16f349da7d26"
        },
        {
          "url": "https://git.kernel.org/stable/c/1ec3f76a436d750fd5023caec5da0494fc2870d2"
        },
        {
          "url": "https://git.kernel.org/stable/c/a43cfc87caaf46710c8027a8c23b8a55f1078f19"
        }
      ],
      "title": "android: binder: stop saving a pointer to the VMA",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50240",
    "datePublished": "2025-09-15T14:01:45.724Z",
    "dateReserved": "2025-09-15T13:58:00.971Z",
    "dateUpdated": "2025-10-10T15:53:38.644Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50240\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-09-15T14:15:34.250\",\"lastModified\":\"2025-10-10T16:15:49.373\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nandroid: binder: stop saving a pointer to the VMA\\n\\nDo not record a pointer to a VMA outside of the mmap_lock for later use. \\nThis is unsafe and there are a number of failure paths *after* the\\nrecorded VMA pointer may be freed during setup.  There is no callback to\\nthe driver to clear the saved pointer from generic mm code.  Furthermore,\\nthe VMA pointer may become stale if any number of VMA operations end up\\nfreeing the VMA so saving it was fragile to being with.\\n\\nInstead, change the binder_alloc struct to record the start address of the\\nVMA and use vma_lookup() to get the vma when needed.  Add lockdep\\nmmap_lock checks on updates to the vma pointer to ensure the lock is held\\nand depend on that lock for synchronization of readers and writers - which\\nwas already the case anyways, so the smp_wmb()/smp_rmb() was not\\nnecessary.\\n\\n[akpm@linux-foundation.org: fix drivers/android/binder_alloc_selftest.c]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/015ac18be7de25d17d6e5f1643cb3b60bfbe859e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/1ec3f76a436d750fd5023caec5da0494fc2870d2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/27a594bc7a7c8238d239e3cdbcf2edfa3bbe9a1b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/622ef885a89ad04cfb76ee478fb44f051125d1f1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/925e6b6f82c9c80ab3c17acbde8d16f349da7d26\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a43cfc87caaf46710c8027a8c23b8a55f1078f19\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…