]> git.karo-electronics.de Git - karo-tx-linux.git/commit
deal with races in /proc/*/{syscall,stack,personality}
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 23 Mar 2011 19:52:50 +0000 (15:52 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:35:41 +0000 (15:35 -0400)
commit834458c39725566f611cf05636dba38821dcf904
treee27f14db9c39655724630306f6f52222508b3ac7
parent64eff52db9365f6479bb21ef1888c9aa1af7f60c
deal with races in /proc/*/{syscall,stack,personality}

commit a9712bc12c40c172e393f85a9b2ba8db4bf59509 upstream.

All of those are rw-r--r-- and all are broken for suid - if you open
a file before the target does suid-root exec, you'll be still able
to access it.  For personality it's not a big deal, but for syscall
and stack it's a real problem.

Fix: check that task is tracable for you at the time of read().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[PG: in .34 cred_guard_mutex is in task, not task->signal]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/proc/base.c