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 52F7B3A1E79 for ; Tue, 16 Dec 2025 13:57:57 +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=1765893477; cv=none; b=Jkmhz3bXybG+f8UgUaV1/GCq8hoelzTJ7w+SNW5VIdA3uT5oY0M76aNT6S7WuDkiMdUgGFWwDNdbP/zO5dZRq45dtpP9tTcoujiiOORGWoK/pTmVSKZhyHuPHnOPrQfkjs2yr5XAjDdU67p3eN7ASnFyoXzv+LU9a4RgCPG9CH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765893477; c=relaxed/simple; bh=XArQ/RPGHsas7XJ+kw9gfo4EOal6sSNbsyWW0UGjD0w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tvoNgD2M2OUoTsEpX0pe5iOL8ZlWMB6jdAkbNar5nt/FoT7ohZw6LQHc0fEAWP5XU3+dlML+kXXf7qymt047M3Y4rNOoo9wG6ip1tyakWxrHynia/akBJHGylQnvnqqZKSsC/U8wEA3b7FjdMbvbB8xgYh6SrKduhOY82l8u/yk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Y9f+kj9s; 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="Y9f+kj9s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3409C4CEF1; Tue, 16 Dec 2025 13:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765893477; bh=XArQ/RPGHsas7XJ+kw9gfo4EOal6sSNbsyWW0UGjD0w=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Y9f+kj9sx+5B7vAKppH4zWkvy4NKJvIZNIgYFrR0s3YpHnG24z3grMXJj8AMuSTHA bVGRpYwUzvph1No1wa/WbtCXyhC1PcS98ZIlZRvEOu6THUV1A8dl4pIDr47BSNAMTy xLt46oI3eBKiJnFHWwFUrVAPfA/dzIyUEvwYLvkM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68222: pinctrl: s32cc: fix uninitialized memory in s32_pinctrl_desc Date: Tue, 16 Dec 2025 14:57:41 +0100 Message-ID: <2025121633-CVE-2025-68222-1d22@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=4577; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XtC348yiZkUOtOONmDl/g7Tq6RQe3oK8C7k9oKnRSnY=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOqb7MF7f8K6jcFnBmnVbPxTPy2fOyGe49XG17c/rUR 8I9r20rO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiQkcZ5qm1/DBbVcslbJJ2 2p31RmvJltlTDBjmmTwSFZt7zuPU85pLDI1fgmReGn3zAwA= 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: pinctrl: s32cc: fix uninitialized memory in s32_pinctrl_desc s32_pinctrl_desc is allocated with devm_kmalloc(), but not all of its fields are initialized. Notably, num_custom_params is used in pinconf_generic_parse_dt_config(), resulting in intermittent allocation errors, such as the following splat when probing i2c-imx: WARNING: CPU: 0 PID: 176 at mm/page_alloc.c:4795 __alloc_pages_noprof+0x290/0x300 [...] Hardware name: NXP S32G3 Reference Design Board 3 (S32G-VNP-RDB3) (DT) [...] Call trace: __alloc_pages_noprof+0x290/0x300 (P) ___kmalloc_large_node+0x84/0x168 __kmalloc_large_node_noprof+0x34/0x120 __kmalloc_noprof+0x2ac/0x378 pinconf_generic_parse_dt_config+0x68/0x1a0 s32_dt_node_to_map+0x104/0x248 dt_to_map_one_config+0x154/0x1d8 pinctrl_dt_to_map+0x12c/0x280 create_pinctrl+0x6c/0x270 pinctrl_get+0xc0/0x170 devm_pinctrl_get+0x50/0xa0 pinctrl_bind_pins+0x60/0x2a0 really_probe+0x60/0x3a0 [...] __platform_driver_register+0x2c/0x40 i2c_adap_imx_init+0x28/0xff8 [i2c_imx] [...] This results in later parse failures that can cause issues in dependent drivers: s32g-siul2-pinctrl 4009c240.pinctrl: /soc@0/pinctrl@4009c240/i2c0-pins/i2c0-grp0: could not parse node property s32g-siul2-pinctrl 4009c240.pinctrl: /soc@0/pinctrl@4009c240/i2c0-pins/i2c0-grp0: could not parse node property [...] pca953x 0-0022: failed writing register: -6 i2c i2c-0: IMX I2C adapter registered s32g-siul2-pinctrl 4009c240.pinctrl: /soc@0/pinctrl@4009c240/i2c2-pins/i2c2-grp0: could not parse node property s32g-siul2-pinctrl 4009c240.pinctrl: /soc@0/pinctrl@4009c240/i2c2-pins/i2c2-grp0: could not parse node property i2c i2c-1: IMX I2C adapter registered s32g-siul2-pinctrl 4009c240.pinctrl: /soc@0/pinctrl@4009c240/i2c4-pins/i2c4-grp0: could not parse node property s32g-siul2-pinctrl 4009c240.pinctrl: /soc@0/pinctrl@4009c240/i2c4-pins/i2c4-grp0: could not parse node property i2c i2c-2: IMX I2C adapter registered Fix this by initializing s32_pinctrl_desc with devm_kzalloc() instead of devm_kmalloc() in s32_pinctrl_probe(), which sets the previously uninitialized fields to zero. The Linux kernel CVE team has assigned CVE-2025-68222 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit fd84aaa8173d3ff86f8df2009921336a1ea53a8a and fixed in 6.6.118 with commit 3b90bd8aaeb21b513ecc4ed03299e80ece44a333 Issue introduced in 6.4 with commit fd84aaa8173d3ff86f8df2009921336a1ea53a8a and fixed in 6.12.60 with commit 583ac7f65791ceda38ea1a493a4859f7161dcb03 Issue introduced in 6.4 with commit fd84aaa8173d3ff86f8df2009921336a1ea53a8a and fixed in 6.17.10 with commit 7bbdd6c30e8fd92f7165b7730b038cfe42102004 Issue introduced in 6.4 with commit fd84aaa8173d3ff86f8df2009921336a1ea53a8a and fixed in 6.18 with commit 97ea34defbb57bfaf71ce487b1b0865ffd186e81 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-68222 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/pinctrl/nxp/pinctrl-s32cc.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/3b90bd8aaeb21b513ecc4ed03299e80ece44a333 https://git.kernel.org/stable/c/583ac7f65791ceda38ea1a493a4859f7161dcb03 https://git.kernel.org/stable/c/7bbdd6c30e8fd92f7165b7730b038cfe42102004 https://git.kernel.org/stable/c/97ea34defbb57bfaf71ce487b1b0865ffd186e81