summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
AgeCommit message (Collapse)Author
2003-01-17This is a project to modify executables so that they do not have anyDale Rahn
executable regions which are writable. If a section of an executable is writable and executable, it is much easier for errant code to modify the executable's behavior. Two current areas in shared library environments which have this critical problem are the GOT (Global Offset Table) and PLT (Procedure Linkage Table). The PLT is required to be executable and both GOT and PLT are writable on most architectures. On most ELF architecture machines this would cause shared libraries to have data and BSS marked as executable. Padding to the linker script for programs and shared libraries/objects to isolate the GOT and PLT into their own load sections in the executables. This allows only the text(readonly) region and the PLT region to be marked executable with the normal data and BSS not marked as executable. The PLT region is still marked executable on most architectures because the PLT lives in the "data" or "BSS" regions and the dynamic loader will need to modify it. Since the GOT and PLT should only ever be written by the dynamic linker, it will be modified to mprotect those regions so that they are not writable during normal execution. If the dynamic linker needs to modify the regions later, (eg for lazy binding), it will mprotect the region, make the necessary changes, and mprotect it back. Since it is possible to receive a signal which would interrupt the program flow and perhaps cause the dynamic linker to modify the same (or nearby) PLT references, it is now necessary for signals to be blocked for the duration of the mprotect.
2003-01-13Add a compatibilty flag '-Z' for upcoming elf changes, does nothing currentlyDale Rahn
but will produce old style executables when the other changes appear.
2003-01-06syncronous -> synchronousMiod Vallat
2003-01-06typo: s/specifed/specifiedChad Loder
2003-01-05fix for PR3053 - NULL deref when fd == NULL in first dlsym() argPeter Valchev
ok miod drahn marc
2003-01-04spellingTheo de Raadt
2003-01-04Remove the support to force linking against a specific shlib major.minor.Dale Rahn
This behavior broke libraries which were named libN-X.Y.so.A.B. ok pval, espie
2003-01-03fix typo; jmcTodd C. Miller
2002-12-31Typoes; jmc AT prioris DoT mini DoT pw DoT edu DoT plTodd C. Miller
2002-12-23Bug Fixmargarida
Update Safe module to version 2.09 millert@ ok
2002-12-19Add a second keep-locals entry to stop getopt from treating -k as anFederico G. Schwindt
abbreviation for --keep-locals. from binutils-current. millert@ ok.
2002-12-19build LYMainLoop.o -O0 as a workaround for gcc on hppaMichael Shalayeff
2002-12-13Reverse the order of a test in the loop invariant. It makes moreTodd C. Miller
sense this way and works around an apparent gcc optimizer bug on macppc related to inline functions. OK drahn@
2002-12-13Two more places where we can use the libc getopt_long() instead of GNU getopt()Todd C. Miller
2002-12-12don't link LIBCRT0 into ld.so (for DESTDIR builds); PR2928; ok fgsch@, millert@Markus Friedl
2002-12-11o Check mmap() return value against MAP_FAILED, not -1.Todd C. Miller
o Prevent close() from clobbering errno. Patch from Peter Werner; closes PR 2995
2002-12-11Remove bc/libmath.h from CLEANFILES since we don't generate it at buildTodd C. Miller
time anymore.
2002-12-10No need to disable stack protection on alpha anymore.Miod Vallat
2002-12-09We now have getopt_long() in libc, no need to build a private copy.Todd C. Miller
2002-12-09We now have getopt_long() in libc, no need to build a private copy.Todd C. Miller
2002-12-09From Andrushock, s/sucess/success/gTodd C. Miller
2002-12-08correct lcall opcode. fix provided by Hans-Joerg HoexerFederico G. Schwindt
<hshoexer at yerbouti dot franken dot de> via pr/3014. mickey@ and weingart@ ok.
2002-12-08getopt returns -1, not EOFTodd C. Miller
2002-12-03bc can now use the libc getoptTodd C. Miller
2002-12-03Don't generate libmath.h in the obj dir each time we build since itTodd C. Miller
is already in the src dir. miod@ OK
2002-12-03Temporarily disable stack protection on alpha, it breaks fbc if compiledMiod Vallat
with optimization.
2002-12-03Crank all library major numbers. Needed due to the fact that weTodd C. Miller
now build libraries with propolice enabled. Without this, existing binaries (such as ports/packages) that link with any system library other than libc will fail with an undefined symbol of "___guard" (__guard on ELF). Pointed out by markus@ and discussed with deraadt@
2002-12-02KNF; openbsd@davidkrause.comTheo de Raadt
2002-12-02xstrdup the return value of basename() before recording it in the bfd,Peter Valchev
fixes the "NEEDED crtend.o" problem that appeared in varios ports and had to be workarounded. from thorpej@NetBSD, thanks to drahn@ for pointing it out; ok drahn espie
2002-12-02Import propolice (http://www.trl.ibm.com/projects/security/ssp), a stackMiod Vallat
attack protection scheme, into gcc. This protection is enabled by default. It can be turned off by using the -fno-stack-protector flag. Code by Hiroaki Etoh (etoh at jp dot ibm dot com); work on openbsd-specific integration by fgsch@, deraadt@ and myself; tests by fgsch@, naddy@ and myself; beer drinking by myself. Please note that system upgrades with this new code will require a new libc and ld.so to be build and installed before the propolice-enabled compiler can be installed.
2002-11-29do not redefine NULLTheo de Raadt
2002-11-27Kill some alloca. Reduces temp allocation for big static libraries drastically,Marc Espie
allow, e.g., linking against static debug qt (or debug static mozilla for that matter). okay miod@
2002-11-25Fix URL CRLF Injection bug.margarida
-- A CRLF injection vulnerability has been reported for Lynx that may allow an attacker to include extra HTTP headers when viewing web pages. If Lynx is called from the command line, carriage return and line feed (CRLF) characters may be included in the specified URL. These characters are not escaped when the input is used to construct a HTTP request. URL: http://www.flora.org/lynx-dev/html/month082002/msg00211.html henning@ fgs@ pjanzen@ pvalchev@ ok
2002-11-18More printf format paranoia; noticed by David KrauseTodd C. Miller
2002-11-06Fix obnoxious makeinfo warnings during build.Miod Vallat
2002-11-05-bytes_in/_out and total_in/_out are off_t, not long. fixes a few displayingHenning Brauer
problems with files > 2GB. -print bytes in/out to stderr in verbose mode ok millert@ fgsch@
2002-11-04Put back the bits disabling setre[ug]id(). Perl will use setres[ug]idTodd C. Miller
instead so we don't need to use the (emulated) setre[ug]id() in libc.
2002-11-03Back out a local OpenBSD change I adapted from a 5.6.1 change.Todd C. Miller
I don't think it is needed anymore and it breaks MM_Unix's prefixify test.
2002-11-03The regex used in ExtUtils-MakeMaker-6.05 to check for pod didn't matchTodd C. Miller
=head[1-4] correctly.
2002-11-02Don't try to process inline functions; fixes a problem parsingTodd C. Miller
macros.h on vax (noticed by hugh).
2002-10-31MakeMaker now appears to try to install pod pages in $installman{1,3}dir.Todd C. Miller
However, we define that to the empty string in OpenBSD since we want to format and install perl's man pages ourselves. As a result, man pages were not being generated from .pm files in 3rd party modules. To fix this, go back to the older behavior of using $inst_man{1,3}dir. Also, while I'm in here, improve the regexp for deciding what consists of pod, based on ExtUtils-MakeMaker-6.05.
2002-10-30No longer need to override Configure results for setr[ug]id() andTodd C. Miller
setre[ug]id().
2002-10-27The 5.8.0 import didn't bring this file back to life; do it by hand.Todd C. Miller
2002-10-27Resolve conflicts, remove old files, merge local changesTodd C. Miller
2002-10-27stock perl 5.8.0 from CPANTodd C. Miller
2002-10-25%ul -> %luCamiel Dobbelaar
submitted to perlbug@ ok millert@
2002-10-21make it compile through the gdb, still needs more work; fgsch@ okMichael Shalayeff
2002-10-08fix two incorrect L<> calls; ok millert@Wilbern Cobb
2002-10-04since we lndir the sources we do not need the .CURDIR in the toke depsMichael Shalayeff
2002-10-04put cpp flags into CPPFLAGS, not CFLAGS.Michael Shalayeff
do the lndir once (like apache, for example), depend on ${.OBJDIR}/config.over . make separate rules for the toke.*o, since gcc blows on it on some platforms (hppa for now). would be just nice if smth like this worked, but it does not: .if make(toke.o) CFLAGS+=-O0 .endif millert@ ok