Skip to content

Commit

Permalink
Fix nasty /proc vulnerability
Browse files Browse the repository at this point in the history
We have a bad interaction with both the kernel and user space being able
to change some of the /proc file status.  This fixes the most obvious
part of it, but I expect we'll also make it harder for users to modify
even their "own" files in /proc.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Linus Torvalds committed Jul 14, 2006
1 parent ab6cf0d commit 18b0bbd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ static int pid_revalidate(struct dentry *dentry, struct nameidata *nd)
} else {
inode->i_uid = 0;
inode->i_gid = 0;
inode->i_mode = 0;
}
security_task_to_inode(task, inode);
put_task_struct(task);
Expand Down

0 comments on commit 18b0bbd

Please sign in to comment.