The OpenNET Project
 
Search (keywords):  SOFT ARTICLES TIPS & TRICKS SECURITY
LINKS NEWS MAN DOCUMENTATION


[UNIX] Linux Kernel NetFilter DoS


<< Previous INDEX Search src / Print Next >>
From: SecuriTeam <support@securiteam.com.>
To: [email protected]
Date: 7 Jun 2006 10:25:46 +0200
Subject: [UNIX] Linux Kernel NetFilter DoS
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20060607170848.15C005743@mail.tyumen.ru.>
X-Virus-Scanned: antivirus-gw at tyumen.ru

The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html 

- - - - - - - - -




  Linux Kernel NetFilter DoS
------------------------------------------------------------------------


SUMMARY

Improper handling of memory with Linux SNMP allows attackers to crash 
NetFilter.

DETAILS

Vulnerable Systems:
 * Linux kernel version 2.6.16.17 and prior

Immune Systems:
 * Linux Kernel version 2.6.16.18

The corruption can be triggered remotely when the ip_nat_snmp_basic module 
is loaded and traffic on port 161 or 162 is NATed.

The vulnerability will happen when:
 * When snmp_trap_decode fails before the id and address are allocated, 
the pointers contain random memory, but are freed by the caller 
(snmp_parse_mangle).
 * When snmp_trap_decode fails after allocating just the ID, it tries to 
free both address and ID, but the address pointer still contains random 
memory. The caller frees both ID and random memory again.
 * When snmp_trap_decode fails after allocating both, it frees both, and 
the callers frees both again.

Vulnerable Code:
--- net/ipv4/netfilter/ip_nat_snmp_basic.c
+ net/ipv4/netfilter/ip_nat_snmp_basic.c
@@ -1000,12 +1000,12 @@ static unsigned char snmp_trap_decode(st
return 1;
+err_addr_free:
+ kfree((unsigned long *)trap->ip_address);
+
err_id_free:
kfree(trap->id);
-err_addr_free:
- kfree((unsigned long *)trap->ip_address);
-
return 0;
}
@@ -1123,11 +1123,10 @@ static int snmp_parse_mangle(unsigned ch
struct snmp_v1_trap trap;
unsigned char ret = snmp_trap_decode(&ctx, &trap, map, check);
- /* Discard trap allocations regardless */
- kfree(trap.id);
- kfree((unsigned long *)trap.ip_address);
-
- if (!ret)
+ if (ret) {
+ kfree(trap.id);
+ kfree((unsigned long *)trap.ip_address);
+ } else
return ret;
} else {

Vendor Status:
The vendor has issued a fix in Kernel 2.6.16.18

CVE Information:
 <http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-2444>; 
CVE-2006-2444


ADDITIONAL INFORMATION

The information has been provided by  <mailto:alex@ecl-labs.org.> ECL Labs.
The original article can be found at:  <http://ecl-labs.org/>; 
http://ecl-labs.org/




This bulletin is sent to members of the SecuriTeam mailing list. To unsubscribe from the list, send mail with an empty subject line and body to: [email protected] In order to subscribe to the mailing list, simply forward this email to: [email protected]

DISCLAIMER: The information in this bulletin is provided "AS IS" without warranty of any kind. In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.

<< Previous INDEX Search src / Print Next >>



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру