| #
2b3f93ea |
| 13-Oct-2023 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Add per-process capability-based restrictions
* This new system allows userland to set capability restrictions which turns off numerous kernel features and root accesses. These restricti
kernel - Add per-process capability-based restrictions
* This new system allows userland to set capability restrictions which turns off numerous kernel features and root accesses. These restrictions are inherited by sub-processes recursively. Once set, restrictions cannot be removed.
Basic restrictions that mimic an unadorned jail can be enabled without creating a jail, but generally speaking real security also requires creating a chrooted filesystem topology, and a jail is still needed to really segregate processes from each other. If you do so, however, you can (for example) disable mount/umount and most global root-only features.
* Add new system calls and a manual page for syscap_get(2) and syscap_set(2)
* Add sys/caps.h
* Add the "setcaps" userland utility and manual page.
* Remove priv.9 and the priv_check infrastructure, replacing it with a newly designed caps infrastructure.
* The intention is to add path restriction lists and similar features to improve jailess security in the near future, and to optimize the priv_check code.
show more ...
|
|
Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0 |
|
| #
4f048b1c |
| 07-Nov-2020 |
Sascha Wildner <saw@online.de> |
kernel: Use howmany() in a couple of places.
|
|
Revision tags: v5.8.3, v5.8.2 |
|
| #
80d831e1 |
| 25-Jul-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Refactor in-kernel system call API to remove bcopy()
* Change the in-kernel system call prototype to take the system call arguments as a separate pointer, and make the contents read-onl
kernel - Refactor in-kernel system call API to remove bcopy()
* Change the in-kernel system call prototype to take the system call arguments as a separate pointer, and make the contents read-only.
int sy_call_t (void *); int sy_call_t (struct sysmsg *sysmsg, const void *);
* System calls with 6 arguments or less no longer need to copy the arguments from the trapframe to a holding structure. Instead, we simply point into the trapframe.
The L1 cache footprint will be a bit smaller, but in simple tests the results are not noticably faster... maybe 1ns or so (roughly 1%).
show more ...
|
|
Revision tags: v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3 |
|
| #
25e27214 |
| 02-Dec-2019 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
jail: Simplify a bit by using the new BIT64 sysctl functions
- No functional changes. - The per-jail settings have been renamed to match the new capability constants. The default settings wi
jail: Simplify a bit by using the new BIT64 sysctl functions
- No functional changes. - The per-jail settings have been renamed to match the new capability constants. The default settings will be renamed soon too. - Fix a missing prison chflags check in ufs_settattr() and ext2fs_setattr().
show more ...
|
| #
7104f312 |
| 21-Aug-2019 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
jail - Rework sysctl configuration variables
- Jail sysctls are now jail-specific so that different jails can have different settings. Each jail will have its own subtree which can be operated
jail - Rework sysctl configuration variables
- Jail sysctls are now jail-specific so that different jails can have different settings. Each jail will have its own subtree which can be operated directly with sysctl(8).
Naming convention:
jail.<n>.<setting>
- All previous sysctls are now moved to 'jail.defaults' and they are used as a template for any newly created jail.
Example:
# jls JID Hostname Path IPs 2 t02.local /jails/02 10.0.0.3 1 t01.local /jails/01 10.0.0.2
# sysctl jail jail.jailed: 0 jail.list: 2 t02.local /jails/02 10.0.0.3 1 t01.local /jails/01 10.0.0.2 jail.defaults.allow_raw_sockets: 0 jail.defaults.chflags_allowed: 0 jail.defaults.sysvipc_allowed: 0 jail.defaults.socket_unixiproute_only: 1 jail.defaults.set_hostname_allowed: 1 jail.1.set_hostname_allowed: 1 jail.1.socket_unixiproute_only: 1 jail.1.sysvipc_allowed: 0 jail.1.chflags_allowed: 0 jail.1.allow_raw_sockets: 0 jail.2.set_hostname_allowed: 1 jail.2.socket_unixiproute_only: 1 jail.2.sysvipc_allowed: 0 jail.2.chflags_allowed: 0 jail.2.allow_raw_sockets: 0
# sysctl jail.2.allow_raw_sockets=1 jail.2.allow_raw_sockets: 0 -> 1
# jexec 2 ping -q -c 1 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes
--- 10.0.0.1 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.766/0.766/0.766/0.000 ms
# jexec 1 ping -q -c 1 10.0.0.1 ping: socket: Operation not permitted
# service jail stop Stopping jails: t01.local t02.local.
# sysctl jail jail.jailed: 0 jail.defaults.allow_raw_sockets: 0 jail.defaults.chflags_allowed: 0 jail.defaults.sysvipc_allowed: 0 jail.defaults.socket_unixiproute_only: 1 jail.defaults.set_hostname_allowed: 1
show more ...
|
|
Revision tags: v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc |
|
| #
282f3194 |
| 11-Jan-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Incidental MPLOCK removal
* Remove misc #include <sys/mplock2.h> statements that are no longer needed.
* Replace mplock with acct_lock in kern_acct.c
* Replace mplock with msg_token in sy
kernel - Incidental MPLOCK removal
* Remove misc #include <sys/mplock2.h> statements that are no longer needed.
* Replace mplock with acct_lock in kern_acct.c
* Replace mplock with msg_token in sysv_msg.c
* Replace mplock with p->p_token in the profiling code.
show more ...
|
|
Revision tags: v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5 |
|
| #
f3f3eadb |
| 12-Mar-2015 |
Sascha Wildner <saw@online.de> |
kernel: Move semicolon from the definition of SYSINIT() to its invocations.
This affected around 70 of our (more or less) 270 SYSINIT() calls.
style(9) advocates the terminating semicolon to be sup
kernel: Move semicolon from the definition of SYSINIT() to its invocations.
This affected around 70 of our (more or less) 270 SYSINIT() calls.
style(9) advocates the terminating semicolon to be supplied by the invocation too, because it can make life easier for editors and other source code parsing programs.
show more ...
|
|
Revision tags: v4.0.4, v4.0.3 |
|
| #
d217426c |
| 04-Jan-2015 |
Sascha Wildner <saw@online.de> |
libc/sysvipc: Constify msgsnd()'s message pointer argument (per POSIX).
Also add a comment in <sys/msg.h> that our msgrcv() should really return ssize_t.
|
|
Revision tags: v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2 |
|
| #
61871f77 |
| 27-Feb-2014 |
Sascha Wildner <saw@online.de> |
kernel: Remove {msg,sem,shm}sys() syscalls.
They have become obsolete with the recent sysvipc userland work and are not implemented in userspace either.
Thanks to marino for helping to verify that
kernel: Remove {msg,sem,shm}sys() syscalls.
They have become obsolete with the recent sysvipc userland work and are not implemented in userspace either.
Thanks to marino for helping to verify that no packages were affected by this commit.
Pointed-out-by: Mihai Carabas
show more ...
|
|
Revision tags: v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.4.3, v3.4.2, v3.4.1, v3.4.0, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0 |
|
| #
b6c57ceb |
| 05-Dec-2011 |
Sascha Wildner <saw@online.de> |
kernel: Remove some unneeded NULL checks after kmalloc() with M_WAITOK.
|
| #
86d7f5d3 |
| 26-Nov-2011 |
John Marino <draco@marino.st> |
Initial import of binutils 2.22 on the new vendor branch
Future versions of binutils will also reside on this branch rather than continuing to create new binutils branches for each new version.
|
|
Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0, v2.3.2, v2.3.1, v2.2.1, v2.2.0, v2.3.0 |
|
| #
08abcb65 |
| 03-Jan-2009 |
Matthew Dillon <dillon@apollo.backplane.com> |
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into devel
|
| #
4173863d |
| 30-Dec-2008 |
Matthias Schmidt <matthias@dragonflybsd.org> |
Merge branch 'master' of git://chlamydia.fs.ei.tum.de/dragonfly
|
| #
8a27f1c9 |
| 31-Dec-2008 |
Michael Neumann <mneumann@ntecs.de> |
Merge branches 'master' and 'suser_to_priv'
Conflicts:
sys/netinet/ip_carp.c sys/platform/pc64/amd64/machdep.c
|
| #
895c1f85 |
| 15-Dec-2008 |
Michael Neumann <mneumann@ntecs.de> |
suser_* to priv_* conversion
|
|
Revision tags: v2.1.1, v2.0.1 |
|
| #
978400d3 |
| 06-Jan-2008 |
Sascha Wildner <swildner@dragonflybsd.org> |
Remove bogus checks after kmalloc(M_WAITOK) which never returns NULL.
Reviewed-by: hasso
|
| #
c972a82f |
| 23-Dec-2006 |
Sascha Wildner <swildner@dragonflybsd.org> |
Ansify function declarations and fix some minor style issues.
In-collaboration-with: Alexey Slynko <slynko@tronet.ru>
|
| #
6ea70f76 |
| 23-Dec-2006 |
Sascha Wildner <swildner@dragonflybsd.org> |
Rename printf -> kprintf in sys/ and add some defines where necessary (files which are used in userland, too).
|
| #
efda3bd0 |
| 05-Sep-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 1
|
| #
753fd850 |
| 05-Jun-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
Modify kern/makesyscall.sh to prefix all kernel system call procedures with "sys_". Modify all related kernel procedures to use the new naming convention. This gets rid of most of the namespace ove
Modify kern/makesyscall.sh to prefix all kernel system call procedures with "sys_". Modify all related kernel procedures to use the new naming convention. This gets rid of most of the namespace overloading between the kernel and standard header files.
show more ...
|
| #
e4dfb4c8 |
| 26-May-2004 |
Hiten Pandya <hmp@dragonflybsd.org> |
Consolidate SYSCTL_DECL(_kern_ipc), move it to sys/sysctl.h as a common second-level OID.
No operational changes.
|
| #
402ed7e1 |
| 26-Aug-2003 |
Robert Garrett <rob@dragonflybsd.org> |
__P() removal
|
| #
180508ff |
| 03-Aug-2003 |
Matthew Dillon <dillon@dragonflybsd.org> |
Explicitly use an unsigned index for 'which' in shmsys(), msgsys(), and semsys(), so the implications of the use of a negative index become obvious. Fix the misdocumented 'which' UAP argument, which
Explicitly use an unsigned index for 'which' in shmsys(), msgsys(), and semsys(), so the implications of the use of a negative index become obvious. Fix the misdocumented 'which' UAP argument, which is actually signed.
Note: There is no security issue because sizeof() is unsigned but such non-explicit comparisons are a very dangerous way to code and this fixes that.
show more ...
|
| #
c7114eea |
| 30-Jul-2003 |
Matthew Dillon <dillon@dragonflybsd.org> |
syscall messaging 3: Expand the 'header' that goes in front of the syscall arguments in the kernel copy. The header was previously just an lwkt_msg. The header is now a 'union sysmsg'. 'union sysms
syscall messaging 3: Expand the 'header' that goes in front of the syscall arguments in the kernel copy. The header was previously just an lwkt_msg. The header is now a 'union sysmsg'. 'union sysmsg' contains an lwkt_msg plus space for the additional meta data required to asynchronize various system calls. We haven't actually asynchronized anything yet and will not be able to until the reply port and abort processing infrastructure is in place. See sys/sysmsg.h for more information on the new header.
Also cleanup syscall generation somewhat and add some ibcs2 stuff I missed.
show more ...
|
| #
df44673d |
| 28-Jul-2003 |
Matthew Dillon <dillon@dragonflybsd.org> |
Fix the msgsys(), semsys(), and shmsys() syscalls which were broken by the messaging code.
|