Bad file access on the rise

Simo Sorce simo at redhat.com
Mon Jun 10 20:01:58 UTC 2013


On Sun, 2013-06-09 at 17:17 +0200, Lennart Poettering wrote:
> On Fri, 07.06.13 22:33, Richard W.M. Jones (rjones at redhat.com) wrote:
> 
> > On Fri, Jun 07, 2013 at 06:55:46PM +0200, Lennart Poettering wrote:
> > > User "simo" creates /dev/shm/1000/ even though 1000 is the UID of user
> > > "lennart". Lennart can never start PA again, ever. And can't do anything
> > > about it, because "simo" is in control, and /dev/shm is sticky.
> > 
> > For /run we create /run/user/<uid> in pam_systemd (I think?).
> > Can we do the same for /dev/shm/<uid>?
> 
> There's no benefit in doing that.
> 
> /run/user is not world-writable. Hence creating this dir at login time
> is totally safe, since only trusted code can create dirs in there. This
> is different for /dev/shm which is world-writable, and where creating
> dirs at login doesn't solve anything, because any unprivileged user
> could easily create dirs for all users and then make it impossible to
> log in for them.

All this makes me wonder, why are you using /dev/shm at all if it is so
bad ? There are many other ways to do IPC, so what's keeping you
on /dev/shm ?

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York



More information about the devel mailing list