lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090723141531.19029.58305.sendpatchset@x2.localnet>
Date:	Thu, 23 Jul 2009 16:15:32 +0200 (MEST)
From:	Patrick McHardy <kaber@...sh.net>
To:	stable@...nel.org
Cc:	netdev@...r.kernel.org, Patrick McHardy <kaber@...sh.net>,
	netfilter-devel@...r.kernel.org
Subject: netfilter -stable 06/08: xt_rateest: fix comparison with self

commit 77609e5aca9bc8cd4e9ea960177df1e980b3d040
Author: Patrick McHardy <kaber@...sh.net>
Date:   Fri Jul 3 10:35:55 2009 +0200

    netfilter: xt_rateest: fix comparison with self
    
    Upstream commit 4d900f9df:
    
    As noticed by Török Edwin <edwintorok@...il.com>:
    
    Compiling the kernel with clang has shown this warning:
    
    net/netfilter/xt_rateest.c:69:16: warning: self-comparison always results in a
    constant value
                            ret &= pps2 == pps2;
                                        ^
    Looking at the code:
    if (info->flags & XT_RATEEST_MATCH_BPS)
                ret &= bps1 == bps2;
            if (info->flags & XT_RATEEST_MATCH_PPS)
                ret &= pps2 == pps2;
    
    Judging from the MATCH_BPS case it seems to be a typo, with the intention of
    comparing pps1 with pps2.
    
    http://bugzilla.kernel.org/show_bug.cgi?id=13535
    
    Signed-off-by: Patrick McHardy <kaber@...sh.net>

diff --git a/net/netfilter/xt_rateest.c b/net/netfilter/xt_rateest.c
index 220a1d5..4fc6a91 100644
--- a/net/netfilter/xt_rateest.c
+++ b/net/netfilter/xt_rateest.c
@@ -66,7 +66,7 @@ xt_rateest_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 		if (info->flags & XT_RATEEST_MATCH_BPS)
 			ret &= bps1 == bps2;
 		if (info->flags & XT_RATEEST_MATCH_PPS)
-			ret &= pps2 == pps2;
+			ret &= pps1 == pps2;
 		break;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ