Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2001.223 -- NetBSD Security Advisory 2001-006 Denial of service using bogus fragmented IPv4 packets 31 May 2001 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Vendor: NetBSD Operating System: NetBSD-current prior to April 17, 2001 NetBSD 1.5.x pror to April 24, 2001 NetBSD 1.4.x Impact: Denial of Service Access Required: Remote - --------------------------BEGIN INCLUDED TEXT-------------------- - -----BEGIN PGP SIGNED MESSAGE----- NetBSD Security Advisory 2001-006 ================================= Topic: Denial of service using bogus fragmented IPv4 packets Version: NetBSD 1.4, 1.5, -current Severity: Network-connected systems can be crashed remotely Fixed: NetBSD-current: April 17, 2001 (1.5U) NetBSD-1.5 branch: April 24, 2001 (1.5.1 will include the fix) NetBSD-1.4 branch: (not yet available) Abstract ======== Malicious parties may be able to prevent a NetBSD node from communicating with other nodes by transmitting a lot of bogus fragmented IPv4 packets. For the attack to be effective, the attacker needs to have good network connectivity to the victim node (like logged onto the victim machine itself, connected by a fat LAN, or whatever). There are exploits for this problem available on the Internet. However, the attack is timing dependent and the attack is not always successful. Technical Details ================= In the IPv4 input path (sys/netinet/ip_input.c), there's code to reassemble fragmented IPv4 datagrams. Datagram fragments destined to the node will be queued for 30 seconds, to allow fragmented datagrams to be reassembled. Until recently, there was no upper limit in the number of reassembly queues. Therefore, a malicious party may be able to transmit a lot of bogus fragmented packets (with different IPv4 identification field - ip_id), and may be able to put the target machine into mbuf starvation state. Recently we introduced a new sysctl(3) - net.inet.ip.maxfragpackets. With this, you can configure an upper limit to the number of reassembly queues. If you want the old behavior (no limit), you can set the value to a negative value. Solutions and Workarounds ========================= (1) Upgrade the system from newer sources or binaries: Compile and install a kernel which has the sysctl(3) variable net.inet.ip.maxfragpackets in the sysctl MIB. With this variable, you can limit the number of IPv4 fragment reassembly queues kept on the system. The value needs to be picked carefully, considering the role of the node (i.e. if the node is a busy web server, you may want to set the value higher). Note that, however, even with the configuration knob, it is possible for attackers to transmit a lot of bogus IPv4 fragmented packets, and prevent other fragmented IPv4 traffic from getting reassembled. Unfragmented IPv4 communication will be kept safe by the variable. Systems running NetBSD-current dated from before April 17, 2001 should be upgraded to NetBSD-current dated April 17, 2001 or later. Systems running NetBSD 1.5.x systems dated from before April 24, 2001 should be upgraded to NetBSD 1.5.x dated April 24, 2001 or later. NetBSD 1.5.1 will ship with the fix. There is no fix to 1.4.x available at this time. (2) Increase the kernel option NMBCLUSTERS Use an appropriate value for NMBCLUSTERS for the node. Normally, it is the cluster mbufs which go into a starvation state with this attack. By setting NMBCLUSTERS to a higher value, you may be able to prevent the mbuf memory pool from starving. Note that a couple of NetBSD device drivers pre-allocate cluster mbufs within the driver, for performance reasons and DMA management reasons. For example, the fxp driver pre-allocates 64 cluster mbufs per interface. If you are using such network cards, you will want to raise NMBCLUSTERS even more. Thanks To ========= James Thomas for bringing this problem to our attention, and Jun-ichiro Hagino for providing a fix for the problem. Revision History ================ 2001-05-29 - Initial Release More Information ================ An up-to-date PGP signed copy of this release will be maintained at ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2001-006.txt.asc Information about NetBSD and NetBSD security can be found at http://www.NetBSD.ORG/ and http://www.NetBSD.ORG/Security/. Copyright 2001, The NetBSD Foundation, Inc. All Rights Reserved. $NetBSD: NetBSD-SA2001-006.txt,v 1.7 2001/05/29 05:58:41 lukem Exp $ - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.5 (NetBSD) Comment: For info see http://www.gnupg.org iQCVAwUBOxM/fz5Ru2/4N2IFAQGTpQP/bG+a2FXaX8Z0i2SgE5ybx5h4FSemmazW iy/k+XkXnvQck+WDuRdHx6PtbQvLA203CRjGWDu7XkLEGDa6J3hgVQ2v0559BAyF KI3J0a4kh9RIo7rP6MRKQPaYH9N9EUtfrws7TFIibK9RVi2RebcIMaaKdvq0+EgO ElwTeh1cADc= =POjn - -----END PGP SIGNATURE----- - --------------------------END INCLUDED TEXT-------------------- You have received this e-mail bulletin as a result of your organisation's registration with AusCERT. The mailing list you are subscribed to is maintained within your organisation, so if you do not wish to continue receiving these bulletins you should contact your local IT manager. If you do not know who that is, please send an email to auscert@auscert.org.au and we will forward your request to the appropriate person. This security bulletin is provided as a service to AusCERT's members. As AusCERT did not write the document quoted above, AusCERT has had no control over its content. The decision to use any or all of this information is the responsibility of each user or organisation, and should be done so in accordance with site policies and procedures. NOTE: This is only the original release of the security bulletin. It may not be updated when updates to the original are made. If downloading at a later date, it is recommended that the bulletin is retrieved directly from the original authors to ensure that the information is still current. Contact information for the authors of the original document is included in the Security Bulletin above. If you have any questions or need further information, please contact them directly. Previous advisories and external security bulletins can be retrieved from: http://www.auscert.org.au/Information/advisories.html If you believe that your system has been compromised, contact AusCERT or your representative in FIRST (Forum of Incident Response and Security Teams). Internet Email: auscert@auscert.org.au Facsimile: (07) 3365 7031 Telephone: (07) 3365 4417 (International: +61 7 3365 4417) AusCERT personnel answer during Queensland business hours which are GMT+10:00 (AEST). On call after hours for emergencies. -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key iQCVAwUBOxZX8Sh9+71yA2DNAQEsXwP8C0Ts36bB2zhDWxvG9U0kkXPDidXC5Y87 +m2IDQX8MhpVibJY7zInR05KH7SgmhE/yi1qgU5rzTF1HLOpfiOu+8kVgTTNuTF6 1+9StqP+m5FDZileNq5+fMlZLo3i4FbXC234Bb5XEszlZKqSYZi/nOpSBQMKAkE/ hAG26y7QcrY= =/DdF -----END PGP SIGNATURE-----