CVE-2026-98559: net/smc: fix UAF on lgr list traversal in smcr_port_err()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net/smc: fix UAF on lgr list traversal in smcr_port_err()
smcr_port_err() traverses smc_lgr_list.list without holding smc_lgr_list.lock, allowing a concurrent smc_lgr_terminate_sched() to free an lgr while it is still being dereferenced.
Hold smc_lgr_list.lock across the traversal. Update smc_ib_gid_check() to call smcr_port_err() after releasing the lock.
The Linux kernel CVE team has assigned CVE-2026-98559 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 5.15.222 with commit 34bcf11cd2528ae00bb6d764d808083c66824277 Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 6.1.189 with commit 0edcc4284392b28826b5d37532b366b291e6e0fa Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 6.6.158 with commit 00a59600ae72d24859d0ad1783a78bc921bc2599 Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 6.12.112 with commit 3d35f069e1c119992000d51236dbe54da2d4e61e Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 6.18.55 with commit 3d65a2eb4449fc9658fb860dea893025d028d90e Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 7.2.9 with commit a9b968e42690d784c241a0761c10253271f7df5d Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 7.3-rc5 with commit 61cb282fe97b3b0ba32ca09417a693162bf4ae3f
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-98559
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:
net/smc/smc_core.c
net/smc/smc_ib.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/34bcf11cd2528ae00bb6d764d808083c66824277 https://git.kernel.org/stable/c/0edcc4284392b28826b5d37532b366b291e6e0fa https://git.kernel.org/stable/c/00a59600ae72d24859d0ad1783a78bc921bc2599 https://git.kernel.org/stable/c/3d35f069e1c119992000d51236dbe54da2d4e61e https://git.kernel.org/stable/c/3d65a2eb4449fc9658fb860dea893025d028d90e https://git.kernel.org/stable/c/a9b968e42690d784c241a0761c10253271f7df5d https://git.kernel.org/stable/c/61cb282fe97b3b0ba32ca09417a693162bf4ae3f