From c6f07ee19fd78acd8a04700388684c09a1cb604c Mon Sep 17 00:00:00 2001 From: Kenny MacDermid Date: Wed, 2 Aug 2023 19:12:49 -0300 Subject: [PATCH] Disable executable stacks on assembly objects (#2071) Add `--noexecstack` to the assembler flags so the resulting binary will link with a non-executable stack. Fixes zerotier/ZeroTierOne#1179 Co-authored-by: Joseph Henry --- make-linux.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/make-linux.mk b/make-linux.mk index 94bbe0dbb..48d44a048 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -357,6 +357,9 @@ endif override CFLAGS+=-fPIC -fPIE override CXXFLAGS+=-fPIC -fPIE +# Non-executable stack +override ASFLAGS+=--noexecstack + .PHONY: all all: one