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

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

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



commit 3ffb3eb0186ac6d2b3e70f1198a0e94eeaecb12d
Author: Jeremy Sowden <jeremy@xxxxxxxxxx>
Date:   Tue Mar 7 23:22:57 2023 +0000

    netfilter: nft_masq: correct length for loading protocol registers
    
    [ Upstream commit ec2c5917eb858428b2083d1c74f445aabbe8316b ]
    
    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: 8a6bf5da1aef ("netfilter: nft_masq: support port range")
    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_masq.c b/net/netfilter/nft_masq.c
index 9953e80537536..1818dbf089cad 100644
--- a/net/netfilter/nft_masq.c
+++ b/net/netfilter/nft_masq.c
@@ -43,7 +43,7 @@ static int nft_masq_init(const struct nft_ctx *ctx,
 			 const struct nft_expr *expr,
 			 const struct nlattr * const tb[])
 {
-	u32 plen = sizeof_field(struct nf_nat_range, min_addr.all);
+	u32 plen = sizeof_field(struct nf_nat_range, min_proto.all);
 	struct nft_masq *priv = nft_expr_priv(expr);
 	int err;
 



[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