freebsd-nq/sys
Christian S.J. Peron 5090559b7f When a prison is given the ability to create raw sockets (when the
security.jail.allow_raw_sockets sysctl MIB is set to 1) where privileged
access to jails is given out, it is possible for prison root to manipulate
various network parameters which effect the host environment. This commit
plugs a number of security holes associated with the use of raw sockets
and prisons.

This commit makes the following changes:

- Add a comment to rtioctl warning developers that if they add
  any ioctl commands, they should use super-user checks where necessary,
  as it is possible for PRISON root to make it this far in execution.
- Add super-user checks for the execution of the SIOCGETVIFCNT
  and SIOCGETSGCNT IP multicast ioctl commands.
- Add a super-user check to rip_ctloutput(). If the calling cred
  is PRISON root, make sure the socket option name is IP_HDRINCL,
  otherwise deny the request.

Although this patch corrects a number of security problems associated
with raw sockets and prisons, the warning in jail(8) should still
apply, and by default we should keep the default value of
security.jail.allow_raw_sockets MIB to 0 (or disabled) until
we are certain that we have tracked down all the problems.

Looking forward, we will probably want to eliminate the
references to curthread.

This may be a MFC candidate for RELENG_5.

Reviewed by:	rwatson
Approved by:	bmilekic (mentor)
2004-08-21 17:38:57 +00:00
..
alpha Add a new type, l_uintptr_t, which is an unsigned integer type with the 2004-08-16 07:05:44 +00:00
amd64 Sync with i386 - Optimize intr_execute_handlers a bit etc. 2004-08-16 23:12:30 +00:00
arm Add __elfN(dump_thread). This function is called from __elfN(coredump) 2004-08-11 02:35:06 +00:00
boot Temporary bandaid to help sparc64 systems with ATA disks boot. Recent 2004-08-19 20:13:31 +00:00
cam Add locking to the kqueue subsystem. This also makes the kqueue subsystem 2004-08-15 06:24:42 +00:00
coda
compat I'm a dumbass: remember to initialize fh->nf_map to NULL in 2004-08-16 19:25:27 +00:00
conf Unconditionally support the AMD64 GART HW. 2004-08-19 20:58:24 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r133931, 2004-08-18 05:41:21 +00:00
crypto
ddb
dev Attempt to make the probe for hardware more specific. 2004-08-21 08:40:00 +00:00
doc
fs Release the vnode cache mutex when calling vgone(), since vgone() may 2004-08-15 21:58:02 +00:00
gdb Comment-out the debugging printf I left in in case there were some 2004-08-10 19:32:33 +00:00
geom A volume can be up if it has a degraded RAID5 plex. 2004-08-19 12:03:27 +00:00
gnu Add locking to the kqueue subsystem. This also makes the kqueue subsystem 2004-08-15 06:24:42 +00:00
i4b
i386 Unconditionally support the AMD64 GART HW. 2004-08-19 20:58:24 +00:00
ia64 The existing code fails some corner cases. Replace it with 2004-08-16 22:09:58 +00:00
isa Defer the capture of the "expected sync bits" until the first "normal" 2004-08-17 18:12:37 +00:00
isofs/cd9660
kern Don't bother calling the module event handlers from module_shutdown() 2004-08-20 21:47:48 +00:00
libkern
modules Enable build of Netgraph modules on all architectures. 2004-08-18 11:59:28 +00:00
net When a prison is given the ability to create raw sockets (when the 2004-08-21 17:38:57 +00:00
net80211
netatalk Inline umich license from COPYRIGHT to make it clear what license the 2004-08-10 03:23:05 +00:00
netatm
netgraph Align netgraph message fields ready for 64-bit (and 128 bit :-) machines. 2004-08-20 01:24:23 +00:00
netinet When a prison is given the ability to create raw sockets (when the 2004-08-21 17:38:57 +00:00
netinet6 When notifying protocol components of an event on an in6pcb, use the 2004-08-21 17:38:48 +00:00
netipsec Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD 2004-08-14 15:32:40 +00:00
netipx
netkey
netnatm
netncp
netsmb
nfs
nfs4client
nfsclient
nfsserver
opencrypto Don't acquire Giant in cryptof_close(), as the code is intended to be 2004-08-10 03:26:17 +00:00
pc98
pccard Move PNP IDs back into oldcard files 2004-08-13 06:57:31 +00:00
pci Fix aperture size detection on some ALi chipsets by only using the lowest 4 bits 2004-08-21 06:24:21 +00:00
posix4
powerpc Instead of "OpenFirmware", "openfirmware", etc. use the official spelling 2004-08-16 15:45:27 +00:00
rpc
security
sparc64 - Sync whitespace and comments with i386 GENERIC. 2004-08-16 23:23:21 +00:00
sys Rewrite of the floppy driver to make it MPsafe & GEOM friendly: 2004-08-20 15:14:25 +00:00
tools
ufs Generalize the UFS bad magic value used to determine when a filesystem 2004-08-19 11:09:13 +00:00
vm Acquire and release Giant around a call to VOP_BMAP(). (This is a 2004-08-19 02:37:12 +00:00
Makefile Add a NO_BOOT knob to prevent building the boot blocks and loader. 2004-08-19 09:54:28 +00:00