CVE-2022-49956 (GCVE-0-2022-49956)
Vulnerability from cvelistv5
Published
2025-06-18 11:00
Modified
2026-08-05 08:56
Summary
In the Linux kernel, the following vulnerability has been resolved: staging: rtl8712: fix use after free bugs _Read/Write_MACREG callbacks are NULL so the read/write_macreg_hdl() functions don't do anything except free the "pcmd" pointer. It results in a use after free. Delete them.
Impacted products
Vendor Product Version
Linux Linux Version: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef
Version: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef
Version: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef
Version: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef
Version: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef
Version: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef
Version: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef
Version: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/staging/rtl8712/rtl8712_cmd.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "7dce6b0ee7d78667d6c831ced957a08769973063",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "376e15487fec837301d888068a3fcc82efb6171a",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "9fd6170c5e2d0ccd027abe26f6f5ffc528e1bb27",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "d0aac7146e96bf39e79c65087d21dfa02ef8db38",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "19e3f69d19801940abc2ac37c169882769ed9770",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "dc02aaf950015850e7589696521c7fca767cea77",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "b1727def850904e4b8ba384043775672841663a1",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "e230a4455ac3e9b112f0367d1b8e255e141afae0",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/staging/rtl8712/rtl8712_cmd.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.37"
            },
            {
              "lessThan": "2.6.37",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.9.*",
              "status": "unaffected",
              "version": "4.9.328",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.293",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.258",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.213",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.142",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.66",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.8",
              "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": "4.9.328",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.293",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.258",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.213",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.142",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.66",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.8",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nstaging: rtl8712: fix use after free bugs\n\n_Read/Write_MACREG callbacks are NULL so the read/write_macreg_hdl()\nfunctions don\u0027t do anything except free the \"pcmd\" pointer.  It\nresults in a use after free.  Delete them."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The UAF is in the rtl8712 host-to-firmware cmd filter (`cmd_hdl_filter` \u2192 `r8712_cmd_thread`), a local driver software path for queued `cmd_obj`s, not WiFi-frame RX (Adjacent) or USB probe/URB handling (Physical); adapter presence is an environmental precondition.\nAC:H - Triggering requires a `_Read_MACREG`/`_Write_MACREG` `cmd_obj` on the cmd queue, but no in-tree caller has ever enqueued those codes since the driver was added\u2014success depends on a condition the attacker cannot influence.\nPR:L - If those H2C commands were issued, they would come from wireless management paths gated by `CAP_NET_ADMIN`; per kernel CNA guidance that capability is reachable via user namespaces, so Privileges Required is Low rather than High.\nUI:N - Command dequeue and filter execution run entirely in the driver\u0027s cmd thread with no separate victim action such as mounting a filesystem or confirming a prompt.\nS:U - The resulting heap UAF/double-free stays inside the host kernel\u0027s security authority and does not cross a VM, IOMMU, or sandbox boundary.\nC:H - After `r8712_free_cmd_obj()` the freed `cmd_obj` is reused for `cmdcode`/`parmbuf`/`cmdsz` reads; per kernel UAF guidance that enables disclosure of reclaimed heap contents.\nI:H - The same path later double-frees `pcmd`, a classic heap UAF/double-free primitive that can be groomed into arbitrary write or control-flow hijack, so Integrity is High.\nA:H - Use-after-free and double-free of `cmd_obj` cause kernel oops/KASAN/BUG failures in the cmd thread, which is Availability High under kernel CVSS guidance."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:56:53.613Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/7dce6b0ee7d78667d6c831ced957a08769973063"
        },
        {
          "url": "https://git.kernel.org/stable/c/376e15487fec837301d888068a3fcc82efb6171a"
        },
        {
          "url": "https://git.kernel.org/stable/c/9fd6170c5e2d0ccd027abe26f6f5ffc528e1bb27"
        },
        {
          "url": "https://git.kernel.org/stable/c/d0aac7146e96bf39e79c65087d21dfa02ef8db38"
        },
        {
          "url": "https://git.kernel.org/stable/c/19e3f69d19801940abc2ac37c169882769ed9770"
        },
        {
          "url": "https://git.kernel.org/stable/c/dc02aaf950015850e7589696521c7fca767cea77"
        },
        {
          "url": "https://git.kernel.org/stable/c/b1727def850904e4b8ba384043775672841663a1"
        },
        {
          "url": "https://git.kernel.org/stable/c/e230a4455ac3e9b112f0367d1b8e255e141afae0"
        }
      ],
      "title": "staging: rtl8712: fix use after free bugs",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49956",
    "datePublished": "2025-06-18T11:00:18.341Z",
    "dateReserved": "2025-06-18T10:57:27.382Z",
    "dateUpdated": "2026-08-05T08:56:53.613Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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…

Loading…