Patch "netfilter: nft_redir: correct length for loading protocol registers" has been added to the 5.10-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: nft_redir: correct length for loading protocol registers

to the 5.10-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-nft_redir-correct-length-for-loading-proto.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 6cbb1240cab7dba34889baff702b9e6e249fbb80
Author: Jeremy Sowden <jeremy@xxxxxxxxxx>
Date:   Tue Mar 7 23:22:58 2023 +0000

    netfilter: nft_redir: correct length for loading protocol registers
    
    [ Upstream commit 1f617b6b4c7a3d5ea7a56abb83a4c27733b60c2f ]
    
    The values in the protocol registers are two bytes wide.  However, when
    parsing the register loads, the code currently uses the larger 16-byte
    size of a `union nf_inet_addr`.  Change it to use the (correct) size of
    a `union nf_conntrack_man_proto` instead.
    
    Fixes: d07db9884a5f ("netfilter: nf_tables: introduce nft_validate_register_load()")
    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/netfilter/nft_redir.c b/net/netfilter/nft_redir.c
index ba09890dddb50..deb7e65c8d82b 100644
--- a/net/netfilter/nft_redir.c
+++ b/net/netfilter/nft_redir.c
@@ -48,7 +48,7 @@ static int nft_redir_init(const struct nft_ctx *ctx,
 	unsigned int plen;
 	int err;
 
-	plen = sizeof_field(struct nf_nat_range, min_addr.all);
+	plen = sizeof_field(struct nf_nat_range, min_proto.all);
 	if (tb[NFTA_REDIR_REG_PROTO_MIN]) {
 		err = nft_parse_register_load(tb[NFTA_REDIR_REG_PROTO_MIN],
 					      &priv->sreg_proto_min, plen);



[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