Permissions on /dev/kmem and /dev/mem for top?

Permissions on /dev/kmem and /dev/mem for top?

Post by Eric » Sat, 11 Mar 2000 04:00:00



I have found that the default permissions on /dev/kmem and /dev/mem are
read/write only for root. No other ID has any permissions. This seems to
be a problem for users using top. If I change the permissions on these
files to rw-r--r-- so that users can see the file are there any security
or other issues I should be concerned with.

On a similar note, are there option in top that allow users to see all
the process on the system including other user processes. I didn't see
anything in the man page that allowed this.

Thansks for the help!
Eric

 
 
 

Permissions on /dev/kmem and /dev/mem for top?

Post by Casper H.S. Dik - Network Security Engine » Sat, 11 Mar 2000 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>I have found that the default permissions on /dev/kmem and /dev/mem are
>read/write only for root. No other ID has any permissions. This seems to
>be a problem for users using top. If I change the permissions on these
>files to rw-r--r-- so that users can see the file are there any security
>or other issues I should be concerned with.

Yes, all your users will be able to snoop passwords from /dev/mem
and monitor everything typed and done on the system

Ie., a really bad thing to do.

This is why top is commonly installed set-gid sys or set-uid root.

Quote:>On a similar note, are there option in top that allow users to see all
>the process on the system including other user processes. I didn't see
>anything in the man page that allowed this.

Ah, you're running top on 2.5.1 or before.  This requires top to
run set-uid root.

In 2.6 and later, it only needs set-gid sys but can run
without any privileges, provided you can do without "last pid"
and you run a recent top3.5beta.  (one with complete kstat support)

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

1. /dev/mem and /dev/kmem with world access?

 A reasonably system-savvy user here says we need "x" access on
/dev/kmem and /dev/mem. The only reference I've found indicates that
world read access to /dev/kmem is a security hazard, I've found no reference
to /dev/mem except in the man pages, which indicates that examining and
patching device registers is likely to lead to unexpected results - not
a comforting bit of info. Said user has not yet come to plead his case on
why we need to do this, but I'd like to know, via email if possible, what
you folks think.

Are there good reasons to give execute access to the world on these two files?
How about read access for world instead?
What other approaches might be better??

Thanks very much for any info, the sooner the better as the users here think
everything they want done should go right to the front of the queue -
sound familiar??? Thanks again!

Judith Reed, sysadmin, Syracuse University Physics Dept.


2. SunNet Domain Manager Question

3. How can I read /dev/mem, /dev/kmem ....?

4. kconfig question

5. Parts of /dev/{kmem,mem} that fall under the Heisenberg Principle ??

6. printing with epson 740

7. What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

8. SMP + 2.21 = Corrupted Filesystem

9. kvm_open && dev/kmem <-> top

10. /dev/dsp, /dev/audio, /dev/midi., /dev/sndsta

11. : Reading kmem addr in UnixWare (/dev/kmem)

12. /dev/kmem: Permission denied

13. /dev/kmem permission denied