CVE Vulnerabilities

CVE-2004-0427

Missing Release of Memory after Effective Lifetime

Published: Jul 07, 2004 | Modified: Jan 26, 2024
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
2.1 LOW
AV:L/AC:L/Au:N/C:N/I:N/A:P
RedHat/V2
RedHat/V3
Ubuntu
UNTRIAGED

The do_fork function in Linux 2.4.x before 2.4.26, and 2.6.x before 2.6.6, does not properly decrement the mm_count counter when an error occurs after the mm_struct for a child process has been activated, which triggers a memory leak that allows local users to cause a denial of service (memory exhaustion) via the clone (CLONE_VM) system call.

Weakness

The product does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory.

Affected Software

Name Vendor Start Version End Version
Linux_kernel Linux 2.4.0 (including) 2.4.26 (excluding)
Linux_kernel Linux 2.6.0 (including) 2.6.6 (excluding)
Red Hat Enterprise Linux 3 RedHat kernel-0:2.4.21-15.0.2.EL *
Red Hat Enterprise Linux AS (Advanced Server) version 2.1 RedHat *
Red Hat Linux Advanced Workstation 2.1 RedHat *
Kernel-source-2.4.27 Ubuntu dapper *
Kernel-source-2.4.27 Ubuntu edgy *

Potential Mitigations

  • Choose a language or tool that provides automatic memory management, or makes manual memory management less error-prone.
  • For example, glibc in Linux provides protection against free of invalid pointers.
  • When using Xcode to target OS X or iOS, enable automatic reference counting (ARC) [REF-391].
  • To help correctly and consistently manage memory when programming in C++, consider using a smart pointer class such as std::auto_ptr (defined by ISO/IEC ISO/IEC 14882:2003), std::shared_ptr and std::unique_ptr (specified by an upcoming revision of the C++ standard, informally referred to as C++ 1x), or equivalent solutions such as Boost.

References