Patch "netfilter: ip6_tables: zero-initialize fragment offset" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    netfilter: ip6_tables: zero-initialize fragment offset

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     netfilter-ip6_tables-zero-initialize-fragment-offset.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 992e007b33e03118a605917e8f78d699b4b9141a
Author: Jeremy Sowden <jeremy@xxxxxxxxxx>
Date:   Sun Sep 12 22:24:33 2021 +0100

    netfilter: ip6_tables: zero-initialize fragment offset
    
    [ Upstream commit 310e2d43c3ad429c1fba4b175806cf1f55ed73a6 ]
    
    ip6tables only sets the `IP6T_F_PROTO` flag on a rule if a protocol is
    specified (`-p tcp`, for example).  However, if the flag is not set,
    `ip6_packet_match` doesn't call `ipv6_find_hdr` for the skb, in which
    case the fragment offset is left uninitialized and a garbage value is
    passed to each matcher.
    
    Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
    Reviewed-by: Florian Westphal <fw@xxxxxxxxx>
    Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index de2cf3943b91..a579ea14a69b 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -273,6 +273,7 @@ ip6t_do_table(struct sk_buff *skb,
 	 * things we don't know, ie. tcp syn flag or ports).  If the
 	 * rule is also a fragment-specific rule, non-fragments won't
 	 * match it. */
+	acpar.fragoff = 0;
 	acpar.hotdrop = false;
 	acpar.state   = state;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux