aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fuzz-dumpelf: fix stats argumentMike Frysinger2024-08-091-1/+1
| | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> (cherry picked from commit 047684a7cd651f889dd4bad41d95a8feb5717815) Signed-off-by: Sam James <sam@gentoo.org>
* fuzz-ar: fuzzer for the archive parsing APIMike Frysinger2024-08-091-0/+17
| | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> (cherry picked from commit 4bfa4576e7b64b16937f71094641ec0f39ee47c7) Signed-off-by: Sam James <sam@gentoo.org>
* tests: add basic pspax testMathias Krause2024-07-221-0/+1
| | | | | | | | Add a basic test that simply makes sure pspax executes just fine, i.e. doesn't get killed by the seccomp policy. Signed-off-by: Mathias Krause <minipli@grsecurity.net> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* ar: switch from alloca to mallocMike Frysinger2024-01-251-1/+0
| | | | | | | | | | | | | 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>
* build: use standard HAVE_xxx define styleMike Frysinger2024-01-241-3/+1
| | | | | | | | | 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>
* build: use standard config.h namingMike Frysinger2024-01-241-1/+1
| | | | | Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix fuzz-dumpelf testAliaksei Urbanski2023-11-231-1/+7
| | | | | | | | | | | | | | Not sure why, but the dumpelf.fuzz fuzzer fails when it's calling prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, ...) at security_init. So I suggest disabling seccomp for fuzzy testing. Also, in order to not run indefinitely, the fuzzer must be executed with some reasonable options. https://releases.llvm.org/14.0.0/docs/LibFuzzer.html#options Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com> Closes: https://github.com/gentoo/pax-utils/pull/13 Signed-off-by: Sam James <sam@gentoo.org>
* meson.build: release 1.3.7v1.3.7Sam James2023-01-261-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* meson: release 1.3.6v1.3.6Sam James2023-01-061-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* meson: include generated man pages in dist tarballsSam James2022-11-021-0/+2
| | | | | | | | | | | | | | | | | Meson doesn't have an idiomatic way of doing this (for once!) so we have to (per Eli Schwartz, thanks!) have: 1. a dist script which duplicates the build rule; 2. some meson.build if/else logic with fs.exists() to prefer the built manpage when using tarballs Sadly, still can't easily regenerate man pages if you apply a patch downstream though. We use Michael Stapelberg's example from the linked bug as inspiration. Bug: https://github.com/mesonbuild/meson/issues/2166 Reported-by: psykose <alice@ayaya.dev> Thanks-to: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Sam James <sam@gentoo.org>
* meson.build: prepare for 1.3.5v1.3.5Sam James2022-07-311-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Convert build system to mesonArsen Arsenović2022-07-121-0/+169
Some notes about the new build systems: - I don't fully understand the testing system, but I think I understood it well enough to implement an equivalent one. - use_seccomp could be replaced by detecting seccomp support at runtime (without support, Linux returns -EINVAL in include/linux/seccomp.h) - The fuzzing test is broken and seems to have been for a while (see commit 67f3ba64c91b5e1ac9fbbd0bc039fb8ca653cae1, it fails to fuzz on my machine) - make-tarball.sh has been replaced with meson dist - hopefully this works. meson dist should also call seccomp-bpf.c to update seccomp-bpf.h Signed-off-by: Arsen Arsenović <arsen@aarsen.me> Signed-off-by: Sam James <sam@gentoo.org>