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 12F3026ED3D for ; Wed, 22 Oct 2025 13:24:21 +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=1761139462; cv=none; b=aC8GP8zZKin2lCT/ALvsEPQAwb3fSXmmkotSA2ZSuugzavPuVeSXWrjtSvbvlaCZc04/fSDGtuAil2UgH6bxaeG3bwhkXX8oWrXyCY4sK6JvkgfdcFXRw0VZ3mV0EBeEcjyBBLR2ze84kcAj3WzZuonU7YXpC3sY61B8CU3AGew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761139462; c=relaxed/simple; bh=gK7vglYk39nvtpKhwZCd/Lbl8azS0jg85dpyYbcXmDk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SIP9zczDLquEuKVzDuc6F/LuCNxfe6vaUxA6/33KA93moKkfJbwuE/uIjLtiy8maUxEn662VCFygcvDibFZxJnk5puFrfrI2GaZXKVRRnneYiYJot2n9/kxKLbsz4kE4vx0H16RhHUvDXsDQ/9fiqq9O2ghSf6DYYlnT2WQubj4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wdM/BgVp; 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="wdM/BgVp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E95AFC4CEE7; Wed, 22 Oct 2025 13:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761139461; bh=gK7vglYk39nvtpKhwZCd/Lbl8azS0jg85dpyYbcXmDk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wdM/BgVpzzEb2l6X6YbXfQf9Ra0UYZ29QTKz9xErX4TFGW+nqiVoVRkYb0STmfgPm i12SNVTyUqD6u3zsyW8xnwSi96wjIXrOJEsx07G8u4bT8DTzwzLUBaOlsExyudCke5 KOOSlc3yw/7CZoZgqFr9IsvF02q0Rty++109zK6k= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50557: pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions() Date: Wed, 22 Oct 2025 15:24:05 +0200 Message-ID: <2025102206-CVE-2022-50557-7adc@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=2432; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fE6ei31j+w6XlM7blisXt0LaRUIQXRG7065MsdwfLYE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk/bn27Ju3Lz5m4uTDUOtf9Zz3H5EmzRQtPSoYpV39fw bpuw5mKjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIyUaGefYvsq9IhLwryFmz bu06BtH2+aXZPAyzWddO0bbY2Z79g0PrxStVK9m/bnN2AgA= 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: thunderbay: fix possible memory leak in thunderbay_build_functions() The thunderbay_add_functions() will free memory of thunderbay_funcs when everything is ok, but thunderbay_funcs will not be freed when thunderbay_add_functions() fails, then there will be a memory leak, so we need to add kfree() when thunderbay_add_functions() fails to fix it. In addition, doing some cleaner works, moving kfree(funcs) from thunderbay_add_functions() to thunderbay_build_functions(). The Linux kernel CVE team has assigned CVE-2022-50557 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 12422af8194df85243d68b11f8783de9d01e58dc and fixed in 6.0.16 with commit 3650943bab29d03ef147290451237713ed1942cd Issue introduced in 5.17 with commit 12422af8194df85243d68b11f8783de9d01e58dc and fixed in 6.1.2 with commit aae4846e8e49044cb51d0276bec2a3fc2d5cd8da Issue introduced in 5.17 with commit 12422af8194df85243d68b11f8783de9d01e58dc and fixed in 6.2 with commit 83e1bcaf8cef26edaaf2a6098ef760f563683483 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-50557 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/pinctrl-thunderbay.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/3650943bab29d03ef147290451237713ed1942cd https://git.kernel.org/stable/c/aae4846e8e49044cb51d0276bec2a3fc2d5cd8da https://git.kernel.org/stable/c/83e1bcaf8cef26edaaf2a6098ef760f563683483