From 6ea0ab5d3ae0e9c7d252347fa9250273d54fb2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Sat, 31 Oct 2026 15:05:32 +0800 Subject: [PATCH] DefaultListener: Disable MPTCP by default (#7291) Fixes https://github.com/XTLS/Xray-core/pull/7291#issuecomment-6540309985 --- transport/internet/system_listener.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/transport/internet/system_listener.go b/transport/internet/system_listener.go index 1999953eb..b651796df 100644 --- a/transport/internet/system_listener.go +++ b/transport/internet/system_listener.go @@ -89,6 +89,9 @@ func (dl *DefaultListener) Listen(ctx context.Context, addr net.Addr, sockopt *S lc.Control = getControlFunc(ctx, sockopt, dl.controllers) // default disable keepalive lc.KeepAlive = -1 + // MPTCP is enabled by default golang listener + // due to CVE-2026-98432, MPTCP should be disabled by default + lc.SetMultipathTCP(false) if sockopt != nil { if sockopt.TcpKeepAliveIdle*sockopt.TcpKeepAliveInterval < 0 { return nil, errors.New("invalid TcpKeepAliveIdle or TcpKeepAliveInterval value: ", sockopt.TcpKeepAliveIdle, " ", sockopt.TcpKeepAliveInterval) @@ -107,9 +110,7 @@ func (dl *DefaultListener) Listen(ctx context.Context, addr net.Addr, sockopt *S lc.KeepAliveConfig.Enable = true lc.KeepAliveConfig.Interval = time.Duration(sockopt.TcpKeepAliveInterval) * time.Second } - if sockopt.TcpMptcp { - lc.SetMultipathTCP(true) - } + lc.SetMultipathTCP(sockopt.TcpMptcp) } case *net.UnixAddr: lc.Control = nil