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]
Date:   Mon, 15 Jan 2018 14:18:00 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH v2] net: delete /proc THIS_MODULE references

On Tue, 16 Jan 2018 00:42:40 +0300
Alexey Dobriyan <adobriyan@...il.com> wrote:

> /proc has been ignoring struct file_operations::owner field for 10 years.
> Specifically, it started with commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba
> ("Fix rmmod/read/write races in /proc entries"). Notice the chunk where
> inode->i_fop is initialized with proxy struct file_operations for
> regular files:
> 
> 	-               if (de->proc_fops)
> 	-                       inode->i_fop = de->proc_fops;
> 	+               if (de->proc_fops) {
> 	+                       if (S_ISREG(inode->i_mode))
> 	+                               inode->i_fop = &proc_reg_file_ops;
> 	+                       else
> 	+                               inode->i_fop = de->proc_fops;
> 	+               }
> 
> VFS stopped pinning module at this point.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>

What happens if /proc file for the module is open and the module is unloaded?
Just because it is old doesn't mean that it wasn't a bug.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ