All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-cve-announce@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@kernel.org>
Subject: CVE-2026-80983: net/smc: fix socket refcount leak in smc_switch_conns()
Date: Fri, 11 Sep 2026 21:41:29 +0200	[thread overview]
Message-ID: <2026091147-CVE-2026-80983-1ce7@gregkh> (raw)

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

net/smc: fix socket refcount leak in smc_switch_conns()

smc_switch_conns() takes a reference on the SMC socket before dropping
lgr->conns_lock, so the connection stays alive while the CDC slot is
fetched:

        sock_hold(&smc->sk);
        read_unlock_bh(&lgr->conns_lock);
        /* pre-fetch buffer outside of send_lock, might sleep */
        rc = smc_cdc_get_free_slot(conn, to_lnk, &wr_buf, NULL, &pend);
        if (rc)
                goto err_out;

The err_out label only drops the wr_tx link reference, so this early exit
returns without the matching sock_put(). The second error exit is not
affected, because sock_put() has already run by then.

A leaked sk_refcnt means the smc_sock is never destroyed. Its send and
receive buffers stay allocated, and for a user socket the reference held
on the network namespace is never released, so the netns can no longer be
torn down.

smc_cdc_get_free_slot() fails when the target link goes down or when the
connection has been killed while the switch is in progress. Both are
reachable during the link failover this function implements, so the leak
is triggered by the same hardware events that make smc_switch_conns() run
in the first place.

Restructure so there is a single sock_put() covering both outcomes,
instead of adding a second one to the error path.

The Linux kernel CVE team has assigned CVE-2026-80983 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.15 with commit 95f7f3e7dc6bd2e735cb5de11734ea2222b1e05a and fixed in 6.12.109 with commit 84dea0585f6b538ae895a8b1d025f4897737f3b1
	Issue introduced in 5.15 with commit 95f7f3e7dc6bd2e735cb5de11734ea2222b1e05a and fixed in 6.18.50 with commit d89dc1bd8845c669a700eee58c64ebd3cc1b6d2d
	Issue introduced in 5.15 with commit 95f7f3e7dc6bd2e735cb5de11734ea2222b1e05a and fixed in 7.2.4 with commit d9a879ac25958bdaecb669ce70e58f8e2ff170de
	Issue introduced in 5.15 with commit 95f7f3e7dc6bd2e735cb5de11734ea2222b1e05a and fixed in 7.3-rc1 with commit 719296c4aa8213d4ac8002e77d5956d436bc98d0
	Issue introduced in 5.10.90 with commit 99f19566b1c4d3dc4d934ee2ef43faadebb56d70
	Issue introduced in 5.14.14 with commit 0d9ddf515cde793841f738490037560fd6559c63

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-80983
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


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/84dea0585f6b538ae895a8b1d025f4897737f3b1
	https://git.kernel.org/stable/c/d89dc1bd8845c669a700eee58c64ebd3cc1b6d2d
	https://git.kernel.org/stable/c/d9a879ac25958bdaecb669ce70e58f8e2ff170de
	https://git.kernel.org/stable/c/719296c4aa8213d4ac8002e77d5956d436bc98d0

                 reply	other threads:[~2026-09-11 19:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026091147-CVE-2026-80983-1ce7@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=cve@kernel.org \
    --cc=gregkh@kernel.org \
    --cc=linux-cve-announce@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.