Skip to contentSkip to conversation

Bug with Fedora's 2.6.23.9-85 kernel (at least) and ESTABLISHED and SACK

DISCUSSION Zan Lynx 3 participants 6 messages Jan 28, 2008 netfilter

lore
Share & tools
lore

Zan Lynx

author
#0 lore raw

Please CC me on any replies as I am not subscribed.

I was downloading a new Google Earth when I noticed a LOT of max-size dropped packets in my firewall log. I only allow RELATED,ESTABLISHED sessions into my firewall.

tcpdump showed that every time Google sent a packet to satisfy the missing data identified by SACK, that packet was rejected. So it must have been missing the ESTABLISHED rule.

I fixed the problem by adding an ALLOW source port 80 rule for the Google download site IP.

This makes me wonder how often this has happened and I haven't noticed it. Is this a known bug or something new?

BTW, your netfilter Bugzilla is dead or at least 404 missing.

#1 lore raw
Quoted 10 lines · Zan Lynx

Please CC me on any replies as I am not subscribed.

I was downloading a new Google Earth when I noticed a LOT of max-size dropped packets in my firewall log. I only allow RELATED,ESTABLISHED sessions into my firewall.

tcpdump showed that every time Google sent a packet to satisfy the missing data identified by SACK, that packet was rejected. So it must have been missing the ESTABLISHED rule.

You can check the connection state with conntrack -L, or in /proc/net/{ip,nf}_conntrack. What does it read?

author
#2 lore raw
Quoted 8 lines · Jan Engelhardt
Quoted 7 lines · Zan Lynx

Please CC me on any replies as I am not subscribed.

I was downloading a new Google Earth when I noticed a LOT of max-size dropped packets in my firewall log. I only allow RELATED,ESTABLISHED sessions into my firewall.

Quoted 6 lines
Quoted 3 lines

tcpdump showed that every time Google sent a packet to satisfy the missing data identified by SACK, that packet was rejected. So it must have been missing the ESTABLISHED rule.

You can check the connection state with conntrack -L, or in /proc/net/{ip,nf}_conntrack. What does it read?

I am sorry. The download completed and I have not yet had time to reproduce it. Perhaps I can get something tonight.

Signature · 1 line
Zan Lynx <[email protected]>
#3 lore raw
In reply to Zan Lynx
Quoted 9 lines · Zan Lynx

Please CC me on any replies as I am not subscribed.

I was downloading a new Google Earth when I noticed a LOT of max-size dropped packets in my firewall log. I only allow RELATED,ESTABLISHED sessions into my firewall.

tcpdump showed that every time Google sent a packet to satisfy the missing data identified by SACK, that packet was rejected. So it must have been missing the ESTABLISHED rule.

I fixed the problem by adding an ALLOW source port 80 rule for the Google download site IP.

This makes me wonder how often this has happened and I haven't noticed it. Is this a known bug or something new?

Which kernel version?

Most likely there is a broken box along the path that mangles seq numbers but forgets about sacks. Could you please provide a dump:
"tcpdump -v -S host (...)"?

As a short-term workaround you may disable net.ipv4.tcp_sack or use TCPOPTSTRIP to strip SackOK advertisement to the host.

Best regards,

Krzysztof Oledzki

author
#4 lore raw
Quoted 13 lines · Krzysztof Oledzki
Quoted 10 lines · Zan Lynx

Please CC me on any replies as I am not subscribed.

I was downloading a new Google Earth when I noticed a LOT of max-size dropped packets in my firewall log. I only allow RELATED,ESTABLISHED sessions into my firewall.

tcpdump showed that every time Google sent a packet to satisfy the missing data identified by SACK, that packet was rejected. So it must have been missing the ESTABLISHED rule.

Quoted 7 lines
Quoted 5 lines

I fixed the problem by adding an ALLOW source port 80 rule for the Google download site IP.

This makes me wonder how often this has happened and I haven't noticed it. Is this a known bug or something new?

Which kernel version?

As in the Subject, Fedora's 2.6.23.9-85.

Quoted 4 lines

Most likely there is a broken box along the path that mangles seq numbers but forgets about sacks. Could you please provide a dump:
"tcpdump -v -S host (...)"?

I have not yet been able to reproduce it so I cannot provide a dump.

I doubt that the sequence numbers were being mangled. I doubt this because as soon as I added the rule to accept all port 80 packets from the server IP, the TCP session accepted the packet with the missing data and the hole described by the SACK options disappeared. The session was sourced from the machine itself via a Squid proxy.

Quoted 3 lines

As a short-term workaround you may disable net.ipv4.tcp_sack or use TCPOPTSTRIP to strip SackOK advertisement to the host.

Yes, I could do this if it seems to happen again. I will keep an eye on it.

Quoted 4 lines

Best regards,

Krzysztof Oledzki

Signature · 1 line
Zan Lynx <[email protected]>
#5 lore raw
Quoted 18 lines · Zan Lynx
Quoted 16 lines · Krzysztof Oledzki
Quoted 13 lines · Zan Lynx

Please CC me on any replies as I am not subscribed.

I was downloading a new Google Earth when I noticed a LOT of max-size dropped packets in my firewall log. I only allow RELATED,ESTABLISHED sessions into my firewall.

tcpdump showed that every time Google sent a packet to satisfy the missing data identified by SACK, that packet was rejected. So it must have been missing the ESTABLISHED rule.

I fixed the problem by adding an ALLOW source port 80 rule for the Google download site IP.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

This makes me wonder how often this has happened and I haven't noticed it. Is this a known bug or something new?

Which kernel version?

As in the Subject, Fedora's 2.6.23.9-85.

Right, sorry. I must have overlooked this.

Quoted 11 lines
Quoted 3 lines

Most likely there is a broken box along the path that mangles seq numbers but forgets about sacks. Could you please provide a dump:
"tcpdump -v -S host (...)"?

I have not yet been able to reproduce it so I cannot provide a dump.

I doubt that the sequence numbers were being mangled. I doubt this because as soon as I added the rule to accept all port 80 packets from the server IP, the TCP session accepted the packet with the missing data and the hole described by the SACK options disappeared. The session was sourced from the machine itself via a Squid proxy.

It is because most tcp stacks (including the one available in Linux) are less restrictive than netfilter code and allow tcp packets with invalid sacks but valid acks by ignoring sack data.

Best regards,

Krzysztof Olędzki