Skip to contentSkip to conversation

DoS by cat /proc/net/ip_conntrack ?

DISCUSSION Denys Fedoryshchenko 4 participants 7 messages Mar 6, 2008 – Mar 8, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi again

On loaded router
net.netfilter.nf_conntrack_count = 415633
passing about 100-150 Mbps
network cards 3xe100, 1xe1000e

i tried to issue command cat /proc/net/ip_conntrack |grep 'something'

Router went dead for about 2 minutes, even i disconnect ssh session. Ping was looks like this:
64 bytes from dotfib (10.184.184.1): icmp_seq=15 ttl=61 time=4321 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=50 ttl=61 time=398 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=122 ttl=61 time=15.3 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=142 ttl=61 time=4452 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=180 ttl=61 time=850 ms (system recovered)
64 bytes from dotfib (10.184.184.1): icmp_seq=182 ttl=61 time=0.681 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=183 ttl=61 time=0.936 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=184 ttl=61 time=2.94 ms

I dont think it is normal, and such command taking a lot of system resources and cause whole system to hang.

Kernel 2.6.24.2

--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.

#1 lore raw
Quoted 1 line · Denys Fedoryshchenko

Hi again

Hi,

Quoted 19 lines

On loaded router
net.netfilter.nf_conntrack_count = 415633
passing about 100-150 Mbps
network cards 3xe100, 1xe1000e

i tried to issue command cat /proc/net/ip_conntrack |grep 'something'

Router went dead for about 2 minutes, even i disconnect ssh session. Ping was looks like this:
64 bytes from dotfib (10.184.184.1): icmp_seq=15 ttl=61 time=4321 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=50 ttl=61 time=398 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=122 ttl=61 time=15.3 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=142 ttl=61 time=4452 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=180 ttl=61 time=850 ms (system recovered)
64 bytes from dotfib (10.184.184.1): icmp_seq=182 ttl=61 time=0.681 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=183 ttl=61 time=0.936 ms 64 bytes from dotfib (10.184.184.1): icmp_seq=184 ttl=61 time=2.94 ms

Quoted 4 lines

I dont think it is normal, and such command taking a lot of system resources and cause whole system to hang.

Kernel 2.6.24.2

The answer is quite simple here: don't do this. Instead use "conntrack -L" as netlink is much more effective and better designed.

Best regards,

Krzysztof Olędzki

#2 lore raw

Krzysztof Oledzki wrote, On 03/06/2008 02:51 PM:

Quoted 2 lines · Denys Fedoryshchenko

...

Quoted 3 lines
Quoted 3 lines

i tried to issue command cat /proc/net/ip_conntrack |grep 'something'

Router went dead for about 2 minutes, even i disconnect ssh session.

...

Quoted 7 lines
Quoted 4 lines

I dont think it is normal, and such command taking a lot of system resources and cause whole system to hang.

Kernel 2.6.24.2

The answer is quite simple here: don't do this. Instead use "conntrack -L" as netlink is much more effective and better designed.

I think, Denys is concerned about some other, maybe too curious users if they can read this?

Regards,
Jarek P.

#3 lore raw

Jarek Poplawski wrote, On 03/08/2008 01:26 PM:
...

Quoted 2 lines

I think, Denys is concerned about some other, maybe too curious users if they can read this?

OOPS! I see it's root only...

Then only their curiosity could be dangerous here!

Sorry,
Jarek P.

#4 lore raw

For me personally, i think must be as a rule, that _READING_ must not hang whole system by consuming all resources (router becoming completely unreachable and blocking all traffic passing thru it). It can hang console, current program, but not crash router.

On Sat, 08 Mar 2008 13:33:10 +0100, Jarek Poplawski wrote

Quoted 8 lines

Jarek Poplawski wrote, On 03/08/2008 01:26 PM:
....

Quoted 2 lines

I think, Denys is concerned about some other, maybe too curious users if they can read this?

OOPS! I see it's root only...

Quoted 8 lines

Then only their curiosity could be dangerous here!

Sorry,
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.

#5 lore raw
Quoted 4 lines · Denys Fedoryshchenko

For me personally, i think must be as a rule, that _READING_ must not hang whole system by consuming all resources (router becoming completely unreachable and blocking all traffic passing thru it). It can hang console, current program, but not crash router.

IMHO you're right, and it's a bug. Only calling this DOS isn't probably very right if only root can do this, but maybe I'm wrong.

Jarek P.

#6 lore raw
Quoted 8 lines · Jarek Poplawski
Quoted 2 lines · Denys Fedoryshchenko

For me personally, i think must be as a rule, that _READING_ must not hang whole system by consuming all resources (router becoming completely unreachable and blocking all traffic passing thru it). It can hang console, current program, but not crash router.

IMHO you're right, and it's a bug. Only calling this DOS isn't probably very right if only root can do this, but maybe I'm wrong.

Starting with current -git we don't take the conntrack lock for /proc anymore, so it should behave better now.