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 1A5DA266B67 for ; Fri, 23 Jan 2026 15:25:19 +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=1769181920; cv=none; b=q29ADaifTeGDbYU1aDS+cWRtkKK9xhfc5J9UU32ZaAjlpk1Enmi6b+ovg1TadOWskPfDeMNPDBbGJCTBtt+qRLbhIHNkWhPF4TKi2cS30/i3yBBx5JXVZrsUI4ex6c3tJRbZNJZGKSB69mu76b+mPENjhiwUMdyHOcCD7WPFaOA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769181920; c=relaxed/simple; bh=kef43A8smQRn4nn//vlpB9fU4VgRjSqlSRMdn+RQXeU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GP1zt6pDH061of5Z2h9AIgBBbLsom9u6Rqhy160Wy5tRXp7073Y85XNl/sF445lGEe22+a65ThoNDd4I6RuB0hJzXfsvoj4s0FlfsoSG+EvCW+/8agOUhP8oJHsUz7C8iQJqOqIwBsDz9E7Dk7LiDsdnl+Tbv0DPdkANGK7y9MU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HlWQxFsq; 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="HlWQxFsq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 481AAC4CEF1; Fri, 23 Jan 2026 15:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769181919; bh=kef43A8smQRn4nn//vlpB9fU4VgRjSqlSRMdn+RQXeU=; h=From:To:Cc:Subject:Date:Reply-To:From; b=HlWQxFsqa2qdtvsYBAkT7FgxiFe3cXkPxGlbS5pNSIkprKe/wspdHe4eum3o7nfTF SdBNdrX6f29yeZSlHsGRjiclOXlSA5IX9uWnFKW35bWeuQLYKxo6MTBtwaPw88wdZd U6ob5eLwCV58oujkjUcROKxad4etfADfQnXFGVIw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-22986: gpiolib: fix race condition for gdev->srcu Date: Fri, 23 Jan 2026 16:24:57 +0100 Message-ID: <2026012349-CVE-2026-22986-5992@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=3688; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=t3pcfa/0cn3u7GXSJ6uqLKFbXjSmSLxQ3uLiq70/FPM=; b=kA0DAAIRMUfUDdst+ykByyZiAGlzksKg1dtyB/1SOZ2ZofTRfKwaqNhH994kiMkk6Hn4wGm49 ohdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmlzksIACgkQMUfUDdst+ylbmACghY7k bz/kBbmyfuPi/NGPJthqIcoAn2nT0f6oJ7p2XBy/hyemfT3GquQE 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: gpiolib: fix race condition for gdev->srcu If two drivers were calling gpiochip_add_data_with_key(), one may be traversing the srcu-protected list in gpio_name_to_desc(), meanwhile other has just added its gdev in gpiodev_add_to_list_unlocked(). This creates a non-mutexed and non-protected timeframe, when one instance is dereferencing and using &gdev->srcu, before the other has initialized it, resulting in crash: [ 4.935481] Unable to handle kernel paging request at virtual address ffff800272bcc000 [ 4.943396] Mem abort info: [ 4.943400] ESR = 0x0000000096000005 [ 4.943403] EC = 0x25: DABT (current EL), IL = 32 bits [ 4.943407] SET = 0, FnV = 0 [ 4.943410] EA = 0, S1PTW = 0 [ 4.943413] FSC = 0x05: level 1 translation fault [ 4.943416] Data abort info: [ 4.943418] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 [ 4.946220] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 4.955261] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 4.955268] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000038e6c000 [ 4.961449] [ffff800272bcc000] pgd=0000000000000000 [ 4.969203] , p4d=1000000039739003 [ 4.979730] , pud=0000000000000000 [ 4.980210] phandle (CPU): 0x0000005e, phandle (BE): 0x5e000000 for node "reset" [ 4.991736] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP ... [ 5.121359] pc : __srcu_read_lock+0x44/0x98 [ 5.131091] lr : gpio_name_to_desc+0x60/0x1a0 [ 5.153671] sp : ffff8000833bb430 [ 5.298440] [ 5.298443] Call trace: [ 5.298445] __srcu_read_lock+0x44/0x98 [ 5.309484] gpio_name_to_desc+0x60/0x1a0 [ 5.320692] gpiochip_add_data_with_key+0x488/0xf00 5.946419] ---[ end trace 0000000000000000 ]--- Move initialization code for gdev fields before it is added to gpio_devices, with adjacent initialization code. Adjust goto statements to reflect modified order of operations [Bartosz: fixed a build issue, removed stray newline] The Linux kernel CVE team has assigned CVE-2026-22986 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit 47d8b4c1d868148c8fb51b785a89e58ca2d02c4d and fixed in 6.18.6 with commit fb674c8f1a5d8dd3113a7326030f963fa2d79c02 Issue introduced in 6.9 with commit 47d8b4c1d868148c8fb51b785a89e58ca2d02c4d and fixed in 6.19-rc5 with commit a7ac22d53d0990152b108c3f4fe30df45fcb0181 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-22986 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/fb674c8f1a5d8dd3113a7326030f963fa2d79c02 https://git.kernel.org/stable/c/a7ac22d53d0990152b108c3f4fe30df45fcb0181