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 A051D334681 for ; Wed, 6 May 2026 11:31:23 +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=1778067083; cv=none; b=PG4fqY7Dk9dqounHcwmKV/QUi1YCRqbjBDUxgGai6122aFQYoS3bhJMy1Sdz3nu9xuIq+SJAsiI+QvLkv0hBo/ERwyw4nn3MpkmoFKu8jeKT03aap4R0Elg4+Pn8vpuPxbIvWJlHqUL7y5SFbz97rtntxnpYGjGuzbCktyjFq1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778067083; c=relaxed/simple; bh=UZKX0AqfqvGR8BnzgSVKXZ8o/SBqsGWo/dj+H/QMWJc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=G7d7mehB6fbH2GliO14EJAGxlyYTiXZaZmfACzc0j0lhbJRiqoNiP3u+rVnnIXYVeNXT1+w4QtogDKYYRK3HbJthYnsfWzZtdzmiUzVlDfigb5Vi2mhDvF1pg7QAHmg3qbgJqOm6rR7sCTEiFtsPQQJg4uIGFIkA5+TPROVVSPs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xY6G6sQm; 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="xY6G6sQm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3610BC2BCB8; Wed, 6 May 2026 11:31:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778067083; bh=UZKX0AqfqvGR8BnzgSVKXZ8o/SBqsGWo/dj+H/QMWJc=; h=From:To:Cc:Subject:Date:Reply-To:From; b=xY6G6sQmDn9q5u60q6AJd2gWOCMLegeVFcX1dvvGqW1G9UHKg/OF7NU7SJ6cY527p VDjo+L+y3xTT9zMIRnA9QuOnOOzJsql54Dfpv0x6HWmMMC06XHjtTiwF7eVJ0U/7c4 gUOTSkSU7X6+vZB/q3QhCmstBVgTAc0akgEbwegE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-43181: gpio: sysfs: fix chip removal with GPIOs exported over sysfs Date: Wed, 6 May 2026 13:28:17 +0200 Message-ID: <2026050639-CVE-2026-43181-2c8c@gregkh> X-Mailer: git-send-email 2.54.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=2565; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4drKY0FzKx2R6d8xDbyTNEYNHMK8WFVd/hQKx6SMi/k=; b=owGbwMvMwCRo6H6F97bub03G02pJDJm/VVcXTu2vk6iZIXv91O6eQMmJZ5InsbKkXnRbbVDN7 O0odvV2RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyk6QDDfJ/l//WXFAnfjDFZ v9CMI+fk/3efuRlmMX+6P9UpUOuUy4l49pgJb3ecKF/YAgA= 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: gpio: sysfs: fix chip removal with GPIOs exported over sysfs Currently if we export a GPIO over sysfs and unbind the parent GPIO controller, the exported attribute will remain under /sys/class/gpio because once we remove the parent device, we can no longer associate the descriptor with it in gpiod_unexport() and never drop the final reference. Rework the teardown code: provide an unlocked variant of gpiod_unexport() and remove all exported GPIOs with the sysfs_lock taken before unregistering the parent device itself. This is done to prevent any new exports happening before we unregister the device completely. The Linux kernel CVE team has assigned CVE-2026-43181 to this issue. Affected and fixed versions =========================== Issue introduced in 6.17 with commit 1cd53df733c21ae0d344a2dec941a3e2a06fefd9 and fixed in 6.18.16 with commit 54f463494eb5bf193ef7d904a493474c451734df Issue introduced in 6.17 with commit 1cd53df733c21ae0d344a2dec941a3e2a06fefd9 and fixed in 6.19.6 with commit a645cc25904b0baf508b77a0402ce151212b9800 Issue introduced in 6.17 with commit 1cd53df733c21ae0d344a2dec941a3e2a06fefd9 and fixed in 7.0 with commit 6766f59012301f1bf3f46c6e7149caca45d92309 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-2026-43181 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-sysfs.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/54f463494eb5bf193ef7d904a493474c451734df https://git.kernel.org/stable/c/a645cc25904b0baf508b77a0402ce151212b9800 https://git.kernel.org/stable/c/6766f59012301f1bf3f46c6e7149caca45d92309