Skip to content
Heist/ feed
Back to feed
HighFix available

android: binder: stop saving a pointer to the VMA

Type: advisorySources: OSV

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]

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.154, 5.15.61, 5.18.18, 5.19.2, 5.4.224
CVEs
CVE-2022-50240
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 15:18 UTC · Revision 1

Source evidence

android: binder: stop saving a pointer to the VMA

core-osv · Original source

Published 15 Sept 2025, 14:01 UTC

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]

osv:CVE-2022-50240

Kernel

Fixed versions: 5.4.224, 5.10.154, 5.15.61, 5.18.18, 5.19.2

Complete source record
{
  "id": "c9b40ae360ead5152e69bf28cd2e8936f0b581bdbaa104acb2d103e79529c8d1",
  "url": "https://osv.dev/vulnerability/CVE-2022-50240",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "android: binder: stop saving a pointer to the VMA",
    "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]",
    "evidence": "osv:CVE-2022-50240",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.224",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.154",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.61",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.18.18",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.19.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-50240",
      "aliases": [
        "CVE-2022-50240"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "dd2283f2605e3b3e9c61bcae844b34f2afa4813f"
                },
                {
                  "fixed": "27a594bc7a7c8238d239e3cdbcf2edfa3bbe9a1b"
                },
                {
                  "fixed": "015ac18be7de25d17d6e5f1643cb3b60bfbe859e"
                },
                {
                  "fixed": "622ef885a89ad04cfb76ee478fb44f051125d1f1"
                },
                {
                  "fixed": "925e6b6f82c9c80ab3c17acbde8d16f349da7d26"
                },
                {
                  "fixed": "1ec3f76a436d750fd5023caec5da0494fc2870d2"
                },
                {
                  "fixed": "a43cfc87caaf46710c8027a8c23b8a55f1078f19"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50240.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.224"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.154"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.61"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.18.18"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.19.0"
                },
                {
                  "fixed": "5.19.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50240.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:36.939871180Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/015ac18be7de25d17d6e5f1643cb3b60bfbe859e",
        "https://git.kernel.org/stable/c/1ec3f76a436d750fd5023caec5da0494fc2870d2",
        "https://git.kernel.org/stable/c/27a594bc7a7c8238d239e3cdbcf2edfa3bbe9a1b",
        "https://git.kernel.org/stable/c/622ef885a89ad04cfb76ee478fb44f051125d1f1",
        "https://git.kernel.org/stable/c/925e6b6f82c9c80ab3c17acbde8d16f349da7d26",
        "https://git.kernel.org/stable/c/a43cfc87caaf46710c8027a8c23b8a55f1078f19",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50240.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-50240",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50240.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-50240",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 504045,
  "published_at": "2025-09-15T14:01:45.724+00:00"
}