[Bug dynamic-link/31230] PLT rewrite failed without SELinux
cvs-commit at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Mon Jan 15 14:59:41 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31230
--- Comment #2 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=457bd9cf2e27550dd66b2d8f3c5a8dbd0dfb398f
commit 457bd9cf2e27550dd66b2d8f3c5a8dbd0dfb398f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Jan 12 10:19:41 2024 -0800
x86-64: Check if mprotect works before rewriting PLT
Systemd execution environment configuration may prohibit changing a memory
mapping to become executable:
MemoryDenyWriteExecute=
Takes a boolean argument. If set, attempts to create memory mappings
that are writable and executable at the same time, or to change existing
memory mappings to become executable, or mapping shared memory segments
as executable, are prohibited.
When it is set, systemd service stops working if PLT rewrite is enabled.
Check if mprotect works before rewriting PLT. This fixes BZ #31230.
This also works with SELinux when deny_execmem is on.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list