Re: mount /usr partition nosuid

Previous thread: Dual boot stable and current by Christopher Zimmermann on Thursday, December 3, 2009 - 11:51 am. (6 messages)

Next thread: 7 Factores de Éxito Para Ejecutivos de Clase Mundial - México D.F. by Ing. André Guillén on Thursday, December 3, 2009 - 10:29 am. (1 message)
From: Mark Romer
Date: Thursday, December 3, 2009 - 12:08 pm

Hello All,
Sorry if it has been asked in the past, but is it ok to mount the /usr
partition as nosuid?
What if any default programs will that break?  And also does that give me
any added security benefits?
Running 4.6 release generic i386
thanks, Mark

From: Christopher Linn
Date: Thursday, December 3, 2009 - 12:26 pm

why do you want to do this?  (what problem are you trying to solve?)

cel

-- 
Christopher Linn <celinn at mtu.edu>  | By no means shall either the CEC
System Administrator II               | or MTU be held in any way liable
  Center for Experimental Computation | for any opinions or conjecture I
    Michigan Technological University | hold to or imply to hold herein.

From: Mark Romer
Date: Thursday, December 3, 2009 - 1:30 pm

All, thanks for the responses so far.

I work for the Fed and we have to setup a dns sec bind server on our end.  I
was just reading some of their "advice" on setting up the server...

 2. Mount BIND's chroot filesystem with the noexec,nosuid,nodev options.

Of course all their instructions are for redhat and debian, but I want to do
this on openbsd......

thanks, Mark


From: Otto Moerbeek
Date: Thursday, December 3, 2009 - 1:38 pm

On OpenBSD, the bind chroot is in /var, which is by default
nosuid,nodev (if it is a seperate partition). 


From: Matthew Weigel
Date: Thursday, December 3, 2009 - 1:48 pm

Errrr, BIND is chrooted to /var/named.  Which is to say, on a standard
OpenBSD install with 'reasonable' partitions, you would mount /var
noexec,nosuid,nodev - but it defaults to nosuid,nodev, and you'd have to
make your own determination as to whether binaries in /var are okay or not
(I *think* /var/www/bin is the only thing you'd have to look at, but you
can do the digging on that).
-- 
 Matthew Weigel
 hacker
 unique & idempot . ent

From: Joachim Schipper
Date: Thursday, December 3, 2009 - 12:42 pm

This is a very bad idea. How do you think sudo does its job? su? Any
number of other programs including /usr/libexec/auth/*?

		Joachim

From: Josh Grosse
Date: Thursday, December 3, 2009 - 12:40 pm

Find out for yourself.  See how Set-User-ID mode and Set-Group-ID mode are
reported from the ls(1) man page.  Then, look at your $PATH, and see how many
directories in the /usr hierarchy contain executables.  Run ls(1) with long
mode output, and see for yourself what programs you would break when you
create your Frankensystem.  

From: Eugene Yunak
Date: Thursday, December 3, 2009 - 12:55 pm

"find /usr -perm 4555 -ls" will solve the question re wether it will
break something.

--
The best the little guy can do is what
the little guy does right

From: Christopher Linn
Date: Thursday, December 3, 2009 - 1:19 pm

to the OP: perhaps what you are thining of is thrid party apps 
(packages) in /usr/local.  in the new install script the disk 
auto-layout feature creates a separate /usr/local partition; 
do this and mount it nosuid... THEN run 
"find /usr/local -perm 4555 -ls" to see what apps you are 
breaking  8*)

cel

-- 
Christopher Linn <celinn at mtu.edu>  | By no means shall either the CEC
System Administrator II               | or MTU be held in any way liable
  Center for Experimental Computation | for any opinions or conjecture I
    Michigan Technological University | hold to or imply to hold herein.

From: Mark Romer
Date: Thursday, December 3, 2009 - 1:39 pm

Ok, I am not sure if I am replying to just that user or the whole group,
when using the gmail client... anyway....

All, thanks for the responses so far.

I work for the Fed and we have to setup a dns sec bind server on our end.  I
was just reading some of their "advice" on setting up the server...

 2. Mount BIND's chroot filesystem with the noexec,nosuid,nodev options.

Of course all their instructions are for redhat and debian, but I want to do
this on openbsd......

I understand not being able to use the noexec option but I was not sure
about the nosuid..

thanks very much....


From: Mark Romer
Date: Thursday, December 3, 2009 - 1:49 pm

Ah yes, thanks Otto !

I think I was getting confused between the named binary in /usr/sbin/  and
where the bind files are chrooted under /var/named
Yes, so this would already be done in openbsd.....

thanks, Mark


From: Mauro Rezzonico
Date: Friday, December 4, 2009 - 3:06 am

You will soon discover that in OpenBSD, you don't have to go around the 
system hardening it...

-- 
Mauro Rezzonico <mauro@ch23.org>, Como, Italia
"Maybe this world is another planet's hell" - H.Huxley

Previous thread: Dual boot stable and current by Christopher Zimmermann on Thursday, December 3, 2009 - 11:51 am. (6 messages)

Next thread: 7 Factores de Éxito Para Ejecutivos de Clase Mundial - México D.F. by Ing. André Guillén on Thursday, December 3, 2009 - 10:29 am. (1 message)