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] [day] [month] [year] [list]
Message-ID: <2024110100-thieving-numerate-e268@gregkh>
Date: Fri, 1 Nov 2024 02:20:41 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
	Dan Williams <dan.j.williams@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 00/10] sysfs: constify struct bin_attribute (Part 1)

On Thu, Oct 31, 2024 at 02:43:49AM +0000, Thomas Weißschuh wrote:
> struct bin_attribute contains a bunch of pointer members, which when
> overwritten by accident or malice can lead to system instability and
> security problems.
> Moving the definitions of struct bin_attribute to read-only memory
> makes these modifications impossible.
> The same change has been performed for many other structures in the
> past. (struct class, struct ctl_table...)
> 
> For the structure definitions throughout the core to be moved to
> read-only memory the following steps are necessary.
> 
> 1) Change all callbacks invoked from the sysfs core to only pass const
>    pointers
> 2) Adapt the sysfs core to only work in terms of const pointers
> 3) Adapt the sysfs core APIs to allow const pointers
> 4) Change all structure definitions through the core to const
> 
> This series provides the foundation for step 1) above.
> It converts some callbacks in a single step to const and provides a
> foundation for those callbacks where a single step is not possible.
> 
> This series is marked as RFC and only sent to the sysfs maintainers to
> get some feedback on the general aproach.
> The same techniques employed by this series can later be reused for the
> same change for 'struct attribute'.
> 
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>

At a quick glance, this is great!  I'll review it "better" next week
when my travel calms down, so if you want to resend this as a non-rfc
patch, and it looks sane, I'll be glad to queue it up.

thanks!

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ