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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Feb 2014 17:25:35 +0800
From:	Duan Jiong <duanj.fnst@...fujitsu.com>
To:	David Miller <davem@...emloft.net>
CC:	netdev <netdev@...r.kernel.org>, hannes@...essinduktion.org
Subject: [PATCH] ipv4: use daddr to get inet_peer


since commit 1d861aa4("inet: Minimize use of cached route inetpeer"),
ip_error() uses saddr to get inet_peer, so ip_error() and icmpv4_xrlim_allow()
use the same inet_peer to limit icmp error message twice.

In ip_error(), peer->rate_tokens is set to ip_rt_error_burst, but in
inet_peer_xrlim_allow() peer->rate_tokens is set to XRLIM_BURST_FACTOR.
XRLIM_BURST_FACTOR is defined to 6, so user seting ip_rt_error_burst makes
no sense.

In my opinion, the ip_rt_error_burst is used to limit icmp error messages
for daddr instead of saddr.

Signed-off-by: Duan Jiong <duanj.fnst@...fujitsu.com>
---
 net/ipv4/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 25071b4..4da5588 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -933,7 +933,7 @@ static int ip_error(struct sk_buff *skb)
 		break;
 	}
 
-	peer = inet_getpeer_v4(net->ipv4.peers, ip_hdr(skb)->saddr, 1);
+	peer = inet_getpeer_v4(net->ipv4.peers, ip_hdr(skb)->daddr, 1);
 
 	send = true;
 	if (peer) {
-- 
1.8.3.1
--
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