From mboxrd@z Thu Jan 1 00:00:00 1970 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 0B6392D73A7 for ; Thu, 4 Dec 2025 15:32:53 +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=1764862374; cv=none; b=HBt7GFp6CTx0f0MUkVJQ3ZEdUHMvgCne+Gn7Tg/3X4vmAq5sETl2pDOA6yfB1iEQXhtbKQ6ZHz7t60/3TIctXcq/DSJPYoa3VXiOMzcJAcrsyiMCGST7GzvoLoM7I6HvRB2emk+RzXyimMVRJQw5MqLGI0V0Z5YZOWSHGjb3ha0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764862374; c=relaxed/simple; bh=kRVG90yuOOvDbhYoFlFltRPLNoQoRn5NlB6riVsyYcg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jfkGl/fPb8D4wiy0ElM/SNdskLMomDdUYdlN0CfBSlqZ3H+D1fm8hI7xV23Hynv8SMr/55H1ms6czHOAgtcl6Uz4pGVj1RpxvRM0jQuijDbJ/H9VrRLeh1WcZ5c/ChajJF15Hlu67viG/ua0UxzWZBarbZ0MizFGQIWhKHrY/hU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Y6rjz8Kd; 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="Y6rjz8Kd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 131F0C4CEFB; Thu, 4 Dec 2025 15:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764862373; bh=kRVG90yuOOvDbhYoFlFltRPLNoQoRn5NlB6riVsyYcg=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Y6rjz8KdZKlOPlqOKHXtbqcVVHPLHJNteo8oVoeeBd6iVKUwyiueDwCI4V0S/2DEp 1nqK6FnoeJMCNNLz84zpPsdKFHmtwn1M89lDWJA36vHt0n6kfc0r8X1rDd5SnRL+R+ mdhcwbM+TS4Jq/RUWNtFz4soxvUv0qeskQoeaoNw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40224: hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc() Date: Thu, 4 Dec 2025 16:31:59 +0100 Message-ID: <2025120458-CVE-2025-40224-e7b1@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2073; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=MngA9PJS8H0nU513izRx8CPAeVobQkP7qM8MJDiliws=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmGK/O41nc1M19TDtka+Ey8Q3JnqED+3u07GnxzFTbkB B+57Hi4I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbim8AwP6/iwO9rkmv5fYVv XrU5c9GYperTJoZ5SpMrHrorbrbtEVj2rm5ap8+nzon9AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc() The driver allocates memory for sensor data using devm_kzalloc(), but did not check if the allocation succeeded. In case of memory allocation failure, dereferencing the NULL pointer would lead to a kernel crash. Add a NULL pointer check and return -ENOMEM to handle allocation failure properly. The Linux kernel CVE team has assigned CVE-2025-40224 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 08ebc9def79fc0c4dbb6ecc39263006e3f98b750 and fixed in 6.17.6 with commit 240b82b86a091c1aa49d951d4467425420a081a0 Issue introduced in 6.15 with commit 08ebc9def79fc0c4dbb6ecc39263006e3f98b750 and fixed in 6.18 with commit a09a5aa8bf258ddc99a22c30f17fe304b96b5350 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-40224 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/cgbc-hwmon.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/240b82b86a091c1aa49d951d4467425420a081a0 https://git.kernel.org/stable/c/a09a5aa8bf258ddc99a22c30f17fe304b96b5350