Commit Graph

1229 Commits

Author SHA1 Message Date
Philip Papurt
32f2287fbb
net: add support for max_conns 2021-02-09 17:13:35 -05:00
Robert Swiecki
e1e80e8efa subproc: refer users to dmesg in case si_syscall==31 (SIGSYS) 2021-02-01 23:22:43 +01:00
Wiktor Garbacz
88647a0819 Fix build 2021-01-28 09:48:57 +01:00
Wiktor Garbacz
bcb467dde4 Add new capabilities, ignore unsupported caps for bounding set 2021-01-27 14:37:12 +01:00
Robert Swiecki
d3ba64756d nsjail: don't add connections to the proxy map if launching a new process failed 2020-08-30 23:22:22 +02:00
Robert Swiecki
608618ea7b subproc: kill a process once in the -Ml mode once the TCP connection has ended 2020-08-30 22:02:08 +02:00
robertswiecki
ab37bf3b40
Merge pull request #150 from joemiller/patch-1
remove build dependency on which
2020-08-26 17:02:02 +02:00
Robert Swiecki
fc02a3911c make indent 2020-08-26 16:09:55 +02:00
joe miller
27cac8ea5a
remove build dependency on which 2020-08-14 17:07:30 -07:00
robertswiecki
13f3ef0a28
Merge pull request #148 from boryspoplawski/master
Fix compilation errors on old gcc (5.4.0)
2020-08-03 22:42:28 +02:00
Robert Swiecki
a541630859 Makefile: compile kafel with -fPIE (maybe fixes #149) 2020-08-03 20:43:08 +02:00
borysp
55330be3cc Fix compilation errors on old gcc (5.4.0) 2020-07-29 15:18:10 +02:00
Robert Swiecki
7ca0657316 config.proto: make indent 2020-07-28 14:03:27 +02:00
Robert Swiecki
0a5a5296dd config.proto: renumerate config fields 2020-07-28 14:02:34 +02:00
robertswiecki
7de87aeb7d
Merge pull request #147 from disconnect3d/patch-2
Fixes #146: cgroups_mem_max unit in config.proto
2020-07-23 00:09:23 +02:00
Disconnect3d
5d103e595a
Fixes #146: cgroups_mem_max unit in config.proto
This commit fixes the incorrect cgroups_mem_max unit described in a config.proto comment.

We do not perform any calculations on this value and we don't specify the values unit (k/M/G) when writing to memory cgroup controller files, so the value is specified in bytes.
2020-07-16 14:43:43 +02:00
Robert Swiecki
f7554882fe make indent 2020-07-09 17:29:02 +02:00
Robert Swiecki
a2d5b07c76 config: remove deprecated config options 2020-07-09 17:28:56 +02:00
robertswiecki
6482720b29
Merge pull request #145 from cblichmann/master
Fix a few typos.
2020-07-07 16:52:21 +02:00
Christian Blichmann
910fb5498c
Fix a few typos.
These were found by external tooling while preparing the Debian package.

* Uknown -> Unknown
* Writting -> Writing
* commited -> committed
* processess -> processes

Signed-off-by: Christian Blichmann <mail@blichmann.eu>
2020-07-07 14:07:22 +02:00
happyCoder92
ed35c93568
Merge pull request #144 from arcz/config-deps-paths
Build-time config of newuidmap and newgidmap paths
2020-07-07 11:55:11 +02:00
Artur Cygan
74e88d92b4 Stringify CLI-passed paths 2020-07-06 14:38:11 +02:00
Artur Cygan
ba9bd3590d Build-time config of newuidmap and newgidmap paths 2020-06-22 13:42:22 +02:00
Robert Swiecki
a378ca0e96 nsjail: don't change cwd during daemon() 2020-04-21 11:25:06 +02:00
Wiktor Garbacz
6eaed88530 Fix format specifier for size_t 2020-03-27 10:19:40 +01:00
happyCoder92
868fb45bf4
Merge pull request #136 from c7f-m0d3/master
fix non-functional max_conns_per_ip
2020-03-19 13:50:35 +01:00
Piotr Krysiuk
b582491e02 fix non-functional max_conns_per_ip
Starting with nsjail::listenMode update to pipe socket traffic [commit 273ce6bc84], a pipe file descriptor is passed as connsock parameter when calling net::limitConns and also as sock parameter when calling addProc in subproc::runChild.
This breaks net::limitConns because pid.remote_addr and also local variable addr are left uninitialized despite net::connToText calls when counting number of existing network connections from the same peer.

The subsequent correction to fetch remote address [commit 2cf562160d] made the bug even more interesting, since the loop in net::limitConns now compares unsanitized content of stack with network addresses of already connected clients.
2020-03-19 00:13:28 +00:00
happyCoder92
4c524db8d2
Merge pull request #133 from sirdarckcat/master
Create dockerpush.yml
2020-03-02 15:31:37 +01:00
Eduardo' Vela" Nava (sirdarckcat)
66fa45364c
Create dockerpush.yml 2020-03-01 07:56:34 +01:00
Robert Swiecki
6912a2401f make indent 2020-02-17 20:33:45 +01:00
Wiktor Garbacz
a47123b8a7 fix POLLNVAL in pipeTraffic 2020-02-17 15:57:13 +01:00
Wiktor Garbacz
5c61521295 fix infinite loop in pipeTraffic 2020-02-17 14:40:35 +01:00
Robert Swiecki
59abcc476e subproc: debug log when hotting SIHQUIT (Ctrl+\) #2 - better check 2020-02-17 14:13:17 +01:00
Robert Swiecki
e0b941565d subproc: debug log when hotting SIHQUIT (Ctrl+\) 2020-02-17 14:11:58 +01:00
Robert Swiecki
ab8b319c13 subproc: verify that a pid in a pid map doesn't exist before inserting 2020-02-17 14:07:25 +01:00
Robert Swiecki
2cf562160d nsjail/pid/subproc: a). keep childrens' PIDs in a map indexed by pid b). correctly fetch remote IPv6 address text 2020-02-16 22:34:19 +01:00
robertswiecki
6d2503ee7b
Merge pull request #130 from happyCoder92/proxy
pipe socket traffic in and out of sandboxee
2020-02-14 17:08:41 +01:00
robertswiecki
a303054b50
Merge pull request #128 from disconnect3d/patch-2
Update Dockerfile to use ubuntu:18.04 image
2020-02-14 17:08:07 +01:00
Wiktor Garbacz
273ce6bc84 pipe socket traffic in and out of sandboxee 2020-02-14 17:07:14 +01:00
Wiktor Garbacz
b3b28b7dbf Makefile: fix kafel submodule init for parallel build 2020-01-27 10:32:10 +01:00
Robert Swiecki
04e5fae0e3 subproc: recognize CLONE_PIDFD 2019-12-10 11:09:14 +01:00
robertswiecki
8407e0be46
Merge pull request #129 from disconnect3d/patch-3
Fix default rlimit_stack value
2019-12-07 17:24:29 +01:00
Disconnect3d
7f9ed1ba12
Fix default rlimit_stack value
The default `rlimit_stack` value was set to 1048576. However, this value is in MiB and so is later multiplied by 1024*1024 in b3d544d155/config.cc (L161-L162) and it ends up as a limit of 1 TB for the stack size.

This PR changes it to 8 MB which is a more sane default or, at least I took it from my virtual machine's ulimits:
```
$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31175
max locked memory       (kbytes, -l) 16384
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 31175
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
```
2019-12-07 17:05:45 +01:00
Disconnect3d
7eeab969f9
Update Dockerfile to use ubuntu:18.04 image 2019-12-07 14:24:32 +01:00
Wiktor Garbacz
1111bb135a allow setgroups when using exclusively newgid 2019-11-01 13:42:16 +01:00
Robert Swiecki
2ca90bf208 configs/: indent 2019-10-29 01:40:52 +01:00
Robert Swiecki
a78019993f configs/znc: remove a problematic quote 2019-10-04 00:35:36 +02:00
Robert Swiecki
2c648d5879 nsjail: don't restore console if nsjail runs in background 2019-10-04 00:33:29 +02:00
Robert Swiecki
b3d544d155 config: simplify log/logfd setting 2019-10-02 19:43:58 +02:00
Robert Swiecki
0b12cedc01 configs: new config for znc - remove log_fd 2019-10-02 08:28:23 +02:00