]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mptcp: fix race in mptcp_pm_nl_flush_addrs_doit()
authorEric Dumazet <edumazet@google.com>
Sat, 24 Jan 2026 10:59:18 +0000 (11:59 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 27 Jan 2026 03:32:59 +0000 (19:32 -0800)
commite2a9eeb69f7d4ca4cf4c70463af77664fdb6ab1d
treebdb9ffb74d3847f751e3fbe24b4523cfedbf6372
parent8d7ba71e46216b8657a82ca2ec118bc93812a4d0
mptcp: fix race in mptcp_pm_nl_flush_addrs_doit()

syzbot and Eulgyu Kim reported crashes in mptcp_pm_nl_get_local_id()
and/or mptcp_pm_nl_is_backup()

Root cause is list_splice_init() in mptcp_pm_nl_flush_addrs_doit()
which is not RCU ready.

list_splice_init_rcu() can not be called here while holding pernet->lock
spinlock.

Many thanks to Eulgyu Kim for providing a repro and testing our patches.

Fixes: 141694df6573 ("mptcp: remove address when netlink flushes addrs")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot+5498a510ff9de39d37da@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/6970a46d.a00a0220.3ad28e.5cf0.GAE@google.com/T/
Reported-by: Eulgyu Kim <eulgyukim@snu.ac.kr>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/611
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260124-net-mptcp-race_nl_flush_addrs-v3-1-b2dc1b613e9d@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_kernel.c