From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 498BB1C5D77; Wed, 4 Feb 2026 14:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770216345; cv=none; b=jwbm1y7jlgXuoNZPYJnYLFwdjDtSnwOlGIIsfmZ86N7AG1qCcxhUlp+xebd2ZnIUPTdurPVMAHbYzhUyAINSFf1RZJEE1Se+NYiDZoy0D61SMkvF6IFnDOhhUO5CM5keu6uBjOxWJfQq7r/HLE4eEJOAaR/xgfj56xlN4qAxWfY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770216345; c=relaxed/simple; bh=ZKrtPj7aG+gMXdfu6v4iiKAmRqG4lfBbQcK7O/AgdT4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VwjJq0OVuF1zql0j5p9Z5h0zGnmdsV/XeD9/TKucBymZg5y7qrQ+geRo62se3e9+UwryJHeYl3zI7+374tggBNP6Y3+5FYkLG8XEWGipPvRET5LqcnSaPjkuzi5vfaT2bezp2i86F7s9Ht22sEp2V+n/eKyjbpAj+We2i6H6x7A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YGdXOHTt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="YGdXOHTt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B03D7C4CEF7; Wed, 4 Feb 2026 14:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770216345; bh=ZKrtPj7aG+gMXdfu6v4iiKAmRqG4lfBbQcK7O/AgdT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YGdXOHTt8peKHXd5wiqRgrkyDonDbeUS9qdeyz5bldyKQ3gsJ2KEKZ00qiq3BSmxc SjJ0q3Jurs87sShMJljgVG/HkP6PzUEcc3xZAxg8oSTXd9WPjAofHr9+gG6mA0jWv7 QMTHGLAfX1oubfOHP++OESGe85gCO7LRlsLvUOyc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kuniyuki Iwashima , Eric Dumazet , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 059/161] fou: Dont allow 0 for FOU_ATTR_IPPROTO. Date: Wed, 4 Feb 2026 15:38:42 +0100 Message-ID: <20260204143853.884081205@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260204143851.755002596@linuxfoundation.org> References: <20260204143851.755002596@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kuniyuki Iwashima [ Upstream commit 7a9bc9e3f42391e4c187e099263cf7a1c4b69ff5 ] fou_udp_recv() has the same problem mentioned in the previous patch. If FOU_ATTR_IPPROTO is set to 0, skb is not freed by fou_udp_recv() nor "resubmit"-ted in ip_protocol_deliver_rcu(). Let's forbid 0 for FOU_ATTR_IPPROTO. Fixes: 23461551c0062 ("fou: Support for foo-over-udp RX path") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20260115172533.693652-4-kuniyu@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- Documentation/netlink/specs/fou.yaml | 2 ++ net/ipv4/fou_nl.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/netlink/specs/fou.yaml b/Documentation/netlink/specs/fou.yaml index 266c386eedf3a..e5753a30a29a2 100644 --- a/Documentation/netlink/specs/fou.yaml +++ b/Documentation/netlink/specs/fou.yaml @@ -36,6 +36,8 @@ attribute-sets: - name: ipproto type: u8 + checks: + min: 1 - name: type type: u8 diff --git a/net/ipv4/fou_nl.c b/net/ipv4/fou_nl.c index 6c3820f41dd5d..5bb8133ed7a89 100644 --- a/net/ipv4/fou_nl.c +++ b/net/ipv4/fou_nl.c @@ -14,7 +14,7 @@ const struct nla_policy fou_nl_policy[FOU_ATTR_IFINDEX + 1] = { [FOU_ATTR_PORT] = { .type = NLA_U16, }, [FOU_ATTR_AF] = { .type = NLA_U8, }, - [FOU_ATTR_IPPROTO] = { .type = NLA_U8, }, + [FOU_ATTR_IPPROTO] = NLA_POLICY_MIN(NLA_U8, 1), [FOU_ATTR_TYPE] = { .type = NLA_U8, }, [FOU_ATTR_REMCSUM_NOPARTIAL] = { .type = NLA_FLAG, }, [FOU_ATTR_LOCAL_V4] = { .type = NLA_U32, }, -- 2.51.0