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 492D57EEF8 for ; Tue, 21 May 2024 15:05:17 +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=1716303917; cv=none; b=KVxJXNjgoCnfNUGLbZZFMpFhqfn1N3Yttt12KL4HX549FCgxo3WMtflN0ubJDUxuH2EbOOauiOW/sTwS38O6KHkQvg/bcY04Etf5cprGBjsFUE2tV9z5R51BFVh0mVYDXpa782YMSbFhDpiPOzYEHsfKAB6vULr6kH2BnZHxbwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716303917; c=relaxed/simple; bh=yG24ftjladQWnSbu6tXk7STMs5BnKYAAeQokgtlTovc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=l5fHS8RoIEDslzf8EnGFzhaU4XeXAPqhFNM20C5EKuYFvU5ZU/bXa3CidzbNYpnGqAYbRaKVS8YRu9SKtcfaspoNajr2CxSg24fZXywrz6siEg1gXh9hUGdJaUU2Sh2ZQ5K5pi+Q5dqpNUWkzvb6MLl9cqH0bdMPBGO57EjRJ18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kaII7zmD; 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="kaII7zmD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6265C2BD11; Tue, 21 May 2024 15:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716303917; bh=yG24ftjladQWnSbu6tXk7STMs5BnKYAAeQokgtlTovc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kaII7zmDj+ZA9u0bI77BICdMmG8o0w9srIdzwfOcGaQMW4IJxEobuEzvaxhRYXyUv gcWNPYkwo8lPJawtMlh/TSCgK4Tk/nMGdKP/JvUIT+b+BWurSYG0WXv6iaU9TKAB6s DS05PammnERF3UeVVO3DZWVl+77ZryMj7+f3basY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47385: hwmon: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field Date: Tue, 21 May 2024 17:04:02 +0200 Message-ID: <2024052144-CVE-2021-47385-a7e7@gregkh> X-Mailer: git-send-email 2.45.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=2395; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yG24ftjladQWnSbu6tXk7STMs5BnKYAAeQokgtlTovc=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+2y84bal6W7ws/5XQ9xQDQZdi283mX8ujLZqNA/aJ3 yr4ajinI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYyu41hnsZ/n9D8d1UTKz7p qC3y7poy9e5ZDYa54oeuOx64lhx0efKujY9cfzgqJB9iBAA= 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: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field If driver read val value sufficient for (val & 0x08) && (!(val & 0x80)) && ((val & 0x7) == ((val >> 4) & 0x7)) from device then Null pointer dereference occurs. (It is possible if tmp = 0b0xyz1xyz, where same literals mean same numbers) Also lm75[] does not serve a purpose anymore after switching to devm_i2c_new_dummy_device() in w83791d_detect_subclients(). The patch fixes possible NULL pointer dereference by removing lm75[]. Found by Linux Driver Verification project (linuxtesting.org). [groeck: Dropped unnecessary continuation lines, fixed multipline alignment] The Linux kernel CVE team has assigned CVE-2021-47385 to this issue. Affected and fixed versions =========================== Fixed in 5.4.151 with commit 200ced5ba724 Fixed in 5.10.71 with commit 1499bb2c3a87 Fixed in 5.14.10 with commit 24af1fe376e2 Fixed in 5.15 with commit 0f36b88173f0 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-2021-47385 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/w83792d.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/200ced5ba724d8bbf29dfac4ed1e17a39ccaccd1 https://git.kernel.org/stable/c/1499bb2c3a87a2efea0065adab2bd66badee61c3 https://git.kernel.org/stable/c/24af1fe376e22c42238a4a604d31e46c486876c3 https://git.kernel.org/stable/c/0f36b88173f028e372668ae040ab1a496834d278