Commit Graph
18 Commits
Author SHA1 Message Date
Nikos Mavrogiannopoulos 639514d1e1 seccomp: allow _newselect since it is called in x86 instead of select 2015-01-30 00:41:26 +01:00
Nikos Mavrogiannopoulos 30bcf35576 Revert "license upgraded to GPLv3"
This reverts commit 213f9a63ee.

Conflicts:
	configure.ac
2014-09-24 11:34:15 +02:00
Nikos Mavrogiannopoulos 213f9a63ee license upgraded to GPLv3 2014-05-23 11:50:56 +02:00
Nikos Mavrogiannopoulos f9ce018f68 Add the clock_gettime() syscall on the list of allowed in seccomp. 2014-05-15 14:28:18 +02:00
Nikos Mavrogiannopoulos 2577f8bfa7 Allow the worker signal handlers to operate under seccomp. 2014-04-19 11:47:13 +02:00
Nikos Mavrogiannopoulos bae34112fb Added sigprocmask to the list of seccomp allowed calls. 2014-04-19 10:57:16 +02:00
Nikos Mavrogiannopoulos 0258824647 corrected program name in license 2014-04-18 16:16:31 +02:00
Nikos Mavrogiannopoulos eb5f78c748 seccomp will make the forbidden system calls to return an error. 2014-02-02 09:45:34 +01:00
Nikos Mavrogiannopoulos cfc10eec81 reduced the number of allowed ioctl() to the ones used. 2014-02-02 09:44:09 +01:00
Nikos Mavrogiannopoulos 28a2026363 updated seccomp rules. 2014-01-21 22:06:03 +01:00
Nikos Mavrogiannopoulos 85f4db201c updated license information and authors 2013-11-05 19:38:30 +01:00
Nikos Mavrogiannopoulos 5783cd760b Added gettimeofday in the list of syscalls 2013-05-23 16:58:54 +02:00
Nikos Mavrogiannopoulos 2d4ac0bb3a updated seccomp code 2013-05-22 20:16:07 +02:00
Faidon LiambotisandNikos Mavrogiannopoulos 3071bda08a Make seccomp failures non-fatal & lower log prio
Building a binary with --enable-seccomp and then running it on a < 3.5
kernel, results in seccomp_load() failing and ocserv's worker process
aborting. This might be okay-ish for users who ./configure && make
install on their own systems but it's obviously non-ideal for e.g.
distributions that need to distribute binaries.

Unfortunately there doesn't seem to be a good way (that I could find) to
check if the running kernel has seccomp -- uname/uts isn't a good
solution as Ubuntu has backported it to 3.2, custom kernels might have
CONFIG_SECCOMP=n etc.

So, this makes a tradeoff call and removes the exit_worker() call on
seccomp failures, lowers the seccomp error logs to LOG_DEBUG from
LOG_WARNING and the "could not disable system calls" to LOG_INFO from
LOG_ERR.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2013-05-16 23:01:38 +02:00
Faidon LiambotisandNikos Mavrogiannopoulos 3bfbe1a371 Workaround libseccomp bug & fix error handling
libseccomp has a bug where -EDOM is returned when seccomp_rule_add is
called for pseudo system calls (i.e. < -99). This was triggered by
adding the send() system call on my x86_64 machine. The bug seems to
have been recently (May 7th, 2013) reported and fixed on libseccomp
upstream but it will take a while to find its way to a release and
distributions.

Additionally, there was a bug on how libseccomp calls were error
handled: libseccomp functions don't actually set errno, but set errno
values in their return value instead. This resulted in the
seccomp_rule_add call above to print "could not add send to seccomp
filter: Success".

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2013-05-16 23:00:06 +02:00
Nikos Mavrogiannopoulos 3883e930c7 updated syscall list in seccomp 2013-03-15 18:42:32 +01:00
Nikos Mavrogiannopoulos 7ba28c0131 Added missing ioctl(). 2013-02-12 21:19:58 +01:00
Nikos Mavrogiannopoulos 8cba144e77 Added support for seccomp (untested) 2013-02-12 18:57:05 +01:00