CVE-2004-0138

MEDIUM4.9/ 10.0
Share:
Published: December 31, 2004 at 05:00 AM
Modified: April 3, 2025 at 01:03 AM
Source: cve@mitre.org

Vulnerability Description

The ELF loader in Linux kernel 2.4 before 2.4.25 allows local users to cause a denial of service (crash) via a crafted ELF file with an interpreter with an invalid arch (architecture), which triggers a BUG() when an invalid VMA is unmapped.

CVSS Metrics

Base Score
4.9
Severity
MEDIUM
Vector String
AV:L/AC:L/Au:N/C:N/I:N/A:C

Weaknesses (CWE)

NVD-CWE-Other
Source: nvd@nist.gov

AI Security Analysis

01 // Technical Summary

Local privilege escalation is possible on vulnerable Linux systems due to a flaw in the ELF loader. A specially crafted ELF file with an invalid architecture can cause a kernel panic, leading to a denial-of-service (DoS) condition, rendering the system unusable until rebooted.

02 // Vulnerability Mechanism

Step 1: Payload Delivery: A malicious user must upload or otherwise place a crafted ELF file onto the vulnerable system. This could be achieved through various means, such as a compromised web server or a shared file system.

Step 2: File Execution: The user attempts to execute the crafted ELF file. This triggers the kernel's ELF loader.

Step 3: Interpreter Processing: The ELF loader identifies the interpreter specified in the ELF header. The interpreter is flagged as having an invalid architecture.

Step 4: VMA Creation and Mapping: The kernel attempts to map the interpreter into memory.

Step 5: Unmapping and Crash: When the kernel attempts to unmap the invalid VMA, the BUG() is triggered, resulting in a kernel panic and system crash.

03 // Deep Technical Analysis

The vulnerability lies within the Linux kernel's ELF loader, specifically in how it handles ELF files with invalid interpreter architectures. When the kernel attempts to unmap a Virtual Memory Area (VMA) associated with the crafted ELF file, it encounters an invalid VMA due to the architecture mismatch. This triggers a BUG() call within the kernel, which is a deliberate mechanism to halt execution and signal a critical error. The root cause is a lack of proper validation of the interpreter's architecture during the ELF loading process. The kernel fails to correctly handle the invalid architecture, leading to the incorrect VMA handling and subsequent crash. This is not a memory corruption vulnerability like a buffer overflow, but rather a logic flaw in the ELF loading logic.

References & Intelligence

http://kernel.debian.net/debian/pool/main/kernel-source-2.4.17/kernel-source-2.4.17_2.4.17-1woody4_ia64.changes
Source: cve@mitre.org
http://kernel.org/pub/linux/kernel/v2.4/ChangeLog-2.4.25
Source: cve@mitre.org
http://linux.bkbits.net:8080/linux-2.4/cset%404021346f79nBb-4X_usRikR3Iyb4Vg
Source: cve@mitre.org
http://secunia.com/advisories/20162
Source: cve@mitre.org
PatchVendor Advisory
http://secunia.com/advisories/20163
Source: cve@mitre.org
PatchVendor Advisory
http://secunia.com/advisories/20202
Source: cve@mitre.org
PatchVendor Advisory
http://secunia.com/advisories/20338
Source: cve@mitre.org
http://www.debian.org/security/2006/dsa-1067
Source: cve@mitre.org
PatchVendor Advisory
http://www.debian.org/security/2006/dsa-1069
Source: cve@mitre.org
PatchVendor Advisory
http://www.debian.org/security/2006/dsa-1070
Source: cve@mitre.org
PatchVendor Advisory
http://www.debian.org/security/2006/dsa-1082
Source: cve@mitre.org
PatchVendor Advisory
http://www.redhat.com/support/errata/RHSA-2004-504.html
Source: cve@mitre.org
http://www.redhat.com/support/errata/RHSA-2004-549.html
Source: cve@mitre.org
http://www.securityfocus.com/bid/18174
Source: cve@mitre.org
https://exchange.xforce.ibmcloud.com/vulnerabilities/43124
Source: cve@mitre.org
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10123
Source: cve@mitre.org
http://kernel.debian.net/debian/pool/main/kernel-source-2.4.17/kernel-source-2.4.17_2.4.17-1woody4_ia64.changes
Source: af854a3a-2127-422b-91ae-364da2661108
http://kernel.org/pub/linux/kernel/v2.4/ChangeLog-2.4.25
Source: af854a3a-2127-422b-91ae-364da2661108
http://linux.bkbits.net:8080/linux-2.4/cset%404021346f79nBb-4X_usRikR3Iyb4Vg
Source: af854a3a-2127-422b-91ae-364da2661108
http://secunia.com/advisories/20162
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://secunia.com/advisories/20163
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://secunia.com/advisories/20202
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://secunia.com/advisories/20338
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.debian.org/security/2006/dsa-1067
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://www.debian.org/security/2006/dsa-1069
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://www.debian.org/security/2006/dsa-1070
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://www.debian.org/security/2006/dsa-1082
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://www.redhat.com/support/errata/RHSA-2004-504.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.redhat.com/support/errata/RHSA-2004-549.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.securityfocus.com/bid/18174
Source: af854a3a-2127-422b-91ae-364da2661108
https://exchange.xforce.ibmcloud.com/vulnerabilities/43124
Source: af854a3a-2127-422b-91ae-364da2661108
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10123
Source: af854a3a-2127-422b-91ae-364da2661108
CVE-2004-0138 - MEDIUM Severity (4.9) | Free CVE Database | 4nuxd