* [PATCH] TCP: check min TTL on received ICMP packets
@ 2010-03-18 21:27 Stephen Hemminger
2010-03-20 4:08 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2010-03-18 21:27 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Pekka Savola
This adds RFC5082 checks for TTL on received ICMP packets.
It adds some security against spoofed ICMP packets
disrupting GTSM protected sessions.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
Please apply to 2.6.33 since it basically a "follow correct RFC"
fix to original GTSM patch.
--- a/net/ipv4/tcp_ipv4.c 2010-03-18 11:10:14.396384060 -0700
+++ b/net/ipv4/tcp_ipv4.c 2010-03-18 11:13:09.115759682 -0700
@@ -370,6 +370,11 @@ void tcp_v4_err(struct sk_buff *icmp_skb
if (sk->sk_state == TCP_CLOSE)
goto out;
+ if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) {
+ NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
+ goto out;
+ }
+
icsk = inet_csk(sk);
tp = tcp_sk(sk);
seq = ntohl(th->seq);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] TCP: check min TTL on received ICMP packets
2010-03-18 21:27 [PATCH] TCP: check min TTL on received ICMP packets Stephen Hemminger
@ 2010-03-20 4:08 ` David Miller
2010-03-21 0:05 ` Stephen Hemminger
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2010-03-20 4:08 UTC (permalink / raw)
To: shemminger; +Cc: netdev, pekkas
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 18 Mar 2010 14:27:32 -0700
> This adds RFC5082 checks for TTL on received ICMP packets.
> It adds some security against spoofed ICMP packets
> disrupting GTSM protected sessions.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
> Please apply to 2.6.33 since it basically a "follow correct RFC"
> fix to original GTSM patch.
Queued up for -stable, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] TCP: check min TTL on received ICMP packets
2010-03-20 4:08 ` David Miller
@ 2010-03-21 0:05 ` Stephen Hemminger
2010-03-22 1:12 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2010-03-21 0:05 UTC (permalink / raw)
To: David Miller; +Cc: netdev, pekkas
----- "David Miller" <davem@davemloft.net> wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Thu, 18 Mar 2010 14:27:32 -0700
>
> > This adds RFC5082 checks for TTL on received ICMP packets.
> > It adds some security against spoofed ICMP packets
> > disrupting GTSM protected sessions.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> Applied.
>
> > Please apply to 2.6.33 since it basically a "follow correct RFC"
> > fix to original GTSM patch.
>
I meant 2.6.34... min_ttl is not in 2.6.33
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] TCP: check min TTL on received ICMP packets
2010-03-21 0:05 ` Stephen Hemminger
@ 2010-03-22 1:12 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-03-22 1:12 UTC (permalink / raw)
To: stephen.hemminger; +Cc: netdev, pekkas
From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Sat, 20 Mar 2010 17:05:14 -0700 (PDT)
>> From: Stephen Hemminger <shemminger@vyatta.com>
>> Date: Thu, 18 Mar 2010 14:27:32 -0700
>>
>> > Please apply to 2.6.33 since it basically a "follow correct RFC"
>> > fix to original GTSM patch.
>>
>
> I meant 2.6.34... min_ttl is not in 2.6.33
Gotcha.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-22 1:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-18 21:27 [PATCH] TCP: check min TTL on received ICMP packets Stephen Hemminger
2010-03-20 4:08 ` David Miller
2010-03-21 0:05 ` Stephen Hemminger
2010-03-22 1:12 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.