| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
While gcc defines __SANITIZE_ADDRESS__, clang requires more verbose
tests. Add them to make the cleanup/security logic work correctly.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If alloca allocates too much stack space, program behavior is undefined,
and basically we segfault. There is no way to check whether this will
happen ahead of time, so our only choice is to switch to malloc. If we
try to allocate too much memory from the heap, we'll get a NULL pointer,
and we can diagnose & exit ourselves. Kind of sucks as alloca was a
perfect fit here, but since the size is coming directly from user input,
we can't trust it is always "reasonable".
Bug: https://bugs.gentoo.org/890579
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Use the more standard HAVE_xxx convention, and only define when
available. This avoids further confusion with code that is using
"#ifdef" already.
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
The out-of-tree patches for -fbounds-checking in GCC were great, but
they haven't been updated since the gcc-4.0 days, and the sanitizer
options have made it obsolete, so it's unlikely we'll ever use this
code again.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents new or unconventional systems requiring upstream changes,
though, this is not perfect, as it doesn't address some of the other
defines related to OSes the preprocessor does (namely, wrt the ldso
cache handling). I didn't touch these yet as I took a more conservative
approach of (probably) not changing what happens at runtime.
Signed-off-by: Arsen Arsenović <arsen@aarsen.me>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
| |
Since the bpf programs are the same across runs, generate it ahead of
time. This way we don't have to link against libseccomp and run the
library calls at runtime which helps cut out most overhead.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
By itself, this commit doesn't do anything useful. We have to update
each tool to hook into libFuzzer, so we'll do that in follow up commits.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
| |
porting.h for NetBSD.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
Rather than blindly cast everything to unsigned long (which doesn't work
when working with 64-bit ELFs on a 32-bit host), use the proper types in
all the printf statements.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
If a bad syscall is hit, it can be hard to track down. Add a debug mode
that people can enable to get useful error messages showing the failure.
URL: https://bugs.gentoo.org/558482
|
|
|
|
| |
Should prevent accidentally running set*id programs less of a problem.
|
|
|
|
|
|
|
| |
In practice this isn't terribly useful as people aren't attacking these
tools, but might as well be paranoid.
It'd be nice to use mount & net namespaces too, but they're way too slow.
|
|
|
|
|
|
|
|
|
|
|
| |
Always set up the cleanup symbol and use it at C time rather than CPP.
We can delete the warning code since we clean those strings up now.
Add ASAN support so LSAN doesn't complain either.
Fix a bug in the leak checking when the -F flag is used -- normally we
don't allocate that string but set it to one of the argv constants.
|
| |
|
| |
|
|
|
|
| |
URL: https://bugs.gentoo.org/413967
|
| |
|
|
|
|
| |
behavior to max out instead
|
| |
|
| |
|
|
|
|
| |
specific to glibc and not linux; report from Pino Toscano in deb bug 644607
|
| |
|
|
|
|
| |
happen when reading static library archives *.a)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
give them any value
|
| |
|
| |
|
| |
|
|
|
|
| |
defines so we keep sparc-linux happy
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
after ourselves
|