CVE-2022-49312 (GCVE-0-2022-49312)

Vulnerability from cvelistv5 – Published: 2025-02-26 02:10 – Updated: 2025-12-23 13:23
VLAI?
Title
staging: rtl8712: fix a potential memory leak in r871xu_drv_init()
Summary
In the Linux kernel, the following vulnerability has been resolved: staging: rtl8712: fix a potential memory leak in r871xu_drv_init() In r871xu_drv_init(), if r8712_init_drv_sw() fails, then the memory allocated by r8712_alloc_io_queue() in r8712_usb_dvobj_init() is not properly released as there is no action will be performed by r8712_usb_dvobj_deinit(). To properly release it, we should call r8712_free_io_queue() in r8712_usb_dvobj_deinit(). Besides, in r871xu_dev_remove(), r8712_usb_dvobj_deinit() will be called by r871x_dev_unload() under condition `padapter->bup` and r8712_free_io_queue() is called by r8712_free_drv_sw(). However, r8712_usb_dvobj_deinit() does not rely on `padapter->bup` and calling r8712_free_io_queue() in r8712_free_drv_sw() is negative for better understading the code. So I move r8712_usb_dvobj_deinit() into r871xu_dev_remove(), and remove r8712_free_io_queue() from r8712_free_drv_sw().
CWE
  • CWE-401 - Missing Release of Memory after Effective Lifetime
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef , < 5a89a92efc342dd7c44b6056da87debc598f9c73 (git)
Affected: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef , < 8eb42d6d10f8fe509117859defddf9e72b4fa4d0 (git)
Affected: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef , < 205e039fead72e87ad2838f5e649a4c4834f648b (git)
Affected: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef , < a2882b8baad068d21c99fb2ab5a85a2bdbd5b834 (git)
Affected: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef , < 7288ff561de650d4139fab80e9cb0da9b5b32434 (git)
Create a notification for this product.
    Linux Linux Affected: 2.6.37
Unaffected: 0 , < 2.6.37 (semver)
Unaffected: 5.10.122 , ≤ 5.10.* (semver)
Unaffected: 5.15.47 , ≤ 5.15.* (semver)
Unaffected: 5.17.15 , ≤ 5.17.* (semver)
Unaffected: 5.18.4 , ≤ 5.18.* (semver)
Unaffected: 5.19 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "HIGH",
              "baseScore": 5.5,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "NONE",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2022-49312",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-10-01T19:44:14.240096Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-401",
                "description": "CWE-401 Missing Release of Memory after Effective Lifetime",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-10-01T19:46:57.896Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/staging/rtl8712/os_intfs.c",
            "drivers/staging/rtl8712/usb_intf.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "5a89a92efc342dd7c44b6056da87debc598f9c73",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "8eb42d6d10f8fe509117859defddf9e72b4fa4d0",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "205e039fead72e87ad2838f5e649a4c4834f648b",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "a2882b8baad068d21c99fb2ab5a85a2bdbd5b834",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            },
            {
              "lessThan": "7288ff561de650d4139fab80e9cb0da9b5b32434",
              "status": "affected",
              "version": "2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/staging/rtl8712/os_intfs.c",
            "drivers/staging/rtl8712/usb_intf.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": "5.10.*",
              "status": "unaffected",
              "version": "5.10.122",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.47",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.17.*",
              "status": "unaffected",
              "version": "5.17.15",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.18.*",
              "status": "unaffected",
              "version": "5.18.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.19",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.122",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.47",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.17.15",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18.4",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19",
                  "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 a potential memory leak in r871xu_drv_init()\n\nIn r871xu_drv_init(), if r8712_init_drv_sw() fails, then the memory\nallocated by r8712_alloc_io_queue() in r8712_usb_dvobj_init() is not\nproperly released as there is no action will be performed by\nr8712_usb_dvobj_deinit().\nTo properly release it, we should call r8712_free_io_queue() in\nr8712_usb_dvobj_deinit().\n\nBesides, in r871xu_dev_remove(), r8712_usb_dvobj_deinit() will be called\nby r871x_dev_unload() under condition `padapter-\u003ebup` and\nr8712_free_io_queue() is called by r8712_free_drv_sw().\nHowever, r8712_usb_dvobj_deinit() does not rely on `padapter-\u003ebup` and\ncalling r8712_free_io_queue() in r8712_free_drv_sw() is negative for\nbetter understading the code.\nSo I move r8712_usb_dvobj_deinit() into r871xu_dev_remove(), and remove\nr8712_free_io_queue() from r8712_free_drv_sw()."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-12-23T13:23:26.638Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/5a89a92efc342dd7c44b6056da87debc598f9c73"
        },
        {
          "url": "https://git.kernel.org/stable/c/8eb42d6d10f8fe509117859defddf9e72b4fa4d0"
        },
        {
          "url": "https://git.kernel.org/stable/c/205e039fead72e87ad2838f5e649a4c4834f648b"
        },
        {
          "url": "https://git.kernel.org/stable/c/a2882b8baad068d21c99fb2ab5a85a2bdbd5b834"
        },
        {
          "url": "https://git.kernel.org/stable/c/7288ff561de650d4139fab80e9cb0da9b5b32434"
        }
      ],
      "title": "staging: rtl8712: fix a potential memory leak in r871xu_drv_init()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49312",
    "datePublished": "2025-02-26T02:10:41.627Z",
    "dateReserved": "2025-02-26T02:08:31.536Z",
    "dateUpdated": "2025-12-23T13:23:26.638Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"cna\": {\"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-05-04T08:34:57.641Z\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nstaging: rtl8712: fix a potential memory leak in r871xu_drv_init()\\n\\nIn r871xu_drv_init(), if r8712_init_drv_sw() fails, then the memory\\nallocated by r8712_alloc_io_queue() in r8712_usb_dvobj_init() is not\\nproperly released as there is no action will be performed by\\nr8712_usb_dvobj_deinit().\\nTo properly release it, we should call r8712_free_io_queue() in\\nr8712_usb_dvobj_deinit().\\n\\nBesides, in r871xu_dev_remove(), r8712_usb_dvobj_deinit() will be called\\nby r871x_dev_unload() under condition `padapter-\u003ebup` and\\nr8712_free_io_queue() is called by r8712_free_drv_sw().\\nHowever, r8712_usb_dvobj_deinit() does not rely on `padapter-\u003ebup` and\\ncalling r8712_free_io_queue() in r8712_free_drv_sw() is negative for\\nbetter understading the code.\\nSo I move r8712_usb_dvobj_deinit() into r871xu_dev_remove(), and remove\\nr8712_free_io_queue() from r8712_free_drv_sw().\"}], \"affected\": [{\"product\": \"Linux\", \"vendor\": \"Linux\", \"defaultStatus\": \"unaffected\", \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"programFiles\": [\"drivers/staging/rtl8712/os_intfs.c\", \"drivers/staging/rtl8712/usb_intf.c\"], \"versions\": [{\"version\": \"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2\", \"lessThan\": \"5a89a92efc342dd7c44b6056da87debc598f9c73\", \"status\": \"affected\", \"versionType\": \"git\"}, {\"version\": \"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2\", \"lessThan\": \"8eb42d6d10f8fe509117859defddf9e72b4fa4d0\", \"status\": \"affected\", \"versionType\": \"git\"}, {\"version\": \"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2\", \"lessThan\": \"205e039fead72e87ad2838f5e649a4c4834f648b\", \"status\": \"affected\", \"versionType\": \"git\"}, {\"version\": \"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2\", \"lessThan\": \"a2882b8baad068d21c99fb2ab5a85a2bdbd5b834\", \"status\": \"affected\", \"versionType\": \"git\"}, {\"version\": \"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2\", \"lessThan\": \"7288ff561de650d4139fab80e9cb0da9b5b32434\", \"status\": \"affected\", \"versionType\": \"git\"}]}, {\"product\": \"Linux\", \"vendor\": \"Linux\", \"defaultStatus\": \"affected\", \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"programFiles\": [\"drivers/staging/rtl8712/os_intfs.c\", \"drivers/staging/rtl8712/usb_intf.c\"], \"versions\": [{\"version\": \"5.10.122\", \"lessThanOrEqual\": \"5.10.*\", \"status\": \"unaffected\", \"versionType\": \"semver\"}, {\"version\": \"5.15.47\", \"lessThanOrEqual\": \"5.15.*\", \"status\": \"unaffected\", \"versionType\": \"semver\"}, {\"version\": \"5.17.15\", \"lessThanOrEqual\": \"5.17.*\", \"status\": \"unaffected\", \"versionType\": \"semver\"}, {\"version\": \"5.18.4\", \"lessThanOrEqual\": \"5.18.*\", \"status\": \"unaffected\", \"versionType\": \"semver\"}, {\"version\": \"5.19\", \"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:*:*:*:*:*:*:*:*\", \"versionEndExcluding\": \"5.10.122\"}, {\"vulnerable\": true, \"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"versionEndExcluding\": \"5.15.47\"}, {\"vulnerable\": true, \"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"versionEndExcluding\": \"5.17.15\"}, {\"vulnerable\": true, \"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"versionEndExcluding\": \"5.18.4\"}, {\"vulnerable\": true, \"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"versionEndExcluding\": \"5.19\"}]}]}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/5a89a92efc342dd7c44b6056da87debc598f9c73\"}, {\"url\": \"https://git.kernel.org/stable/c/8eb42d6d10f8fe509117859defddf9e72b4fa4d0\"}, {\"url\": \"https://git.kernel.org/stable/c/205e039fead72e87ad2838f5e649a4c4834f648b\"}, {\"url\": \"https://git.kernel.org/stable/c/a2882b8baad068d21c99fb2ab5a85a2bdbd5b834\"}, {\"url\": \"https://git.kernel.org/stable/c/7288ff561de650d4139fab80e9cb0da9b5b32434\"}], \"title\": \"staging: rtl8712: fix a potential memory leak in r871xu_drv_init()\", \"x_generator\": {\"engine\": \"bippy-1.2.0\"}}, \"adp\": [{\"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 5.5, \"attackVector\": \"LOCAL\", \"baseSeverity\": \"MEDIUM\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\", \"integrityImpact\": \"NONE\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"NONE\"}}, {\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2022-49312\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2025-10-01T19:44:14.240096Z\"}}}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-401\", \"description\": \"CWE-401 Missing Release of Memory after Effective Lifetime\"}]}], \"providerMetadata\": {\"shortName\": \"CISA-ADP\", \"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"dateUpdated\": \"2025-10-01T16:14:15.914Z\"}, \"title\": \"CISA ADP Vulnrichment\"}]}",
      "cveMetadata": "{\"cveId\": \"CVE-2022-49312\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"state\": \"PUBLISHED\", \"assignerShortName\": \"Linux\", \"dateReserved\": \"2025-02-26T02:08:31.536Z\", \"datePublished\": \"2025-02-26T02:10:41.627Z\", \"dateUpdated\": \"2025-05-04T08:34:57.641Z\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


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 observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…