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 4A9881B6CEC for ; Thu, 27 Feb 2025 02:19:13 +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=1740622754; cv=none; b=S/h87GOkS90Zrx7NQ5Dq6f3/su19c5wc+NlQQ2GHJ4+oHSTQB3syArtEH9Rl1rvWSLgPfoZJXRFPPHfUZbNTYrYZBekS4kSWQrlFjKERqrZLeSa5AYrXUjfc9pazFZGZyt/cZZg0EpIv9Lo/SnOUkgEeevLg/yn/Ve/btbhkATU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740622754; c=relaxed/simple; bh=8hv1KDuu6ev6UOu3OYlESRg8V79vCioS6y4zUMS+YpI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kFRDZ4OPAsWIGgUg9t/3g8mEi7dRV6JgQf25AjzSpe0GEO1kSA1HV5LE0u/Dlp6uvgPfMlBsWtv/vZ3Mw+Fi4E5JRC7xH4ay80EULALTgzhBCteHHiroDcUnp0d0nnpvky1Dreak8PS4pLhSfOCs/JJl5+0mlmg2sQOepOpeIZo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lhACJ0tI; 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="lhACJ0tI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8466C4CED6; Thu, 27 Feb 2025 02:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740622753; bh=8hv1KDuu6ev6UOu3OYlESRg8V79vCioS6y4zUMS+YpI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=lhACJ0tI58R0ptSkC7pTYN0e48A0SmLl9eKavm5alXDCD/aC3cFb1an4p/OO2yGzv S81dLXWRAD8+jQiBqeaDitdw/NiZYNqMiJmvszm/Zv4sDdLuYwSz99/lfVakWOHvCt bjBfR86fsCgbbnzk7r7rRDU2X4wpEtTyVmJdVoxw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21783: gpiolib: Fix crash on error in gpiochip_get_ngpios() Date: Wed, 26 Feb 2025 18:17:39 -0800 Message-ID: <2025022608-CVE-2025-21783-2714@gregkh> X-Mailer: git-send-email 2.48.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=2554; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8hv1KDuu6ev6UOu3OYlESRg8V79vCioS6y4zUMS+YpI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7T6tsKdCRVJx1vVQ2l1FuhzrDjqWH9z7e8JmjtOpdj 9el2d9WdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE5L8zzA/SWxG8vOGyyKWu /6LHRT99UK7NtmBYsHN1/6QJEZN7wnpD+Y5wRRxYvJnDBQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: gpiolib: Fix crash on error in gpiochip_get_ngpios() The gpiochip_get_ngpios() uses chip_*() macros to print messages. However these macros rely on gpiodev to be initialised and set, which is not the case when called via bgpio_init(). In such a case the printing messages will crash on NULL pointer dereference. Replace chip_*() macros by the respective dev_*() ones to avoid such crash. The Linux kernel CVE team has assigned CVE-2025-21783 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit 55b2395e4e92adc492c6b30ac109eb78250dcd9d and fixed in 6.6.79 with commit 4d9b2b62e1136d10f661ec4c0c268140b6f74f4f Issue introduced in 6.6 with commit 55b2395e4e92adc492c6b30ac109eb78250dcd9d and fixed in 6.12.16 with commit a7052afa9eae2239e25943baa8817a6a56e8aa68 Issue introduced in 6.6 with commit 55b2395e4e92adc492c6b30ac109eb78250dcd9d and fixed in 6.13.4 with commit 189fb76215e479c10731baabb50f1a352d2078f5 Issue introduced in 6.6 with commit 55b2395e4e92adc492c6b30ac109eb78250dcd9d and fixed in 6.14-rc3 with commit 7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44 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-21783 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/gpio/gpiolib.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/4d9b2b62e1136d10f661ec4c0c268140b6f74f4f https://git.kernel.org/stable/c/a7052afa9eae2239e25943baa8817a6a56e8aa68 https://git.kernel.org/stable/c/189fb76215e479c10731baabb50f1a352d2078f5 https://git.kernel.org/stable/c/7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44