CVE-2025-21656 (GCVE-0-2025-21656)
Vulnerability from cvelistv5
Published
2025-01-21 12:18
Modified
2025-05-04 07:18
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur scsi_execute_cmd() function can return both negative (linux codes) and positive (scsi_cmnd result field) error codes. Currently the driver just passes error codes of scsi_execute_cmd() to hwmon core, which is incorrect because hwmon only checks for negative error codes. This leads to hwmon reporting uninitialized data to userspace in case of SCSI errors (for example if the disk drive was disconnected). This patch checks scsi_execute_cmd() output and returns -EIO if it's error code is positive. [groeck: Avoid inline variable declaration for portability]
Impacted products
Vendor Product Version
Linux Linux Version: 5b46903d8bf372e563bf2150d46b87fff197a109
Version: 5b46903d8bf372e563bf2150d46b87fff197a109
Version: 5b46903d8bf372e563bf2150d46b87fff197a109
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/hwmon/drivetemp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "53e25b10a28edaf8c2a1d3916fd8929501a50dfc",
              "status": "affected",
              "version": "5b46903d8bf372e563bf2150d46b87fff197a109",
              "versionType": "git"
            },
            {
              "lessThan": "42268d885e44af875a6474f7bba519cc6cea6a9d",
              "status": "affected",
              "version": "5b46903d8bf372e563bf2150d46b87fff197a109",
              "versionType": "git"
            },
            {
              "lessThan": "82163d63ae7a4c36142cd252388737205bb7e4b9",
              "status": "affected",
              "version": "5b46903d8bf372e563bf2150d46b87fff197a109",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/hwmon/drivetemp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.6"
            },
            {
              "lessThan": "5.6",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.72",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.72",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.10",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nhwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur\n\nscsi_execute_cmd() function can return both negative (linux codes) and\npositive (scsi_cmnd result field) error codes.\n\nCurrently the driver just passes error codes of scsi_execute_cmd() to\nhwmon core, which is incorrect because hwmon only checks for negative\nerror codes. This leads to hwmon reporting uninitialized data to\nuserspace in case of SCSI errors (for example if the disk drive was\ndisconnected).\n\nThis patch checks scsi_execute_cmd() output and returns -EIO if it\u0027s\nerror code is positive.\n\n[groeck: Avoid inline variable declaration for portability]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T07:18:21.781Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/53e25b10a28edaf8c2a1d3916fd8929501a50dfc"
        },
        {
          "url": "https://git.kernel.org/stable/c/42268d885e44af875a6474f7bba519cc6cea6a9d"
        },
        {
          "url": "https://git.kernel.org/stable/c/82163d63ae7a4c36142cd252388737205bb7e4b9"
        }
      ],
      "title": "hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-21656",
    "datePublished": "2025-01-21T12:18:13.222Z",
    "dateReserved": "2024-12-29T08:45:45.729Z",
    "dateUpdated": "2025-05-04T07:18:21.781Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-21656\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-01-21T13:15:09.240\",\"lastModified\":\"2025-01-21T13:15:09.240\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nhwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur\\n\\nscsi_execute_cmd() function can return both negative (linux codes) and\\npositive (scsi_cmnd result field) error codes.\\n\\nCurrently the driver just passes error codes of scsi_execute_cmd() to\\nhwmon core, which is incorrect because hwmon only checks for negative\\nerror codes. This leads to hwmon reporting uninitialized data to\\nuserspace in case of SCSI errors (for example if the disk drive was\\ndisconnected).\\n\\nThis patch checks scsi_execute_cmd() output and returns -EIO if it\u0027s\\nerror code is positive.\\n\\n[groeck: Avoid inline variable declaration for portability]\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: hwmon: (drivetemp) Se soluciona que el controlador produzca datos basura cuando se producen errores SCSI. La funci\u00f3n scsi_execute_cmd() puede devolver c\u00f3digos de error negativos (c\u00f3digos de Linux) y positivos (campo de resultado scsi_cmnd). Actualmente, el controlador solo pasa los c\u00f3digos de error de scsi_execute_cmd() al n\u00facleo de hwmon, lo que es incorrecto porque hwmon solo verifica los c\u00f3digos de error negativos. Esto hace que hwmon informe datos no inicializados al espacio de usuario en caso de errores SCSI (por ejemplo, si la unidad de disco se desconect\u00f3). Este parche verifica la salida de scsi_execute_cmd() y devuelve -EIO si su c\u00f3digo de error es positivo. [groeck: Evite la declaraci\u00f3n de variables en l\u00ednea para la portabilidad]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/42268d885e44af875a6474f7bba519cc6cea6a9d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/53e25b10a28edaf8c2a1d3916fd8929501a50dfc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/82163d63ae7a4c36142cd252388737205bb7e4b9\",\"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…

Loading…