Date: Thu, 2 Sep 2004 14:47:38 +0000 (UTC) From: "Christian S.J. Peron" <csjp@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netinet ip_mroute.c raw_ip.c Message-ID: <200409021447.i82Elcbt062786@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
csjp 2004-09-02 14:47:37 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/netinet ip_mroute.c raw_ip.c Log: MFC netinet/ip_mroute.c v.1.107 MFC netinet/raw_ip.c v1.143 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. Approved by: re (kensmith) Revision Changes Path 1.106.2.1 +8 -0 src/sys/netinet/ip_mroute.c 1.142.2.1 +10 -0 src/sys/netinet/raw_ip.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409021447.i82Elcbt062786>