about summary refs log tree commit diff stats
path: root/lib/chaseccomp
Commit message (Collapse)AuthorAgeFilesLines
* Update docs HEAD masterbptato2025-05-171-3/+3
|
* buffer: drop pipe, pipe2, passFd privilegesbptato2025-01-301-2/+0
| | | | | All uses of these could be delegated to other processes with more privileges.
* buffer: remove server socketbptato2025-01-091-12/+0
| | | | | | | | | | | Now we just pass through a socket created in pager. This removes the need for a socket directory, and strengthens the buffer sandbox slightly. I've kept the ServerSocket code, because I want to add some form of RPC and communication between separate instances in the future. However, I don't expect this to be handled outside the main process, so I've removed the Capsicum-specific connectat/bindat code.
* buffer.chasc: allow reversed clone syscall signaturebptato2024-12-221-2/+6
| | | | | | | This caused buffer cloning to choke on armhf. It seems that cris and S/390 architectures also swap flags and stack; luckily, both are dead.
* chaseccomp: add CFLAGS, LDFLAGS to makefilebptato2024-12-222-1/+3
| | | | | Otherwise, it complains about missing syscalls on cross compilation. (Also, fix the warnings this revealed.)
* network.chasc: allow gettimeofday toobptato2024-11-181-0/+3
| | | | continuation of 79d832c37
* network.chasc: allow clock_gettimebptato2024-11-171-0/+6
| | | | | | | ref. https://todo.sr.ht/~bptato/chawan/23 TODO: I'm not quite sure *why* it's getting called. curls operate in mysterious ways.
* Fix some C warnings, more makefile vars, etc.bptato2024-11-082-8/+12
| | | | | | | * add some more env vars to makefile * remove fpermissive from GCC builds * update Monoucha * fix borked seccomp filter length safety check (ugh)
* chaseccomp: update docs, remove redundant importbptato2024-11-072-7/+11
|
* chaseccomp: lock down clone; fix mprotect on bionicbptato2024-11-045-10/+23
| | | | | | | | | | | * add restrictions on clone for buffer filter - hardcoded it for musl, glibc and bionic. hopefully they don't change it too soon... * remove define directive from gen_syscalls - now the arch nr check is hardcoded in gen_defs. makes things a bit less complex. * fix borked mprotect filter on bionic - this completely broke the browser.
* chaseccomp: revert parts of d9ca197ebptato2024-10-313-5/+6
| | | | | | | | | * abort on network sandbox violation - it's probably better not to, but I want to think this through a bit more before changing it for good (and then do it consistently, i.e. also for the buffer process.) * revert case variable quoting - the lack of field splitting is specified by POSIX, and the readme states that we target POSIX. no need to be paranoid about imaginary shells.
* chaseccomp: fix compilation with newest dash, misc changesbptato2024-10-316-21/+70
| | | | | | | | | | | | | | * fix matching on unstripped whitespace: caught after upgrading to upstream dash & chaseccomp wouldn't compile * add defines to ensure that we computed the filter length correctly * inline cut_label * EPERM on sigaction, sigprocmask, gettid, and kill on tgkill (so a crash doesn't trigger sandbox violations) * move SIGSYS handler to C and add one for the network The last change removes the stack trace from SIGSYS, but gives us the syscall number which is probably more useful. (Indeed, we don't even have a stack trace in release builds.)
* chaseccomp: update readmebptato2024-10-261-3/+3
|
* sandbox: replace libseccomp with chaseccompbptato2024-10-2310-0/+487
This drops libseccomp as a dependency. Also, move the capsicum/pledge definitions from bindings to sandbox.nim because they are only used there. Interestingly, after integrating chaseccomp I found that the stbi process would mysteriously crash by a getrandom(2) syscall. Closer investigation revealed it is only called on the initialization of glibc's malloc; presumably it had never surfaced before because libseccomp would always allocate before entering the sandbox. So I've added getrandom to our filter as well.