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: <87r021tc2y.ffs@tglx>
Date: Wed, 09 Apr 2025 20:38:13 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: James Bottomley <James.Bottomley@...senPartnership.com>, 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 Wed, Apr 09 2025 at 08:49, James Bottomley wrote:
> 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().

Yeah. When I saw it I immediately rumaged for a brown paperbag :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ