summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* all: update the version number to 2.4.3v2.4.3Tom Hromatka2020-03-021-1/+1
| | | | Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* doc: update the CHANGELOG for v2.4.3Tom Hromatka2020-03-021-0/+10
| | | | Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* doc: update the CREDITS fileTom Hromatka2020-03-021-0/+3
| | | | Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* s390: Fix multiplexing issue with shm* syscallsTom Hromatka2020-02-222-0/+32
| | | | | | | | | | | On s390, shmat, shmdt, shmget, and shmctl can be done either via sockets or ipc. Prior to this commit, the s390 code only supported these calls via sockets. This commit adds support for both sockets and ipc. Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (imported from commit 0a4c0300ebcc982cf419a4f7382ffc28e4792d2a)
* Merge pull request #205 from drakenclimber/backports/v2.4.3Tom Hromatka2020-02-0310-11/+118
|\ | | | | Backports for v2.4.3
| * tests: rely on __SNR_xxx instead of __NR_xxx for syscallsPaul Moore2020-02-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | We recently changed how libseccomp handles syscall numbers that are not defined natively, but we missed test #15. Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 1ecdddb2a5b61cf527d1f238f88a9d129239f87a) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * tools: remove static flag from the buildFabrice Fontaine2020-02-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not force static link of tools, it breaks build with: BR2_SHARED_LIBS=y Patch retrieved from https://git.buildroot.net/buildroot/tree/package/libseccomp/0001-remove-static.patch and slighly updated to work with 2.3.3 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Acked-by: Tom Hromatka <tom.hromatka@oracle.com> [PM: also removed the '-static' from the scmp_api_level build] Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 1052ec1cc15be55f679f0d93496226f247d179b4) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * travis: switch our Travis builds to Ubuntu 18.04 (Bionic Beaver)Paul Moore2020-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | Oddly, going from 16.04 to 18.04 results in about a 0.8% reduction in code coverage. Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit e5ef83b99f8cea199dde3a8407c7654e75b2ece3) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * tests: introduce a simple seccomp_load() test as part of the non-live testsPaul Moore2020-02-035-3/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a bit controversial as historically we've refrained from doing any tests that rely on the host kernel in the non-live tests, but I think enough time has past that we can do a simple seccomp_load() and not break the world's build/test platforms. The obvious big advantage is we are now testing the basic prctl()/seccomp() filter load infrastructure as part of the main regression test run. Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 3bae8850487eaad54fccbf206516b269f330b08f) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com> Conflicts: tests/.gitignore tests/Makefile.am
| * tools: fix clang problems in scmp_bpf_simPaul Moore2020-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | The clang compiler complains of a potential memory leak, this patch fixes it. Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit c46f7bfdcd038e8b36efbeff831cd497fc373394) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * api: define __SNR_ppoll againMiroslav Lichvar2020-02-031-0/+7
|/ | | | | | | | | | | | | Commit bf747eb21e428c2b3ead6ebcca27951b681963a0 accidentally removed the __SNR_ppoll definition. Add it back, using a PNR value if disabled in the kernel headers. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit e3647f5b6b52996bf30d0c2c1d1248e4182e1c1c) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
* travis: use default python instead of nightlyChristopher Waldon2020-01-201-2/+0
| | | | | | | | | | | | Previously the live python tests failed in the TravisCI environment because the nightly python version changed in a subtle way that made the `cython` install unreliable. This change reverts to a stable version of python that is able to install cython reliably. Signed-off-by: Chris Waldon <chris.waldon@ibm.com> [PM: edits to the commit description] Signed-off-by: Paul Moore <paul@paul-moore.com> (imported from commit b4493a16c9408164f0a44614d42d25f76a192289)
* travis: avoid running live python tests in TravisCIChris Waldon2020-01-202-1/+5
| | | | | | Signed-off-by: Chris Waldon <chris.waldon@ibm.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (imported from commit b9dddcc74ddabf6c281c9be44a9b0f8891ed7b45)
* doc: add a section on release tarball signatures to README.mdPaul Moore2020-01-081-0/+18
| | | | | | (imported from commit e5c4b5ee8086b936d28b080e5477950f632b4d43) Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
* tools: ensure a bpf file is specified on the command linev2.4.2Paul Moore2019-11-061-0/+2
| | | | | (imported from commit 94d42926fd67d2d4fa07031bdc6c6bf8e420a103) Signed-off-by: Paul Moore <paul@paul-moore.com>
* x86: fix a duplicated shmget/shdt line in the syscall resolution codePaul Moore2019-11-061-2/+0
| | | | | (imported from commit ac070b83a8141810c664f5b55d4270b0e180eb2c) Signed-off-by: Paul Moore <paul@paul-moore.com>
* all: update the CHANGELOG and version for v2.4.2Tom Hromatka2019-11-062-1/+12
| | | | Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* doc: update the CREDITS fileTom Hromatka2019-11-061-0/+3
| | | | Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* Merge pull request #179 from drakenclimber/issues/161-round2Tom Hromatka2019-11-0421-1209/+3240
|\ | | | | Backports to release-2.4 branch
| * arch: update the internal syscall tables to Linux v5.4-rc4Paul Moore2019-11-0417-142/+1150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is long overdue so quite a few changes, including tweaks to support some newly direct wired syscalls which were previously multiplexed. We really need to make sure we update the syscall table more often. Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit bf747eb21e428c2b3ead6ebcca27951b681963a0) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * tools: fix a problem with distcheckPaul Moore2019-11-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | We shouldn't be redefining AM_CPPFLAGS here, so get rid of it. Reported-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit ae19647048b38ad6d2ab0f2ac0db4dc1e9be1f7d) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * build: ship seccomp-syscalls.hStéphane Graber2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Without this, anything which includes "seccomp.h" will fail when using a build version of libseccomp. Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Tom Hromatka <tom.hromatka@oracle.com> [PM: tweaked the subject line] Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit c95cdadef8746f9b4c714443e74e364f8fc7f10c) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * api: stop defining __NR_x values for syscalls that don't existPaul Moore2019-11-043-1065/+2090
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically libseccomp has created a __NR_x definition for every syscall it supports, even those that aren't valid for a given ABI. While this seemed like a good idea at the time, it turned out to have some unwanted and nasty side effects. This patch finally corrects this problem. The basic approach is quite simple: move the SCMP_SYS() macro to use __SNR_x values instead of __NR_x values. The unfortunate side effect of this change is that instead of just worrying about #defines for the __PNR_x values we now have to have a __SNR_x define for *every* syscall. The good news is that after this patch that should only be a few new syscalls every year - a very manageable task. Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit bf162816a6e42d7a40e54aadc18d1a98c34ca971) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
* | Merge pull request #165 from drakenclimber/issues/161Tom Hromatka2019-08-0222-9/+199
|\ \ | |/ | | Backport various fixes to the release-2.4 branch for a v2.4.2 release
| * doc: ship the SECURITY.md filePaul Moore2019-08-021-1/+1
| | | | | | | | | | | | | | Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 2b406e3b274407ceef53fa3de9469cfbd0fd0ddb) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * python: install the python extension to the root package dirFelix Geyer2019-08-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 8ad3638ea9023c3948976dfadebd1554380a31c9 effectively added libseccomp/ to the install path of the python extension. This changed the import module name from "seccomp" to "libseccomp.seccomp", breaking existing users. Revert the install path like it was before 2.4.0 Signed-off-by: Felix Geyer <debfx@fobos.de> [PM: tweaked the subject line] Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit ff7fc73bdf4602323ce320a2094c006c9c3e4d42) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * doc: new process docs and various updatesPaul Moore2019-08-023-1/+141
| | | | | | | | | | | | | | | | | | | | | | | | A number of updates mainly focused on paving the way for multiple maintainers and making better use of the GitHub vulnerability reporting tools. Signed-off-by: Paul Moore <paul@paul-moore.com> Acked-by: Tom Hromatka <tom.hromatka@oracle.com> (cherry picked from commit 4bec773fb401433bbfbbef111a49e1d2acbc4fcf) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * arch: add support for io-uring related system calls in kernel 5.1Stephen Coleman2019-08-0213-0/+39
| | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stephen Coleman <omegacoleman@gmail.com> Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com> [PM: added the "arch:" subj prefix] Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 5fc22428507ecea00ee9e2215d972777da9a99b6) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * python: use Cython language "3str"Paul Moore2019-08-022-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the Cython language level to "3str" which is described in the Cython 0.29 changelog: "A new language level name 3str was added that mostly corresponds to language level 3, but keeps unprefixed string literals as type ‘str’ in both Py2 and Py3, and the builtin ‘str’ type unchanged. This will become the default in the next Cython release and is meant to help user code a) transition more easily to this new default and b) migrate to Python 3 source code semantics without making support for Python 2.x difficult." Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit d390edad9a8540c2e2dd0b12732cc8dd3fe1cc69) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * db: properly reset the attribute state in db_col_reset()Paul Moore2019-08-021-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 3570b5cf9acbd1711d417e08ec608eea7b83d416) [TJH: removed the SPEC_ALLOW logic since it isn't in the 2.4.x release] Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * docs: create a doc/admin directory and move RELEASE_PROCESS.md into itPaul Moore2019-08-022-1/+1
| | | | | | | | | | | | | | | | | | The idea is that any administrative/process docs should go in doc/admin. Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 3f214cbbbbd663dd4e7fe90638af4971b436ec00) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
| * docs: minor changes to the RELEASE_PROCESS.mdPaul Moore2019-08-021-1/+9
|/ | | | | | | | | | Fix some examples and add a note about deprecating older, unsupported releases. Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 0d73daf07490656130e0f5311ad12ca8818752c5) Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Paul Moore <paul@paul-moore.com>
* all: update the CHANGELOG and version for v2.4.1v2.4.1Paul Moore2019-04-172-1/+5
| | | | Signed-off-by: Paul Moore <paul@paul-moore.com>
* tests: only run test 50 on x86_64Paul Moore2019-04-171-8/+8
| | | | | | | | | | Because of the way libseccomp handles non-native arch translations we can't use arbitrary syscalls, e.g. 1000; we need to use syscalls that are defined in the libseccomp syscall tables. Unfortunately, changing the syscalls from 1000/1001 to a defined syscall appears to break the test so let's just limit it to x86_64 for now. Signed-off-by: Paul Moore <paul@paul-moore.com>
* tests: Add 50-sim-hash_collision testTom Hromatka2019-04-165-3/+184
| | | | | | | | | | | | libseccomp utilizes a hash table to manage BPF blocks. It currently employs MurmurHash3 where the key is the hashed values of the BPF instruction blocks, the accumulator start, and the accumulator end. This test was added because of a mishandled hash collision reported by Tor in GitHub issue #148. * https://github.com/seccomp/libseccomp/issues/148 Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
* bpf: add accumulator state to the instruction block hashTom Hromatka2019-04-161-3/+10
| | | | | | | | | | | | | This addresses a problem where dissimilar instruction blocks were improperly hashed to the same value because we were not taking into account the accumulator state. See the GitHub issue below for more information: * https://github.com/seccomp/libseccomp/issues/148 Reported-by: Toralf Förster <toralf.foerster@gmx.de> Signed-off-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* all: update the CHANGELOG and version for v2.4.0v2.4.0Paul Moore2019-03-142-1/+20
| | | | Signed-off-by: Paul Moore <paul@paul-moore.com>
* tests: add LT tests to 43-sim-a2_orderPaul Moore2019-03-143-5/+74
| | | | | | | We want to be able to test proper ordering for both LT and GT comparisons. Signed-off-by: Paul Moore <paul@paul-moore.com>
* tests: add 48-sim-64b_comparisonsPaul Moore2019-03-145-3/+133
| | | | | | Based on some initial tests from Jann Horn. Signed-off-by: Paul Moore <paul@paul-moore.com>
* tests: update 38-basic-pfc_coveragePaul Moore2019-03-141-30/+59
| | | | | | | | | | Based on the recent 64-bit argument comparison fixes, we need to update test 38-basic-pfc_coverage. A special thanks to Jann Horn for bringing this problem to our attention. Signed-off-by: Paul Moore <paul@paul-moore.com>
* bpf: pass the correct accumulator state to the next levelPaul Moore2019-03-141-3/+9
| | | | | | | | We were mistakenly passing the wrong accumulator state (the state at the start of the instruction block, not at the end) which was causing us to generate unnecessary load instructions. Signed-off-by: Paul Moore <paul@paul-moore.com>
* db: fix 64-bit argument comparisonsPaul Moore2019-03-142-206/+542
| | | | | | | | | | | | | Our approach to doing 64-bit comparisons using 32-bit operators was just plain wrong, leading to a number of potential problems with filters that used the LT, GT, LE, or GE operators. This patch fixes this problem and a few other related issues that came to light in the course of fixing the core problem. A special thanks to Jann Horn for bringing this problem to our attention. Signed-off-by: Paul Moore <paul@paul-moore.com>
* doc: update the CREDITS filePaul Moore2019-03-121-1/+6
| | | | Signed-off-by: Paul Moore <paul@paul-moore.com>
* tests: fix some issues found by coverityPaul Moore2019-03-122-11/+8
| | | | | | | None of these are major, and they are all part of the tests, but we should fix them regardless. Signed-off-by: Paul Moore <paul@paul-moore.com>
* system: fixup some cosmetic macro alignment issuesPaul Moore2019-03-071-4/+4
| | | | Signed-off-by: Paul Moore <paul@paul-moore.com>
* system: add LOG action to seccomp.hTycho Andersen2019-03-071-4/+8
| | | | | | | | This return code was added in 4.14, so let's reflect that here. Signed-off-by: Tycho Andersen <tycho@tycho.ws> [PM: cleanup up some duplication with the existing SECCOMP_RET_LOG code] Signed-off-by: Paul Moore <paul@paul-moore.com>
* system: update defines to match upstreamTycho Andersen2019-03-071-2/+2
| | | | | | | | | The kernel switched their defines to be more expressive like this, so let's do the same. That will make it easy in future patches to copy and paste definitions from the kernel :) Signed-off-by: Tycho Andersen <tycho@tycho.ws> Signed-off-by: Paul Moore <paul@paul-moore.com>
* db: bail on a prune operation if both trees have a prefixPaul Moore2019-03-041-0/+4
| | | | | | | If both trees have prefixes that don't match, bail on the prune operation. Signed-off-by: Paul Moore <paul@paul-moore.com>
* tests: make use of the new 32-bit test filtersPaul Moore2019-03-041-18/+18
| | | | Signed-off-by: Paul Moore <paul@paul-moore.com>
* tests: add support for 32-bit and 64-bit test filteringPaul Moore2019-03-041-0/+36
| | | | | | | Add "[+]all_32" and "[+]all_64" which work the same as the little and big endian test filters. Signed-off-by: Paul Moore <paul@paul-moore.com>