NASM Error Preprocessor Directive Buffer Overflow Vulnerability

BID:11991

Info

NASM Error Preprocessor Directive Buffer Overflow Vulnerability

Bugtraq ID: 11991
Class: Boundary Condition Error
CVE: CVE-2004-1287
Remote: Yes
Local: No
Published: Dec 15 2004 12:00AM
Updated: Jul 12 2009 09:26AM
Credit: Discovery is credited to Jonathan Rockway.
Vulnerable: Turbolinux Turbolinux Server 10.0
Turbolinux Turbolinux Server 8.0
Turbolinux Turbolinux Desktop 10.0
Turbolinux Home
SGI ProPack 3.0
Redhat Enterprise Linux WS 4
Redhat Enterprise Linux WS 3
Redhat Enterprise Linux WS 2.1 IA64
Redhat Enterprise Linux WS 2.1
Redhat Enterprise Linux ES 4
Redhat Enterprise Linux ES 3
Redhat Enterprise Linux ES 2.1 IA64
Redhat Enterprise Linux ES 2.1
Redhat Enterprise Linux AS 4
Redhat Enterprise Linux AS 3
Redhat Enterprise Linux AS 2.1 IA64
Redhat Enterprise Linux AS 2.1
Redhat Desktop 4.0
Redhat Desktop 3.0
Redhat Advanced Workstation for the Itanium Processor 2.1 IA64
Redhat Advanced Workstation for the Itanium Processor 2.1
NASM NASM 0.98.38
+ Gentoo Linux 1.4
+ Gentoo Linux
+ Mandriva Linux Mandrake 10.1 x86_64
+ Mandriva Linux Mandrake 10.1
+ Mandriva Linux Mandrake 10.0 AMD64
+ Mandriva Linux Mandrake 10.0
+ Redhat Fedora Core3
NASM NASM 0.98.34
+ Turbolinux Home
+ Turbolinux Turbolinux Desktop 10.0
+ Turbolinux Turbolinux Server 10.0
+ Turbolinux Turbolinux Server 8.0
NASM NASM 0.98.28
+ Debian Linux 3.0 sparc
+ Debian Linux 3.0 s/390
+ Debian Linux 3.0 ppc
+ Debian Linux 3.0 mipsel
+ Debian Linux 3.0 mips
+ Debian Linux 3.0 m68k
+ Debian Linux 3.0 ia-64
+ Debian Linux 3.0 ia-32
+ Debian Linux 3.0 hppa
+ Debian Linux 3.0 arm
+ Debian Linux 3.0 alpha
+ Debian Linux 3.0
Not Vulnerable:

Discussion

NASM Error Preprocessor Directive Buffer Overflow Vulnerability

NASM is prone to a buffer overflow. This condition is exposed when the application attempts to assemble a source file that contains malformed '%error' preprocessor directive arguments. Since the source file may originate from an external or untrusted source, this vulnerability is considered remote in nature.

Successful exploitation will permit arbitrary code execution with the privileges of the user running the application.

Exploit / POC

NASM Error Preprocessor Directive Buffer Overflow Vulnerability

The following example exploit has been published:

Solution / Fix

NASM Error Preprocessor Directive Buffer Overflow Vulnerability

Solution:
SGI has released an advisory 20050502-01-U including updated SGI ProPack 3 Service Pack 5 packages to address this BID and other issues. Please see the referenced advisory for more information.

Fedora advisory FEDORA-2005-322 for Fedora Core 3 is available to address this issue. Fixes may be installed using the Red Hat Update Agent; this can be accomplished using the 'up2date' command. Please see the referenced advisory for more information.

Turbolinux has released a security announcement (TLSA- 24022005) and fixes to address this and other vulnerabilities. Customers are advised to peruse the referenced advisory for further information regarding obtaining and applying appropriate updates.

Gentoo Linux has released an advisory (GLSA 200412-20) dealing with this issue. All NASM users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-lang/nasm-0.98.38-r1"

For more information, please see the referenced Gentoo Linux advisory.

Ubuntu has released an advisory USN-45-1 to address this issue. Please see the referenced advisory for more information.

Debian has released advisory DSA 623-1 to address this issue. Please see the attached advisory for further information on obtaining and applying fixes.

Mandrake has released advisory MDKSA-2005:004 to address this issue. Please see the attached advisory for details on obtaining and appying fixes.

RedHat has released advisory RHSA-2005:381-06 to address this issue. Please see the attached advisory for details on obtaining and appying fixes.


NASM NASM 0.98.28

NASM NASM 0.98.34

NASM NASM 0.98.38

References

NASM Error Preprocessor Directive Buffer Overflow Vulnerability

References:

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report