mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
elf: Add elf/check-wx-segment, a test for the presence of WX segments
Writable, executable segments defeat security hardening. The existing check for DT_TEXTREL does not catch this. hppa and SPARC currently keep the PLT in an RWX load segment.
This commit is contained in:
@@ -3,9 +3,14 @@ ifeq ($(subdir),stdlib)
|
||||
gen-as-const-headers += ucontext_i.sym
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),elf)
|
||||
# Supporting non-executable stacks on HPPA requires changes to both
|
||||
# the Linux kernel and glibc. The kernel currently needs an executable
|
||||
# stack for syscall restarts and signal returns.
|
||||
ifeq ($(subdir),elf)
|
||||
test-xfail-check-execstack = yes
|
||||
endif
|
||||
|
||||
# On hppa, the PLT is executable because it contains an executable
|
||||
# trampoline used during lazy binding.
|
||||
test-xfail-check-wx-segment = *
|
||||
|
||||
endif # $(subdir) == elf
|
||||
|
||||
Reference in New Issue
Block a user