HardenedBSD/lib
Maxim Sobolev 7fd852f860 This seems like a very trivial bug that should have been squashed a long
time ago, but for some reason it was not. Basically, without this change
dlopen(3)'ing an empty .so file would just cause application to dump core
with SIGSEGV.

Make sure the file has enough data for at least the ELF header before
mmap'ing it.

Add a test case to check that dlopen an empty file return an error.

There were a separate discussion as to whether it should be SIGBUS
instead when you try to access region mapped from an empty file,
but it's definitely SIGSEGV now, so if anyone want to check that please
be my guest.
Reviewed by:	mjg, cem
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5112
2016-01-30 04:16:05 +00:00
..
atf
clang Disable -mlong-calls for the clang libraries for now, it increases the 2016-01-21 12:59:54 +00:00
csu Remove the compat code to handle the kernel passing us an unalinged 2016-01-13 15:54:17 +00:00
lib80211
libalias
libarchive
libauditd
libbegemot
libblocksruntime
libbluetooth Declare bt_devenum() to match the definition. 2016-01-29 00:59:48 +00:00
libbsdstat
libbsm
libbsnmp
libbz2
libc This seems like a very trivial bug that should have been squashed a long 2016-01-30 04:16:05 +00:00
libc_nonshared
libc++ Set -mlong-calls where needed to get a static clang and lldb 3.8.0 2016-01-14 19:00:13 +00:00
libcalendar
libcam
libcapsicum
libcasper
libclang_rt Upgrade our copies of clang and llvm to 3.7.1 release. This is a 2015-12-25 21:39:45 +00:00
libcom_err
libcompat
libcompiler_rt
libcrypt Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c 2015-12-27 17:33:59 +00:00
libcuse Make CUSE usable with platforms where the size of "unsigned long" is 2015-12-22 09:55:44 +00:00
libcxxrt
libdevctl
libdevinfo Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
libdevstat
libdpv Fix fatal warn when compiling under GCC 5.2.0 2016-01-27 15:28:23 +00:00
libdwarf
libedit
libefi
libelf
libelftc Use MAN= to specify that no man page is provided 2016-01-22 21:33:27 +00:00
libevent
libexecinfo
libexpat
libfetch Test for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH 2016-01-19 15:02:37 +00:00
libfigpar
libgeom
libgpio
libgssapi Fix a memory leak in gss_release_oid_set 2016-01-04 17:42:12 +00:00
libiconv_modules
libipsec
libjail
libkiconv
libkvm Add mmu format info into ARM vmcore. 2016-01-15 18:53:06 +00:00
libldns
liblzma
libmagic
libmd Improvements to the MDXFileChunk() template function: 2016-01-14 21:08:23 +00:00
libmemstat
libmilter
libmp
libmt
libnandfs
libnetbsd
libnetgraph
libngatm
libnv Remove free'ing of an uninitialized variable 2016-01-04 03:34:22 +00:00
libopenbsd
libopie
libpam Update for API changes in OpenSSH 6.8p1. 2016-01-20 00:26:50 +00:00
libpcap
libpjdlog
libpmc
libproc Add support for RISC-V ISA. 2016-01-24 12:10:29 +00:00
libprocstat
libradius
librpcsec_gss
librpcsvc
librt
librtld_db
libsbuf
libsdp
libsm
libsmb
libsmdb
libsmutil
libsqlite3
libstand Bring in initial libc and libstand support for RISC-V. 2016-01-17 15:21:23 +00:00
libstdbuf
libstdthreads
libsysdecode Add a SYSDECODE_ABI_ prefix to the ABI enums to avoid potential collisions. 2016-01-30 01:00:54 +00:00
libtacplus
libtelnet
libthr Add pthread MD part for RISC-V. 2016-01-27 14:10:50 +00:00
libthread_db Add the RISC-V MD parts of libthread_db. 2016-01-27 10:34:07 +00:00
libucl
libufs
libugidfw
libulog
libunbound
libusb
libusbhid
libutil
libvgl
libvmmapi
libwrap
libxo
liby
libypclnt
libz
msun Add fenv.c for RISC-V. Copied from MIPS. 2016-01-26 14:40:41 +00:00
ncurses
tests
Makefile Style. 2016-01-25 10:44:10 +00:00
Makefile.inc