cve-2021-47412
Vulnerability from cvelistv5
Published
2024-05-21 15:04
Modified
2024-08-04 05:39
Severity
Summary
block: don't call rq_qos_ops->done_bio if the bio isn't tracked
Impacted products
VendorProduct
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-47412",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-06-11T17:28:47.066559Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-11T17:29:00.823Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:39:59.401Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/004b8f8a691205a93d9e80d98b786b2b97424d6e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/a647a524a46736786c95cdb553a070322ca096e3"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "block/bio.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "004b8f8a6912",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "a647a524a467",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "block/bio.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThanOrEqual": "5.14.*",
              "status": "unaffected",
              "version": "5.14.11",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nblock: don\u0027t call rq_qos_ops-\u003edone_bio if the bio isn\u0027t tracked\n\nrq_qos framework is only applied on request based driver, so:\n\n1) rq_qos_done_bio() needn\u0027t to be called for bio based driver\n\n2) rq_qos_done_bio() needn\u0027t to be called for bio which isn\u0027t tracked,\nsuch as bios ended from error handling code.\n\nEspecially in bio_endio():\n\n1) request queue is referred via bio-\u003ebi_bdev-\u003ebd_disk-\u003equeue, which\nmay be gone since request queue refcount may not be held in above two\ncases\n\n2) q-\u003erq_qos may be freed in blk_cleanup_queue() when calling into\n__rq_qos_done_bio()\n\nFix the potential kernel panic by not calling rq_qos_ops-\u003edone_bio if\nthe bio isn\u0027t tracked. This way is safe because both ioc_rqos_done_bio()\nand blkcg_iolatency_done_bio() are nop if the bio isn\u0027t tracked."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T05:07:29.576Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/004b8f8a691205a93d9e80d98b786b2b97424d6e"
        },
        {
          "url": "https://git.kernel.org/stable/c/a647a524a46736786c95cdb553a070322ca096e3"
        }
      ],
      "title": "block: don\u0027t call rq_qos_ops-\u003edone_bio if the bio isn\u0027t tracked",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-47412",
    "datePublished": "2024-05-21T15:04:03.309Z",
    "dateReserved": "2024-05-21T14:58:30.817Z",
    "dateUpdated": "2024-08-04T05:39:59.401Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2021-47412\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-21T15:15:26.700\",\"lastModified\":\"2024-05-21T16:53:56.550\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nblock: don\u0027t call rq_qos_ops-\u003edone_bio if the bio isn\u0027t tracked\\n\\nrq_qos framework is only applied on request based driver, so:\\n\\n1) rq_qos_done_bio() needn\u0027t to be called for bio based driver\\n\\n2) rq_qos_done_bio() needn\u0027t to be called for bio which isn\u0027t tracked,\\nsuch as bios ended from error handling code.\\n\\nEspecially in bio_endio():\\n\\n1) request queue is referred via bio-\u003ebi_bdev-\u003ebd_disk-\u003equeue, which\\nmay be gone since request queue refcount may not be held in above two\\ncases\\n\\n2) q-\u003erq_qos may be freed in blk_cleanup_queue() when calling into\\n__rq_qos_done_bio()\\n\\nFix the potential kernel panic by not calling rq_qos_ops-\u003edone_bio if\\nthe bio isn\u0027t tracked. This way is safe because both ioc_rqos_done_bio()\\nand blkcg_iolatency_done_bio() are nop if the bio isn\u0027t tracked.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bloque: no llame a rq_qos_ops-\u0026gt;done_bio si no se realiza un seguimiento de la biograf\u00eda. El framework rq_qos solo se aplica en el controlador basado en solicitudes, por lo que: 1) rq_qos_done_bio() no necesita hacerlo ser llamado para un controlador basado en biograf\u00eda 2) No es necesario llamar a rq_qos_done_bio() para una biograf\u00eda que no est\u00e1 rastreada, como una biograf\u00eda terminada por un c\u00f3digo de manejo de errores. Especialmente en bio_endio(): 1) la cola de solicitudes se remite a trav\u00e9s de bio-\u0026gt;bi_bdev-\u0026gt;bd_disk-\u0026gt;queue, que puede desaparecer ya que el recuento de la cola de solicitudes no se puede mantener en los dos casos anteriores 2) q-\u0026gt;rq_qos se puede liberar en blk_cleanup_queue() al llamar a __rq_qos_done_bio() Solucione el posible p\u00e1nico del kernel al no llamar a rq_qos_ops-\u0026gt;done_bio si no se realiza un seguimiento de la biograf\u00eda. Esta forma es segura porque tanto ioc_rqos_done_bio() como blkcg_iolatency_done_bio() no funcionan si no se realiza un seguimiento de la biograf\u00eda.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/004b8f8a691205a93d9e80d98b786b2b97424d6e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a647a524a46736786c95cdb553a070322ca096e3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...