This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] libffi.so.6 in libffi-3.1 is built with execstacks because of missing GNU stack marking in win32.S


Downstream report you should read,
http://bugs.gentoo.org/show_bug.cgi?id=511634

Basically Makefile's are always including src/x86/win32.S even on a
non-windows system, and win32.S is missing the GNU stack
marking other files already have:

Makefile.am has:

if X86
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S src/x86/win32.S
endif

and it doesn't have the

#if defined __ELF__ && defined __linux__
    .section        .note.GNU-stack,"",@progbits
#endif

other files like sysv.S, unix64.S, freebsd.S, already have

The attached patch fixes the executable stack in libffi.so.6
http://bugs.gentoo.org/511634

--- src/x86/win32.S
+++ src/x86/win32.S
@@ -1304,3 +1304,6 @@
 
 #endif /* !_MSC_VER */
 
+#if defined __ELF__ && defined __linux__
+	.section        .note.GNU-stack,"",@progbits
+#endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]