CVE-2022-50331 (GCVE-0-2022-50331)
Vulnerability from cvelistv5
Published
2025-09-15 14:49
Modified
2025-09-15 14:49
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: wwan_hwsim: fix possible memory leak in wwan_hwsim_dev_new() Inject fault while probing module, if device_register() fails, but the refcount of kobject is not decreased to 0, the name allocated in dev_set_name() is leaked. Fix this by calling put_device(), so that name can be freed in callback function kobject_cleanup(). unreferenced object 0xffff88810152ad20 (size 8): comm "modprobe", pid 252, jiffies 4294849206 (age 22.713s) hex dump (first 8 bytes): 68 77 73 69 6d 30 00 ff hwsim0.. backtrace: [<000000009c3504ed>] __kmalloc_node_track_caller+0x44/0x1b0 [<00000000c0228a5e>] kvasprintf+0xb5/0x140 [<00000000cff8c21f>] kvasprintf_const+0x55/0x180 [<0000000055a1e073>] kobject_set_name_vargs+0x56/0x150 [<000000000a80b139>] dev_set_name+0xab/0xe0
Impacted products
Vendor Product Version
Linux Linux Version: f36a111a74e71edbba27d4c0cf3d7bbccc172108
Version: f36a111a74e71edbba27d4c0cf3d7bbccc172108
Version: f36a111a74e71edbba27d4c0cf3d7bbccc172108
Create a notification for this product.
   Linux Linux Version: 5.14
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/wwan/wwan_hwsim.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "50c31fa952309536c6e4461ff815ddccc8dff9d5",
              "status": "affected",
              "version": "f36a111a74e71edbba27d4c0cf3d7bbccc172108",
              "versionType": "git"
            },
            {
              "lessThan": "d87973314aba6de80a49f4271dd9be4ddc08e729",
              "status": "affected",
              "version": "f36a111a74e71edbba27d4c0cf3d7bbccc172108",
              "versionType": "git"
            },
            {
              "lessThan": "258ad2fe5ede773625adfda88b173f4123e59f45",
              "status": "affected",
              "version": "f36a111a74e71edbba27d4c0cf3d7bbccc172108",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/wwan/wwan_hwsim.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.14"
            },
            {
              "lessThan": "5.14",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.76",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.76",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.6",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nwwan_hwsim: fix possible memory leak in wwan_hwsim_dev_new()\n\nInject fault while probing module, if device_register() fails,\nbut the refcount of kobject is not decreased to 0, the name\nallocated in dev_set_name() is leaked. Fix this by calling\nput_device(), so that name can be freed in callback function\nkobject_cleanup().\n\nunreferenced object 0xffff88810152ad20 (size 8):\n  comm \"modprobe\", pid 252, jiffies 4294849206 (age 22.713s)\n  hex dump (first 8 bytes):\n    68 77 73 69 6d 30 00 ff                          hwsim0..\n  backtrace:\n    [\u003c000000009c3504ed\u003e] __kmalloc_node_track_caller+0x44/0x1b0\n    [\u003c00000000c0228a5e\u003e] kvasprintf+0xb5/0x140\n    [\u003c00000000cff8c21f\u003e] kvasprintf_const+0x55/0x180\n    [\u003c0000000055a1e073\u003e] kobject_set_name_vargs+0x56/0x150\n    [\u003c000000000a80b139\u003e] dev_set_name+0xab/0xe0"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-09-15T14:49:41.415Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/50c31fa952309536c6e4461ff815ddccc8dff9d5"
        },
        {
          "url": "https://git.kernel.org/stable/c/d87973314aba6de80a49f4271dd9be4ddc08e729"
        },
        {
          "url": "https://git.kernel.org/stable/c/258ad2fe5ede773625adfda88b173f4123e59f45"
        }
      ],
      "title": "wwan_hwsim: fix possible memory leak in wwan_hwsim_dev_new()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50331",
    "datePublished": "2025-09-15T14:49:41.415Z",
    "dateReserved": "2025-09-15T14:18:36.816Z",
    "dateUpdated": "2025-09-15T14:49:41.415Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50331\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-09-15T15:15:45.310\",\"lastModified\":\"2025-09-15T15:22:27.090\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nwwan_hwsim: fix possible memory leak in wwan_hwsim_dev_new()\\n\\nInject fault while probing module, if device_register() fails,\\nbut the refcount of kobject is not decreased to 0, the name\\nallocated in dev_set_name() is leaked. Fix this by calling\\nput_device(), so that name can be freed in callback function\\nkobject_cleanup().\\n\\nunreferenced object 0xffff88810152ad20 (size 8):\\n  comm \\\"modprobe\\\", pid 252, jiffies 4294849206 (age 22.713s)\\n  hex dump (first 8 bytes):\\n    68 77 73 69 6d 30 00 ff                          hwsim0..\\n  backtrace:\\n    [\u003c000000009c3504ed\u003e] __kmalloc_node_track_caller+0x44/0x1b0\\n    [\u003c00000000c0228a5e\u003e] kvasprintf+0xb5/0x140\\n    [\u003c00000000cff8c21f\u003e] kvasprintf_const+0x55/0x180\\n    [\u003c0000000055a1e073\u003e] kobject_set_name_vargs+0x56/0x150\\n    [\u003c000000000a80b139\u003e] dev_set_name+0xab/0xe0\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/258ad2fe5ede773625adfda88b173f4123e59f45\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/50c31fa952309536c6e4461ff815ddccc8dff9d5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d87973314aba6de80a49f4271dd9be4ddc08e729\",\"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…