CVE-2022-50530 (GCVE-0-2022-50530)
Vulnerability from cvelistv5
Published
2025-10-07 15:19
Modified
2025-10-07 15:19
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: blk-mq: fix null pointer dereference in blk_mq_clear_rq_mapping() Our syzkaller report a null pointer dereference, root cause is following: __blk_mq_alloc_map_and_rqs set->tags[hctx_idx] = blk_mq_alloc_map_and_rqs blk_mq_alloc_map_and_rqs blk_mq_alloc_rqs // failed due to oom alloc_pages_node // set->tags[hctx_idx] is still NULL blk_mq_free_rqs drv_tags = set->tags[hctx_idx]; // null pointer dereference is triggered blk_mq_clear_rq_mapping(drv_tags, ...) This is because commit 63064be150e4 ("blk-mq: Add blk_mq_alloc_map_and_rqs()") merged the two steps: 1) set->tags[hctx_idx] = blk_mq_alloc_rq_map() 2) blk_mq_alloc_rqs(..., set->tags[hctx_idx]) into one step: set->tags[hctx_idx] = blk_mq_alloc_map_and_rqs() Since tags is not initialized yet in this case, fix the problem by checking if tags is NULL pointer in blk_mq_clear_rq_mapping().
Impacted products
Vendor Product Version
Linux Linux Version: 63064be150e4b1ba1e4af594ef5aa81adf21a52d
Version: 63064be150e4b1ba1e4af594ef5aa81adf21a52d
Create a notification for this product.
   Linux Linux Version: 5.16
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "block/blk-mq.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6a440e6d04431e774dc084abe88c106e2a474c1a",
              "status": "affected",
              "version": "63064be150e4b1ba1e4af594ef5aa81adf21a52d",
              "versionType": "git"
            },
            {
              "lessThan": "76dd298094f484c6250ebd076fa53287477b2328",
              "status": "affected",
              "version": "63064be150e4b1ba1e4af594ef5aa81adf21a52d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "block/blk-mq.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.16"
            },
            {
              "lessThan": "5.16",
              "status": "unaffected",
              "version": "0",
              "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": "6.0.6",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nblk-mq: fix null pointer dereference in blk_mq_clear_rq_mapping()\n\nOur syzkaller report a null pointer dereference, root cause is\nfollowing:\n\n__blk_mq_alloc_map_and_rqs\n set-\u003etags[hctx_idx] = blk_mq_alloc_map_and_rqs\n  blk_mq_alloc_map_and_rqs\n   blk_mq_alloc_rqs\n    // failed due to oom\n    alloc_pages_node\n    // set-\u003etags[hctx_idx] is still NULL\n    blk_mq_free_rqs\n     drv_tags = set-\u003etags[hctx_idx];\n     // null pointer dereference is triggered\n     blk_mq_clear_rq_mapping(drv_tags, ...)\n\nThis is because commit 63064be150e4 (\"blk-mq:\nAdd blk_mq_alloc_map_and_rqs()\") merged the two steps:\n\n1) set-\u003etags[hctx_idx] = blk_mq_alloc_rq_map()\n2) blk_mq_alloc_rqs(..., set-\u003etags[hctx_idx])\n\ninto one step:\n\nset-\u003etags[hctx_idx] = blk_mq_alloc_map_and_rqs()\n\nSince tags is not initialized yet in this case, fix the problem by\nchecking if tags is NULL pointer in blk_mq_clear_rq_mapping()."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-10-07T15:19:21.259Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/6a440e6d04431e774dc084abe88c106e2a474c1a"
        },
        {
          "url": "https://git.kernel.org/stable/c/76dd298094f484c6250ebd076fa53287477b2328"
        }
      ],
      "title": "blk-mq: fix null pointer dereference in blk_mq_clear_rq_mapping()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50530",
    "datePublished": "2025-10-07T15:19:21.259Z",
    "dateReserved": "2025-10-07T15:15:38.664Z",
    "dateUpdated": "2025-10-07T15:19:21.259Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50530\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-07T16:15:37.020\",\"lastModified\":\"2025-10-08T19:38:32.610\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nblk-mq: fix null pointer dereference in blk_mq_clear_rq_mapping()\\n\\nOur syzkaller report a null pointer dereference, root cause is\\nfollowing:\\n\\n__blk_mq_alloc_map_and_rqs\\n set-\u003etags[hctx_idx] = blk_mq_alloc_map_and_rqs\\n  blk_mq_alloc_map_and_rqs\\n   blk_mq_alloc_rqs\\n    // failed due to oom\\n    alloc_pages_node\\n    // set-\u003etags[hctx_idx] is still NULL\\n    blk_mq_free_rqs\\n     drv_tags = set-\u003etags[hctx_idx];\\n     // null pointer dereference is triggered\\n     blk_mq_clear_rq_mapping(drv_tags, ...)\\n\\nThis is because commit 63064be150e4 (\\\"blk-mq:\\nAdd blk_mq_alloc_map_and_rqs()\\\") merged the two steps:\\n\\n1) set-\u003etags[hctx_idx] = blk_mq_alloc_rq_map()\\n2) blk_mq_alloc_rqs(..., set-\u003etags[hctx_idx])\\n\\ninto one step:\\n\\nset-\u003etags[hctx_idx] = blk_mq_alloc_map_and_rqs()\\n\\nSince tags is not initialized yet in this case, fix the problem by\\nchecking if tags is NULL pointer in blk_mq_clear_rq_mapping().\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/6a440e6d04431e774dc084abe88c106e2a474c1a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/76dd298094f484c6250ebd076fa53287477b2328\",\"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…