Skip to content
Heist/ feed
Back to feed
High

scsi: target: Fix WRITE_SAME No Data Buffer crash

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: scsi: target: Fix WRITE_SAME No Data Buffer crash In newer version of the SBC specs, we have a NDOB bit that indicates there is no data buffer that gets written out. If this bit is set using commands like "sg_write_same --ndob" we will crash in target_core_iblock/file's execute_write_same handlers when we go to access the se_cmd->t_data_sg because its NULL. This patch adds a check for the NDOB bit in the common WRITE SAME code because we don't support it. And, it adds a check for zero SG elements in each handler in case the initiator tries to send a normal WRITE SAME with no data buffer.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-21546
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 16:26 UTC · Revision 1

Source evidence

scsi: target: Fix WRITE_SAME No Data Buffer crash

core-osv · Original source

Published 2 May 2025, 21:52 UTC

In the Linux kernel, the following vulnerability has been resolved: scsi: target: Fix WRITE_SAME No Data Buffer crash In newer version of the SBC specs, we have a NDOB bit that indicates there is no data buffer that gets written out. If this bit is set using commands like "sg_write_same --ndob" we will crash in target_core_iblock/file's execute_write_same handlers when we go to access the se_cmd->t_data_sg because its NULL. This patch adds a check for the NDOB bit in the common WRITE SAME code because we don't support it. And, it adds a check for zero SG elements in each handler in case the initiator tries to send a normal WRITE SAME with no data buffer.

osv:CVE-2022-21546
Complete source record
{
  "id": "1c24259218e21cb79fc8fdbb8b4027f9c2e51e1b802afdb3f84b323bdab8986b",
  "url": "https://osv.dev/vulnerability/CVE-2022-21546",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "scsi: target: Fix WRITE_SAME No Data Buffer crash",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: scsi: target: Fix WRITE_SAME No Data Buffer crash In newer version of the SBC specs, we have a NDOB bit that indicates there is no data buffer that gets written out. If this bit is set using commands like \"sg_write_same --ndob\" we will crash in target_core_iblock/file's execute_write_same handlers when we go to access the se_cmd->t_data_sg because its NULL. This patch adds a check for the NDOB bit in the common WRITE SAME code because we don't support it. And, it adds a check for zero SG elements in each handler in case the initiator tries to send a normal WRITE SAME with no data buffer.",
    "evidence": "osv:CVE-2022-21546",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-21546",
      "aliases": [
        "CVE-2022-21546"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "f6970ad31d42fceb38b5595cbad093a4d0bfcc43"
                },
                {
                  "fixed": "54e57be2573cf0b8bf650375fd8752987b6c3d3b"
                },
                {
                  "fixed": "d8e6a27e9238dd294d6f2f401655f300dca20899"
                },
                {
                  "fixed": "4226622647e3e5ac06d3ebc1605b917446157510"
                },
                {
                  "fixed": "ccd3f449052449a917a3e577d8ba0368f43b8f29"
                },
                {
                  "introduced": "0"
                },
                {
                  "fixed": "44613a259decccddd2bd4520f73cc4d5107546c6"
                },
                {
                  "fixed": "01e7e36b8606e5d4fddf795938010f7bfa3aa277"
                },
                {
                  "fixed": "3b8db0e4f2631c030ab86f78d199ec0b198578f3"
                },
                {
                  "introduced": "19f949f52599ba7c3f67a5897ac6be14bfcb1200"
                },
                {
                  "last_affected": "19f949f52599ba7c3f67a5897ac6be14bfcb1200"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "f6970ad31d42fceb38b5595cbad093a4d0bfcc43"
                      },
                      {
                        "fixed": "54e57be2573cf0b8bf650375fd8752987b6c3d3b"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "f6970ad31d42fceb38b5595cbad093a4d0bfcc43"
                      },
                      {
                        "fixed": "d8e6a27e9238dd294d6f2f401655f300dca20899"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "f6970ad31d42fceb38b5595cbad093a4d0bfcc43"
                      },
                      {
                        "fixed": "4226622647e3e5ac06d3ebc1605b917446157510"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "f6970ad31d42fceb38b5595cbad093a4d0bfcc43"
                      },
                      {
                        "fixed": "ccd3f449052449a917a3e577d8ba0368f43b8f29"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "3.8.0"
                      },
                      {
                        "fixed": "5.4.294"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "InverseAffectedRanges"
                  },
                  {
                    "range": [
                      {
                        "introduced": "5.5.0"
                      },
                      {
                        "fixed": "5.10.238"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "InverseAffectedRanges"
                  },
                  {
                    "range": [
                      {
                        "introduced": "5.11.0"
                      },
                      {
                        "fixed": "5.15.182"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "InverseAffectedRanges"
                  },
                  {
                    "range": [
                      {
                        "introduced": "3.8"
                      },
                      {
                        "last_affected": "3.8"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.8",
            "v3.8"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-21546.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:20.825810852Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/4226622647e3e5ac06d3ebc1605b917446157510",
        "https://git.kernel.org/stable/c/54e57be2573cf0b8bf650375fd8752987b6c3d3b",
        "https://git.kernel.org/stable/c/ccd3f449052449a917a3e577d8ba0368f43b8f29",
        "https://git.kernel.org/stable/c/d8e6a27e9238dd294d6f2f401655f300dca20899",
        "https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21546.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-21546",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "oracle",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21546.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-21546",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487113,
  "published_at": "2025-05-02T21:52:09.864+00:00"
}