CVE-2025-21656

hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur

No CVSS score yet EPSS 0.21%

Published 21 Jan 2025 Updated 30 Oct 2026 CNA: Linux

Check your servers for CVE-2025-21656

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-21656 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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]

Exploitation

EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.0% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 5b46903d8bf372e563bf2150d46b87fff197a109, before babdf2a11329d30dc5086eb7a938a360aa490282
affected from 5b46903d8bf372e563bf2150d46b87fff197a109, before 0435d35f9d511fa5ddba49c9f68f947e395c93f9
affected from 5b46903d8bf372e563bf2150d46b87fff197a109, before f9723fd2770ef5563ff1685f72bcc1c411219c29
affected from 5b46903d8bf372e563bf2150d46b87fff197a109, before 53e25b10a28edaf8c2a1d3916fd8929501a50dfc
affected from 5b46903d8bf372e563bf2150d46b87fff197a109, before 42268d885e44af875a6474f7bba519cc6cea6a9d
affected from 5b46903d8bf372e563bf2150d46b87fff197a109, before 82163d63ae7a4c36142cd252388737205bb7e4b9
Other versions: unaffected
Linux
affected 5.6
unaffected before 5.6
unaffected from 5.10.273 up to and including 5.10.*
unaffected from 5.15.224 up to and including 5.15.*
unaffected from 6.1.191 up to and including 6.1.*
unaffected from 6.6.72 up to and including 6.6.*
unaffected from 6.12.10 up to and including 6.12.*
unaffected 6.13 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-21656 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-21656

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-21656
trivy image --scanners vuln IMAGE | grep CVE-2025-21656

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-21656 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.