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: <YhkNpNpnWD0YM/2J@zeniv-ca.linux.org.uk>
Date:   Fri, 25 Feb 2022 17:11:00 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        stable@...r.kernel.org
Subject: Re: [for-linus][PATCH 09/13] tracefs: Set the group ownership in
 apply_options() not parse_options()

On Fri, Feb 25, 2022 at 11:52:00AM -0500, Steven Rostedt wrote:

> @@ -293,6 +292,9 @@ static int tracefs_apply_options(struct super_block *sb)
>  	inode->i_uid = opts->uid;
>  	inode->i_gid = opts->gid;
>  
> +	if (tracefs_mount && tracefs_mount->mnt_root)
> +		set_gid(tracefs_mount->mnt_root, opts->gid);
> +

Umm...  Why bother with tracefs_mount here in the first place?
You have the superblock the operation is applied for - right in the
arguments.

Just make that
	set_gid(sb->s_root, opts->gid);
and be done with that.  Same place in tracefs_apply_options()...

Incidentally, I'm not sure you need to keep ->i_gid assignment - set_gid()
won't miss that inode, so...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ