]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Prevent denial of service using bogus fragmented IPv4 packets.
authorjesper <jesper@FreeBSD.org>
Sun, 3 Jun 2001 23:33:23 +0000 (23:33 +0000)
committerjesper <jesper@FreeBSD.org>
Sun, 3 Jun 2001 23:33:23 +0000 (23:33 +0000)
commit4ff715c022c2623b0e7a5651bedf9a8b261d3316
treeaee0461e7c881fb88144ef8d26a3b0bb3e9b2617
parent8166dba3c867ede826519ef6fc38ef2c31f9285d
Prevent denial of service using bogus fragmented IPv4 packets.

A attacker sending a lot of bogus fragmented packets to the target
(with different IPv4 identification field - ip_id), may be able
to put the target machine into mbuf starvation state.

By setting a upper limit on the number of reassembly queues we
prevent this situation.

This upper limit is controlled by the new sysctl
net.inet.ip.maxfragpackets which defaults to 200,
as the IPv6 case, this should be sufficient for most
systmes, but you might want to increase it if you have
lots of TCP sessions.
I'm working on making the default value dependent on
nmbclusters.

If you want old behaviour (no upper limit) set this sysctl
to a negative value.

If you don't want to accept any fragments (not recommended)
set the sysctl to 0 (zero).

Obtained from: NetBSD
MFC after: 1 week
sys/netinet/ip_input.c