Date: Mon, 06 Sep 1999 13:53:17 +0900 From: KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp> To: freebsd-hackers@FreeBSD.ORG, freebsd-security@FreeBSD.ORG Subject: Init(8) cannot decrease securelevel Message-ID: <19990906135317J.kato@gneiss.eps.nagoya-u.ac.jp>
next in thread | raw e-mail | index | archive | help
Once securelevel has been increased, no process can decrease it because kernel always refuse decreasing it. This is inconsistent with the manual page of init: The kernel runs with four different levels of security. Any super-user process can raise the security level, but only init can lower it. Is there any security problem to implement this? If no, could someone review following patch? kato ---------- BEGIN ---------- *** kern_mib.c.ORIG Mon Sep 6 13:46:40 1999 --- kern_mib.c Mon Sep 6 13:49:44 1999 *************** *** 178,184 **** error = sysctl_handle_int(oidp, &level, 0, req); if (error || !req->newptr) return (error); ! if (level < securelevel) return (EPERM); securelevel = level; return (error); --- 178,184 ---- error = sysctl_handle_int(oidp, &level, 0, req); if (error || !req->newptr) return (error); ! if (level < securelevel && req->p->p_pid != 1) return (EPERM); securelevel = level; return (error); ---------- END ---------- -----------------------------------------------+--------------------------+ KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp> | FreeBSD | Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! | Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ | ++++ FreeBSD(98) 3.2: Rev. 01 available! |http://www.jp.FreeBSD.org/| ++++ FreeBSD(98) 2.2.8: Rev. 02 available! +==========================+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990906135317J.kato>