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: <00f865af59f3bc3b31164d9105a75c01666a8f55.camel@HansenPartnership.com>
Date: Wed, 09 Apr 2025 08:49:12 -0400
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Thomas Gleixner <tglx@...utronix.de>, Bert Karwatzki <spasswolf@....de>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, linux-kernel@...r.kernel.org, 
 Jonathan.Cameron@...wei.com, allenbh@...il.com, d-gole@...com, 
 dave.jiang@...el.com, haiyangz@...rosoft.com, jdmason@...zu.us,
 kristo@...nel.org,  linux-hyperv@...r.kernel.org,
 linux-pci@...r.kernel.org,  linux-scsi@...r.kernel.org,
 logang@...tatee.com,  manivannan.sadhasivam@...aro.org,
 martin.petersen@...cle.com, maz@...nel.org,  mhklinux@...look.com,
 nm@...com, ntb@...ts.linux.dev, peterz@...radead.org,  ssantosh@...nel.org,
 wei.huang2@....com, wei.liu@...nel.org
Subject: Re: commit 7b025f3f85ed causes NULL pointer dereference

On Tue, 2025-04-08 at 22:46 +0200, Thomas Gleixner wrote:
[...]
> -	retain_ptr(dev);
>  	msix_update_entries(dev, entries);
> +	retain_ptr(dev);
>  	return 0;

Heh, well, that scores -6 on the Rusty scale "the name tells you how
not to use it" because retain_ptr would commonly be read to mean the
pointer retains its value.  It would be nice if KASAN had compile time
markers that would cause a use after free build failure for this, but,
apparently, it doesn't.  The cleanup annotations don't let us remove
the scope free function, which would otherwise let us match the use to
the name, so I think the name might have to change to something like
retain_and_null_ptr().

Regards,

James


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ