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 5BFC62DCC13 for ; Tue, 28 Oct 2025 11:50:26 +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=1761652227; cv=none; b=ghIDUet9qVHa8YcRiTFloQUDY1ZMOSCl4RwA59ev7SQngUoHyDHHYzFvb2JPGNSqm6JVP+M9aG6R0IbQIBu/DU6UDHUKQgeX6VkW1dQ4gYYNAi9ELDiNa/u2+Bans8uc0utwfNAXhIlnGE6+mHgm351e/Xh2/YwOOhHYrME4r+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761652227; c=relaxed/simple; bh=cVw3Nz/huOCCQzdeNRm9AAVaUgpaIJVKbwFgFXClVvg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RR/YxP+Rb9mku2x4nb8TwaqvJeVxauo1PlWuNCUmWLWgPl0ZHOB1/CJSzqqpHQmSUD3WjydeHnX8VC0CdmDunSGVpuhD+63WNJiOB9NIutHSbbZIBuf9X7AXnONuDX4LLaqWehkJyZ2pOO3dfmYqagzvek9akvN1VqeBJ6C8vOg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YI77s/Ix; 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="YI77s/Ix" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 563C3C4CEE7; Tue, 28 Oct 2025 11:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761652226; bh=cVw3Nz/huOCCQzdeNRm9AAVaUgpaIJVKbwFgFXClVvg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=YI77s/IxLNhQqMSZ7FttfTV9wulcee/2zFj0ZquypaXPMi3lj9nmbZKHZUX9lHN3h VE6cbW3W+IyfHV8pD7YbiH10LeT1pOyb5/Fd8oucRXGChFe+OnBeNqDa8F54+BuSim /mp6es8Qkfe6LzJKBhfE3fEmw/pqfJPJ9KNnShfg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40030: pinctrl: check the return value of pinmux_ops::get_function_name() Date: Tue, 28 Oct 2025 12:48:07 +0100 Message-ID: <2025102810-CVE-2025-40030-b395@gregkh> X-Mailer: git-send-email 2.51.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=2679; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5ap4FQOLdcQ5WRjdgbPoCw9lUGQ99oI0HCr74qnzGkI=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkMa6tKHgV94nhkPeGvqTGjt9eBi/Pvt6Uabn8xgX8C1 5bACczaHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR+lKGBU0GeV4s0x0M/5bM fCLyaqPhg5DSMoYFV+62eKdJdyrLqV39yyP1ecVzjfbzAA== 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: check the return value of pinmux_ops::get_function_name() While the API contract in docs doesn't specify it explicitly, the generic implementation of the get_function_name() callback from struct pinmux_ops - pinmux_generic_get_function_name() - can fail and return NULL. This is already checked in pinmux_check_ops() so add a similar check in pinmux_func_name_to_selector() instead of passing the returned pointer right down to strcmp() where the NULL can get dereferenced. This is normal operation when adding new pinfunctions. The Linux kernel CVE team has assigned CVE-2025-40030 to this issue. Affected and fixed versions =========================== Fixed in 5.15.195 with commit d77ef2f621cd1d605372c4c6ce667c496f6990c3 Fixed in 6.1.156 with commit ba7f7c2b2b3261e7def67018c38c69b626e0e66e Fixed in 6.6.112 with commit 1a2ea887a5cd7d47bab599f733d89444df018b1a Fixed in 6.12.53 with commit 688c688e0bf55824f4a38f8c2180046f089a3e3b Fixed in 6.17.3 with commit b7e0535060a60cc99eafc19cc665d979714cd73a Fixed in 6.18-rc1 with commit 4002ee98c022d671ecc1e4a84029e9ae7d8a5603 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-40030 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/pinmux.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/d77ef2f621cd1d605372c4c6ce667c496f6990c3 https://git.kernel.org/stable/c/ba7f7c2b2b3261e7def67018c38c69b626e0e66e https://git.kernel.org/stable/c/1a2ea887a5cd7d47bab599f733d89444df018b1a https://git.kernel.org/stable/c/688c688e0bf55824f4a38f8c2180046f089a3e3b https://git.kernel.org/stable/c/b7e0535060a60cc99eafc19cc665d979714cd73a https://git.kernel.org/stable/c/4002ee98c022d671ecc1e4a84029e9ae7d8a5603