Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134365 - Kernel: Memory corruption with NAT and SNMP (CVE-2006-2444)
Summary: Kernel: Memory corruption with NAT and SNMP (CVE-2006-2444)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL: http://git.kernel.org/?p=linux/kernel...
Whiteboard: [linux <2.6.16.18]
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-25 15:32 UTC by Harlan Lieberman-Berg (RETIRED)
Modified: 2009-07-12 12:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Compound Patch (2.4/2.6) (09-18.CVE-2006-2444.patch,2.78 KB, patch)
2006-05-28 13:45 UTC, Tim Yamin (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harlan Lieberman-Berg (RETIRED) gentoo-dev 2006-05-25 15:32:53 UTC
Copied from the kernel diff:
Fix memory corruption caused by snmp_trap_decode:

- 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.

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

Additionally, see http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4a063739138e2c4e933188d641f1593e01ce8285 
for more kernel memory leaks.
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2006-05-25 15:38:57 UTC
Main issue fixed upstream in 2.6.18 (see URL for the git diff) but the other issue (memory leak) isn't fixed in 2.6.18 so please include both patches. Dan, can you get these into genpatches please? Thanks.
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2006-05-28 13:45:22 UTC
Created attachment 87760 [details, diff]
Compound Patch (2.4/2.6)
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-05-29 05:43:22 UTC
2.6.16.18 is in genpatches
Not adding the other one as it only falls in an extremely unlikely code path (kmalloc failing)
Comment 4 Tim Yamin (RETIRED) gentoo-dev 2006-06-24 11:51:37 UTC
All fixed, closing. vapier please bump sh-sources.