Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B8911D554 for ; Tue, 21 Jan 2025 12:19:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737461960; cv=none; b=bkx4Xl4fueBbgAwJjcicszz1zy+P9RoLMvmYie1BymDJ9cKETwcx1WtLNtKOwKpHf77GpN8DtaS+AvyXpNjx+cd7SDGcxuOvOv4KvMrsDiwEykbQqHSj5Z01h/8nHSVJT0FXs1U7Str0dqgRdsJLAVZTkKhvMq5Io3ySCHRLDCs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737461960; c=relaxed/simple; bh=apTZfnCNHkPFHLUtC1YDxrbEom3lsXRgjkQ6likkPQI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uIKi07YmiQZPq4Zj1/ECsg7fHRjisX+1izXAAbIIGL2vUfUn4/D88C2Q1UPUDSMOpEqDYfIdXCwUlsYojTPCnjY4Ymw3nsIZUKuGLN1iRK+MXkwK3ppEq7H8AXTWjd6Mzvuk3ZvuyPUEVa3wuAKJQf68oh/FmTJMicT+8Mz2o4M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=B+Ta9s/T; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="B+Ta9s/T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE8D2C4CEDF; Tue, 21 Jan 2025 12:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737461960; bh=apTZfnCNHkPFHLUtC1YDxrbEom3lsXRgjkQ6likkPQI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=B+Ta9s/TSVTGr5XgDdufOjVqU9JaxKQv94NPw7YaxEGNlFsb1PjTnCsw6EqKGDo8R BJyoanKsmW4G9lh0+0e43gtfzzn60kVEEcYsaaKBqvFFpS3I0aqYoCJKKUYelNMLfh u3FPDmcwo0kJ22wrQc3+bmj51xgqEM5aORdx14mo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21656: hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur Date: Tue, 21 Jan 2025 13:18:35 +0100 Message-ID: <2025012131-CVE-2025-21656-b967@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2583; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=apTZfnCNHkPFHLUtC1YDxrbEom3lsXRgjkQ6likkPQI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn9E6avF1vjcejfm4rr5+vf8wZ+2eUa/VUuRMzvyw+hl EDlIMf/HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARQUeGBdcefV/yVMr06tPH //K3bfsSu7fr5W+G+QmHPidsNvHqD73YcHhDWO3VTVlubgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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] The Linux kernel CVE team has assigned CVE-2025-21656 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit 5b46903d8bf372e563bf2150d46b87fff197a109 and fixed in 6.6.72 with commit 53e25b10a28edaf8c2a1d3916fd8929501a50dfc Issue introduced in 5.6 with commit 5b46903d8bf372e563bf2150d46b87fff197a109 and fixed in 6.12.10 with commit 42268d885e44af875a6474f7bba519cc6cea6a9d Issue introduced in 5.6 with commit 5b46903d8bf372e563bf2150d46b87fff197a109 and fixed in 6.13 with commit 82163d63ae7a4c36142cd252388737205bb7e4b9 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-21656 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/hwmon/drivetemp.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/53e25b10a28edaf8c2a1d3916fd8929501a50dfc https://git.kernel.org/stable/c/42268d885e44af875a6474f7bba519cc6cea6a9d https://git.kernel.org/stable/c/82163d63ae7a4c36142cd252388737205bb7e4b9