Patch "netfilter: ctnetlink: use helper function to calculate expect ID" has been added to the 4.19-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: ctnetlink: use helper function to calculate expect ID

to the 4.19-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-ctnetlink-use-helper-function-to-calculate.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 1ae49c930c02a8a72091bbc0d76b247a8b782980
Author: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
Date:   Sat Jul 13 16:47:38 2024 +0200

    netfilter: ctnetlink: use helper function to calculate expect ID
    
    [ Upstream commit 782161895eb4ac45cf7cfa8db375bd4766cb8299 ]
    
    Delete expectation path is missing a call to the nf_expect_get_id()
    helper function to calculate the expectation ID, otherwise LSB of the
    expectation object address is leaked to userspace.
    
    Fixes: 3c79107631db ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id")
    Reported-by: zdi-disclosures@xxxxxxxxxxxxxx
    Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 83e8566ec3f05..bcb72ad2c1786 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -3106,7 +3106,8 @@ static int ctnetlink_del_expect(struct net *net, struct sock *ctnl,
 
 		if (cda[CTA_EXPECT_ID]) {
 			__be32 id = nla_get_be32(cda[CTA_EXPECT_ID]);
-			if (ntohl(id) != (u32)(unsigned long)exp) {
+
+			if (id != nf_expect_get_id(exp)) {
 				nf_ct_expect_put(exp);
 				return -ENOENT;
 			}




[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