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 0EBFE1AAE04 for ; Thu, 20 Jun 2024 11:17:52 +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=1718882273; cv=none; b=se30iJI4mlytOW2SP2aH02ZZCWF9Q0p+wMPqf7BT/t7Rt0/0CdtZrQJYHq7uxXmYxZ04qTJ08M77DnakxKF+RjMBzy9D9TvyL0NODGYFStOpVIbbpl1UII8dvk7r1At5N4SnQdAKDyJYwWNOOYgavYX0F3FH5QCuV/ilhWGelp4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882273; c=relaxed/simple; bh=RgtJN3B1ZBU1+Ry3HHyYPsTF5wNxy0Su7uYAOEDOmWQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=FVkaSXB/bs6dW6Gzrhc+EK3uw4e/bIKkPQkQDr1mtMzMhpqnGNxT8RT2Ko0OPKXrquWY4N/a39HD/bOGtZFeyMAX42CZgKnmlDc2JcGC5xadYZEuPndogGZEpbKoyZUjhzUSmA4W2tVeJ9Hqyy89vcvs5iTHWkRUP2YMVHF3dOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nWKPTyCS; 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="nWKPTyCS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38959C2BD10; Thu, 20 Jun 2024 11:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718882272; bh=RgtJN3B1ZBU1+Ry3HHyYPsTF5wNxy0Su7uYAOEDOmWQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nWKPTyCSzYOoqnPjVc5yrboTnW6Frj7rM877+/Vo3lCMouJSCb0j6LuucA9oohvM0 ucNYw3/bBzPFXmGz8dgmWJI9/1SPT3ezoQVObP+qAfMCF5SLSnZCqcr6SYVwuGQhYF 0y6g5ez+RmYJucvuf6/McfB4ekTgx4Qyic9mguu8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48750: hwmon: (nct6775) Fix crash in clear_caseopen Date: Thu, 20 Jun 2024 13:16:30 +0200 Message-ID: <2024062005-CVE-2022-48750-20d1@gregkh> X-Mailer: git-send-email 2.45.2 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=3176; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=RgtJN3B1ZBU1+Ry3HHyYPsTF5wNxy0Su7uYAOEDOmWQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkl/KU3jvwTVCte19d8bo+77JIZqzNiihPuxR8K4pjkG ng7ePKijlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIbSbDPLW2X8vjTxzn1fse oTtV/P3vRZx+8xkWzHv5an/6iRm7T5adTLox/ZZF87QWAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: hwmon: (nct6775) Fix crash in clear_caseopen Paweł Marciniak reports the following crash, observed when clearing the chassis intrusion alarm. BUG: kernel NULL pointer dereference, address: 0000000000000028 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 3 PID: 4815 Comm: bash Tainted: G S 5.16.2-200.fc35.x86_64 #1 Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z97 Extreme4, BIOS P2.60A 05/03/2018 RIP: 0010:clear_caseopen+0x5a/0x120 [nct6775] Code: 68 70 e8 e9 32 b1 e3 85 c0 0f 85 d2 00 00 00 48 83 7c 24 ... RSP: 0018:ffffabcb02803dd8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000 RDX: ffff8e8808192880 RSI: 0000000000000000 RDI: ffff8e87c7509a68 RBP: 0000000000000000 R08: 0000000000000001 R09: 000000000000000a R10: 000000000000000a R11: f000000000000000 R12: 000000000000001f R13: ffff8e87c7509828 R14: ffff8e87c7509a68 R15: ffff8e88494527a0 FS: 00007f4db9151740(0000) GS:ffff8e8ebfec0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000028 CR3: 0000000166b66001 CR4: 00000000001706e0 Call Trace: kernfs_fop_write_iter+0x11c/0x1b0 new_sync_write+0x10b/0x180 vfs_write+0x209/0x2a0 ksys_write+0x4f/0xc0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae The problem is that the device passed to clear_caseopen() is the hwmon device, not the platform device, and the platform data is not set in the hwmon device. Store the pointer to sio_data in struct nct6775_data and get if from there if needed. The Linux kernel CVE team has assigned CVE-2022-48750 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 2e7b9886968b and fixed in 5.16.5 with commit cfb7d12f2e4a Issue introduced in 5.16 with commit 2e7b9886968b and fixed in 5.17 with commit 79da533d3cc7 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-2022-48750 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/nct6775.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/cfb7d12f2e4a4d694f49e9b4ebb352f7b67cdfbb https://git.kernel.org/stable/c/79da533d3cc717ccc05ddbd3190da8a72bc2408b