From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380413; b=xS3Ju6SpUSbzJTXQCUCVVmoyJCAFEKUIrNctC8zPdmKZOF/IeVfg8c1RMYvPjNK6ZOjc Cln2txetHETQzkBlWPzgTc0DFM/r1wc9UoPQ58b0FyHCbpQsfDc49S6+MeWycaF2Hy6aU FuJ8JYXph41QQ6TQtPW2QXWWzFoG6OPLhoue7TgKUPEm5QJbhRYafqJ8pZgfiVSsqjecR HaOwGTDpOPh5dzLv6tslUyQTwpjN8Yzkn7ON0CzPWtsj0k+YTwPFHoue7SQ/RC2XZ+Mog 7G8a88FurasdJczOzWUmnAdsLeLGA4wmOMD1UiCtV0nMXgX1RvqRXjP2MtK1ytBAU8Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380413; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=e1LxduGoRsdXIpN3GgaHDMjK8ewDEC4PmyNKDSd+PQA=; b=RCxWbFv8sc+PIA0pNUNPSoBdbzaUU15EkVS21/tUjjJ3SdZuGtp6dy7i7QNTs5zhJ7sC 1jLLtHcSZ6tAubwl9qs7IVu/kaRXoRTnUlx1u4wyIGI/plnnoTJ3NhLpEOrWk5y/L/Eyt dkaiDq9AaLm1QWX6yBcYcnAjH03QmhLzL06ahgx3dgbdYyW3cnkAJDKsObtQslewkZKJt LbbpZ1YUlJN4E6VdQZGdiZXpQxoqBYvHgp5WkzH7wWU8Q3rQUklA9mFuKSW2oSL0o4eyr /l5Iwmy0kUJ7VFxCKjqzzxXqnGETvowLVwaJLLm6u6phxm57lrSKAH16Q5VjQciISeg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cVHNnt1R; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81859606A683; Fri, 4 Dec 2026 10:33:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cVHNnt1R Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEC5D1F00931; Fri, 4 Dec 2026 10:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380413; bh=e1LxduGoRsdXIpN3GgaHDMjK8ewDEC4PmyNKDSd+PQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cVHNnt1RhQAuh9M0WB8IyBnDRzm8U0NjDffWQknC3FjcfSbtbHDuaNEpK+f/hh7kG 27ToCXCICLlB1sJf3o5Zy7R7u0MAC4EbIFB8PEezocn6gd5NPCQyPOW/TfnM1xVQsT oJhKkRj/EeEJbQBM44dYKEkjxOdMtB27kKBsj91M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Eric Dumazet , Jiayuan Chen , Willem de Bruijn , Sasha Levin Subject: [PATCH 7.3 260/742] ipv4: fix conntrack defrag forwarding after ip_frag_reinit() Date: Fri, 4 Dec 2026 19:02:04 +0900 Message-ID: <20261204100641.967930420@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiayuan Chen [ Upstream commit 3ab5aae0eb60079d17378af5aab0db84ba946e0e ] q.max_size and max_df_size are used by ip_frag_reasm() to set IPCB(skb)->frag_max_size and the DF bit of the reassembled packet. ip_frag_reinit() reuses the queue for a new datagram but does not reset them, so the new datagram inherits them from the old one. On a router with conntrack defrag, if the largest fragment of the old datagram had DF set and was larger than the egress MTU, a new datagram without DF gets DF set after reassembly and is rejected with ICMP_FRAG_NEEDED, even though all its fragments fit. Reset both fields. Fixes: 5f2d04f1f9b5 ("ipv4: fix path MTU discovery with connection tracking") Fixes: d6b915e29f4a ("ip_fragment: don't forward defragmented DF packet") Reviewed-by: Eric Dumazet Signed-off-by: Jiayuan Chen Link: https://patch.msgid.link/20261120094700.46500-1-jiayuan.chen@linux.dev Signed-off-by: Willem de Bruijn Signed-off-by: Sasha Levin --- net/ipv4/ip_fragment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index ef7fd61284a3f..0688be8142c4b 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -250,6 +250,8 @@ static int ip_frag_reinit(struct ipq *qp) qp->q.flags = 0; qp->q.len = 0; qp->q.meat = 0; + qp->q.max_size = 0; + qp->max_df_size = 0; qp->iif = 0; qp->ecn = 0; -- 2.53.0