freebsd-dev/sys
Robert Watson 6c67b8b695 When the access control on creating raw sockets was modified so that
processes in jail could create raw sockets, additional access control
checks were added to raw IP sockets to limit the ways in which those
sockets could be used.  Specifically, only the socket option IP_HDRINCL
was permitted in rip_ctloutput().  Other socket options were protected
by a call to suser().  This change was required to prevent processes
in a Jail from modifying system properties such as multicast routing
and firewall rule sets.

However, it also introduced a regression: processes that create a raw
socket with root privilege, but then downgraded credential (i.e., a
daemon giving up root, or a setuid process switching back to the real
uid) could no longer issue other unprivileged generic IP socket option
operations, such as IP_TOS, IP_TTL, and the multicast group membership
options, which prevented multicast routing daemons (and some other
tools) from operating correctly.

This change pushes the access control decision down to the granularity
of individual socket options, rather than all socket options, on raw
IP sockets.  When rip_ctloutput() doesn't implement an option, it will
now pass the request directly to in_control() without an access
control check.  This should restore the functionality of the generic
IP socket options for raw sockets in the above-described scenarios,
which may be confirmed with the ipsockopt regression test.

RELENG_5 candidate.

Reviewed by:	csjp
2004-10-12 16:47:25 +00:00
..
alpha Rework how we store process times in the kernel such that we always store 2004-10-05 18:51:11 +00:00
amd64 MFi386: sync with latest updates 2004-10-11 21:51:27 +00:00
arm Use a default MD_ROOT_SIZE of 65535. 2004-10-11 14:42:06 +00:00
boot Back out changes which were introduced to delay mounting root file system. 2004-10-05 11:26:43 +00:00
cam Add necessary data structures and definitions for the 12-byte SCSI 2004-10-12 08:55:02 +00:00
coda Do not use devsw() but si_devsw direction. This is still bogus but a 2004-09-23 12:19:24 +00:00
compat Put on my peril sensitive sunglasses and add a flags field to the internal 2004-10-11 22:04:16 +00:00
conf Back out cumulative changes from revs. 1.92-1.94: "make depend" 2004-10-12 15:08:24 +00:00
contrib Add an additional struct inpcb * argument to pfil(9) in order to enable 2004-09-29 04:54:33 +00:00
crypto Use __FBSDID(). 2004-06-14 00:38:54 +00:00
ddb Refactor a bunch of scheduler code to give basically the same behaviour 2004-09-05 02:09:54 +00:00
dev Assert that the entropy source category provided by a caller submitting 2004-10-12 14:57:14 +00:00
doc Experimental support for using doxygen to generate kernel documentation. 2004-07-11 16:13:57 +00:00
fs Rework how we store process times in the kernel such that we always store 2004-10-05 18:51:11 +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 When loading GEOM modules, we expect the actual load process to be done 2004-10-12 04:44:54 +00:00
gnu Desupport device nodes on EXT2 filesystems. 2004-09-27 20:38:46 +00:00
i4b Mark i4b IPR and SPPP drivers as NET_NEEDS_GIANT(), as they both 2004-10-12 09:25:52 +00:00
i386 Add zero flags argument to sysctl calls. 2004-10-12 07:59:02 +00:00
ia64 Move the code for halting the CPU (acpi_cpu_c1) into machdep files. 2004-10-11 05:39:15 +00:00
isa Introduce a tunable to disable support for Synaptics touchpads. A number of 2004-09-29 23:49:57 +00:00
isofs/cd9660 Hold proper thread count while frobbing drivers ioctl. 2004-09-24 07:24:02 +00:00
kern Directly modifying the priority of a thread that may be on the runqueue 2004-10-12 16:31:23 +00:00
libkern Don't attempt to profile __udivsi3() and friends, as mcount() uses them. 2004-10-01 16:44:08 +00:00
modules Port NetBSD auxio driver. The driver was modified to use led(4) and can 2004-10-09 07:31:03 +00:00
net Fix packet flow when both ng_ether(4) and bridge(4) are in use: 2004-10-12 10:33:42 +00:00
net80211 Add a new network interface flag, IFF_NEEDSGIANT, which will allow 2004-07-27 23:20:45 +00:00
netatalk Inline umich license from COPYRIGHT to make it clear what license the 2004-08-10 03:23:05 +00:00
netatm Avoid casts as lvalues. 2004-07-28 06:59:55 +00:00
netgraph Fix packet flow when both ng_ether(4) and bridge(4) are in use: 2004-10-12 10:33:42 +00:00
netinet When the access control on creating raw sockets was modified so that 2004-10-12 16:47:25 +00:00
netinet6 fixed too delayed routing cache expiry. (tvtohz() converts a time interval to ticks, whereas hzto() converts an absolute time to ticks) 2004-10-06 03:32:26 +00:00
netipsec Remove extraneous SECPOLICY_LOCK_DESTROY calls that cause the mutex to be 2004-10-02 00:19:05 +00:00
netipx Mark Netgraph TTY, KAME IPSEC, and IPX/SPX as requiring Giant for correct 2004-08-28 15:24:53 +00:00
netkey Merge netipsec/key.c:1.17 into KAME pfkey implementation: 2004-09-30 00:49:55 +00:00
netnatm Constify send and receive space constants in natm. 2004-06-24 03:11:29 +00:00
netncp Add missing zero flag argument. 2004-10-12 08:22:08 +00:00
netsmb Avoid casts as lvalues. 2004-07-28 06:59:55 +00:00
nfs Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
nfs4client Remove NFS4 vop method vector for devices: we are desupporing device nodes 2004-09-27 20:02:50 +00:00
nfsclient nfsclient/nfs_bio.c has a PHOLD() without a PRELE(). Neither should 2004-10-01 05:01:41 +00:00
nfsserver Convert a mtx_lock(&Giant) to a mtx_unlock(&Giant) in nfsrv_link() to 2004-08-25 16:52:59 +00:00
opencrypto Don't acquire Giant in cryptof_close(), as the code is intended to be 2004-08-10 03:26:17 +00:00
pc98 Add more PnP serial cards support. 2004-10-01 15:58:54 +00:00
pccard Move PNP IDs back into oldcard files 2004-08-13 06:57:31 +00:00
pci Fix sis, bfe and ndis in the same way dc was fixed: 2004-10-08 16:14:42 +00:00
posix4 The sem_timedwait() and ksem_timedwait() functions both 2004-02-03 22:27:03 +00:00
powerpc Add sc_iostart to softc and unbreak the build. 2004-09-27 19:51:58 +00:00
rpc Prefer C99's __func__ over GCC's __FUNCTION__. 2004-09-23 18:25:46 +00:00
security Remove the debugging tunable, it was not being used. 2004-09-10 15:14:50 +00:00
sparc64 Flush the register windows before we start changing the context. 2004-10-09 16:42:09 +00:00
sys Add a note ahea of the esource enum that if new entropy source 2004-10-12 14:55:59 +00:00
tools Pass doxygen doc comments through to the output. 2004-07-11 16:14:24 +00:00
ufs Fix fsbtodb() for UFS1. This fixes an overflow for file sizes >1 TB, 2004-10-09 20:16:06 +00:00
vm Put on my peril sensitive sunglasses and add a flags field to the internal 2004-10-11 22:04:16 +00:00
Makefile Add a NO_BOOT knob to prevent building the boot blocks and loader. 2004-08-19 09:54:28 +00:00