nasm/asm
H. Peter Anvin (Intel) 7bc82e7daf asm/nasm.c: fix use-after-free for -M* options in -@ files
-M* options in response files would hold on to a pointer to the new
value, but in response files that is not a persistent buffer. Make
sure to make a copy instead.

This uses the new nasm_str[dup]to() helpers.

(Note that calling nasm_free() on a NULL pointer is guaranteed safe.)

Reported-by: <BreakingBad6@github.com>
Fixes: https://github.com/netwide-assembler/nasm/issues/222
Fixes: CVE-2026-6068
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2026-06-26 17:35:33 -07:00
..
asmutil.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
assemble.c asm/assemble.c: remove unused variable this_good 2026-06-04 10:51:49 -07:00
assemble.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
directiv.c directiv.c: correct the parsing of $-symbols in directives, again 2026-06-26 14:11:19 -07:00
directiv.dat directives: correctly handle quoted strings in directives 2025-10-10 10:41:09 -07:00
error.c error: factor out error functions into separate files 2025-11-07 14:42:33 -08:00
eval.c fix memory leak in eval_strfunc 2025-10-06 14:50:40 -07:00
eval.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
exprdump.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
exprlib.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
floats.c Warnings: disaggregate from source and tidy up documentation 2025-10-04 13:46:39 -07:00
floats.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
getbool.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
labels.c asm/labels: fix memory leak in local label structures 2026-06-25 15:13:47 -07:00
listing.c listing: move LIST_* enums to listing.h 2026-03-04 14:14:02 -08:00
listing.h listing: move LIST_* enums to listing.h 2026-03-04 14:14:02 -08:00
nasm.c asm/nasm.c: fix use-after-free for -M* options in -@ files 2026-06-26 17:35:33 -07:00
parser.c parser: fix invalid segment override on EQU FAR pointers 2026-06-25 15:11:05 -07:00
parser.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
pptok.dat treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
pptok.pl treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
pragma.c labels: make the prefix/suffix options and pragmas consistent 2025-10-07 18:46:39 -07:00
preproc.c preproc: ensure forward process in %clear loop 2026-06-11 14:40:01 -07:00
preproc.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
quote.c Add \^ escape sequences for Ctrl characters 2026-04-09 18:08:21 -07:00
quote.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
rdstrnum.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
segalloc.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
srcfile.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
srcfile.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
stdscan.c Warnings: disaggregate from source and tidy up documentation 2025-10-04 13:46:39 -07:00
stdscan.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
strfunc.c treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
tokens.dat treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
tokhash.pl treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
uncompress.c zlib: pass 15 not 0 to inflateInit2() 2025-11-04 00:38:17 -08:00
warnings.c Make: handle warning files while building in a directory 2023-01-17 13:05:55 -08:00
warnings.dat preproc: warn if the user tries to use %rmacro 2026-06-11 14:29:41 -07:00
warnings.pl error: factor out error functions into separate files 2025-11-07 14:42:33 -08:00