NASM Stack-Based Buffer Overflow Vulnerability in Version 2.17rc0

Vulnerability

A stack-based buffer overflow vulnerability has been identified in NASM (Netwide Assembler) version 2.17rc0. The issue arises in the 'assemble_file' function within 'nasm.c', where insufficient bounds checking allows for writing beyond the limits of a stack-allocated buffer. This vulnerability can be exploited locally, leading to stack memory corruption that may cause a program crash or potentially allow for arbitrary code execution.

Impact

Exploitation of this vulnerability causes a stack-based buffer overflow, which can corrupt adjacent stack memory, potentially overwriting critical data such as return addresses. This stack corruption can lead to a program crash or, in some cases, arbitrary code execution.

Reproduction

The vulnerability can be reproduced by compiling NASM with AddressSanitizer enabled and then executing it with a malformed assembly file that triggers the buffer overflow. The AddressSanitizer will report the stack-buffer-overflow error, indicating that the vulnerability has been successfully exploited.

Added: Aug 11, 2025, 1:23 PM
Updated: Aug 11, 2025, 1:23 PM

Vulnerability Rating

Custom Algorithm
spread
2.4
impact
0.6
exploitability
6.0
remediation
0.0
relevance
0.3
threat
6.4
urgency
2.9
incentive
0.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.