[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Fix boundschecking for signal/sigaction/fork

From: grischka
Subject: Re: [Tinycc-devel] Fix boundschecking for signal/sigaction/fork
Date: Thu, 17 Sep 2020 22:28:28 +0200
User-agent: Thunderbird (Windows/20090812)

Herman ten Brugge via Tinycc-devel wrote:
+#if 0 /* does not work with fork */
     ptr = mmap (NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
     prx = mmap (NULL, size, PROT_READ|PROT_EXEC, MAP_SHARED, fd, 0);
+    ptr = prx = mmap (NULL, size, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE, fd, 0);

Might depend on what selinux features you have enabled but IIRC
alpine musl for example did not allow to run code from memory
that once was allocated as writable.

--- grischka

reply via email to

[Prev in Thread] Current Thread [Next in Thread]