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] [day] [month] [year] [list]
Message-ID: <2024081255-yearly-unaligned-f2ed@gregkh>
Date: Mon, 12 Aug 2024 12:22:03 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Markus Elfring <Markus.Elfring@....de>
Cc: Jinjie Ruan <ruanjinjie@...wei.com>, linux-modules@...r.kernel.org,
	Arnd Bergmann <arnd@...db.de>, Luis Chamberlain <mcgrof@...nel.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] driver core: Fix a null-ptr-deref in module_add_driver()

On Mon, Aug 12, 2024 at 12:18:17PM +0200, Markus Elfring wrote:
> > Inject fault while probing of-fpga-region, if kasprintf() fails in
> > module_add_driver(), the second sysfs_remove_link() in exit path will cause
> > null-ptr-deref as below because kernfs_name_hash() will call strlen() with
> > NULL driver_name.
> …
> 
> How do you think about to use the term “null pointer dereference”
> for the commit message (and summary phrase)?
> 
> 
> …
> > +++ b/drivers/base/module.c
> > @@ -66,27 +66,31 @@ int module_add_driver(struct module *mod, const struct device_driver *drv)
> …
> >  	sysfs_remove_link(mk->drivers_dir, driver_name);
> > +
> > +out_free_driver_name:
> >  	kfree(driver_name);
> >
> > +out_remove_kobj:
> > +	sysfs_remove_link(&drv->p->kobj, "module");
> …
> 
> I suggest to omit two blank lines here.


Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list.  I strongly suggest that you not do this anymore.  Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all.  The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback.  Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ