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-80784: mptcp: pm: fix memory leak from alloc-during-teardown race
Date: Fri,  4 Sep 2026 17:11:23 +0200	[thread overview]
Message-ID: <2026090405-CVE-2026-80784-1faf@gregkh> (raw)

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

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

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

mptcp: pm: fix memory leak from alloc-during-teardown race

mptcp_pm_destroy() empties msk->pm.anno_list and
msk->pm.userspace_pm_local_addr_list under msk->pm.lock during socket
teardown, dropping the lock between the two.

A concurrent userspace PM genl ANNOUNCE on the same msk holds a sock
reference via mptcp_token_get_sock() and, in
mptcp_pm_nl_announce_doit(), calls
mptcp_userspace_pm_append_new_local_addr() and
mptcp_pm_announced_alloc(). Both take msk->pm.lock briefly to add to
their respective lists. Because the genl handler holds a sock reference,
mptcp_pm_destroy() may run on the same msk via mptcp_disconnect(), which
invokes mptcp_destroy_common() without dropping the sock refcount,
before the handler completes.

If the lock acquisitions interleave such that mptcp_pm_destroy() empties
a list first, the later alloc adds its entry to a list head that nothing
else iterates for this msk, and the entry leaks. kmemleak reports both
mptcp_pm_add_addr objects (from mptcp_pm_announced_alloc()) and
mptcp_pm_addr_entry objects (from
mptcp_userspace_pm_append_new_local_addr()) under sustained concurrent
ANNOUNCE + close load against the userspace PM.

Add an MPTCP_PM_DESTROYING bit in msk->pm.status, set by
mptcp_pm_destroy() under pm.lock before the lists are emptied and
checked under pm.lock by the alloc paths. Either the alloc takes pm.lock
first, in which case its entry is on the list when mptcp_pm_destroy()
frees it; or mptcp_pm_destroy() takes pm.lock first, in which case the
later alloc observes the bit and refuses.

Found by an MPTCP protocol-flow harness extending BRF (arXiv:2305.08782).

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


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

	Issue introduced in 5.19 with commit 9ab4807c84a4aacfc9b4f79cc81254035e0ec361 and fixed in 6.1.187 with commit f48341830e4202db3fe884b819b2db6740f0537d
	Issue introduced in 5.19 with commit 9ab4807c84a4aacfc9b4f79cc81254035e0ec361 and fixed in 6.6.154 with commit bb32e9a6a9a9f99eeda16c4efe443400f3e43892
	Issue introduced in 5.19 with commit 9ab4807c84a4aacfc9b4f79cc81254035e0ec361 and fixed in 6.12.106 with commit b2a0b55bf613bd3e81ed26a847b0f6b8e6b7f804
	Issue introduced in 5.19 with commit 9ab4807c84a4aacfc9b4f79cc81254035e0ec361 and fixed in 6.18.47 with commit 9fe5eebb664ecdba88f3fde18062d94b1d1c465f
	Issue introduced in 5.19 with commit 9ab4807c84a4aacfc9b4f79cc81254035e0ec361 and fixed in 7.1.11 with commit 6c290915a03fc8228b473641025cf762b256dbd2
	Issue introduced in 5.19 with commit 9ab4807c84a4aacfc9b4f79cc81254035e0ec361 and fixed in 7.2 with commit efc33b5102ff859bacd390a5f30112d8e0c084c0

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-80784
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/mptcp/pm.c
	net/mptcp/pm_userspace.c
	net/mptcp/protocol.h


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/f48341830e4202db3fe884b819b2db6740f0537d
	https://git.kernel.org/stable/c/bb32e9a6a9a9f99eeda16c4efe443400f3e43892
	https://git.kernel.org/stable/c/b2a0b55bf613bd3e81ed26a847b0f6b8e6b7f804
	https://git.kernel.org/stable/c/9fe5eebb664ecdba88f3fde18062d94b1d1c465f
	https://git.kernel.org/stable/c/6c290915a03fc8228b473641025cf762b256dbd2
	https://git.kernel.org/stable/c/efc33b5102ff859bacd390a5f30112d8e0c084c0

                 reply	other threads:[~2026-09-04 15:15 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=2026090405-CVE-2026-80784-1faf@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.