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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMjnRLdctAzzP0Fi@unreal>
Date:   Tue, 15 Jun 2021 20:45:40 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Kees Cook <keescook@...omium.org>,
        Christian Brauner <christian.brauner@...ntu.com>,
        Andrea Righi <andrea.righi@...onical.com>,
        stable <stable@...r.kernel.org>,
        linux-netdev <netdev@...r.kernel.org>
Subject: Re: NetworkManager fails to start

On Tue, Jun 15, 2021 at 09:26:19AM -0700, Linus Torvalds wrote:
> On Tue, Jun 15, 2021 at 9:21 AM Leon Romanovsky <leon@...nel.org> wrote:
> >
> > The commit 591a22c14d3f ("proc: Track /proc/$pid/attr/ opener mm_struct")
> > that we got in v5.13-rc6 broke our regression to pieces. The NIC interfaces
> > fail to start when using NetworkManager.
> 
> Does the attached patch fix it?

Yes, this patch fixed the issue.
Tested-by: Leon Romanovsky <leonro@...dia.com>

Thanks

> 
> It just makes the open always succeed, and then the private_data that
> the open did (that may or may not then have been filled in) is only
> used on write.
> 
>                Linus

>  fs/proc/base.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/proc/base.c b/fs/proc/base.c
> index 7118ebe38fa6..9cbd915025ad 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -2676,7 +2676,9 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
>  #ifdef CONFIG_SECURITY
>  static int proc_pid_attr_open(struct inode *inode, struct file *file)
>  {
> -	return __mem_open(inode, file, PTRACE_MODE_READ_FSCREDS);
> +	file->private_data = NULL;
> +	__mem_open(inode, file, PTRACE_MODE_READ_FSCREDS);
> +	return 0;
>  }
>  
>  static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ