lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081116223753.GK28958@anguilla.noreply.org>
Date:	Sun, 16 Nov 2008 23:37:53 +0100
From:	Peter Palfrader <peter@...frader.org>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: broken ownership of /proc/sys/ files on 2.6.27

On Sun, 16 Nov 2008, Al Viro wrote:

> On Sun, Nov 16, 2008 at 09:59:22PM +0100, Peter Palfrader wrote:
> > Hi,
> > 
> > on several (probably all) of my systems running a 2.6.27 kernel on at
> > least i386, amd64, ia64, sparc proc/sys does have files not owned by
> > root:
> 
> D'oh...
> 
> Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> ---
> diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
> index 94fcfff..06ed10b 100644
> --- a/fs/proc/proc_sysctl.c
> +++ b/fs/proc/proc_sysctl.c
> @@ -31,6 +31,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
>  	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
>  	inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
>  	inode->i_mode = table->mode;
> +	inode->i_uid = inode->i_gid = 0;
>  	if (!table->child) {
>  		inode->i_mode |= S_IFREG;
>  		inode->i_op = &proc_sys_inode_operations;

Works on the one host that I tested.

Thanks.
-- 
                           |  .''`.  ** Debian GNU/Linux **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ