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: <d2e1fc3c20f8301e0a841bee6143be5ddd4d0ef2.camel@HansenPartnership.com>
Date: Wed, 19 Nov 2025 07:43:02 -0500
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Christoph Hellwig <hch@...radead.org>, ally heev <allyheev@...il.com>
Cc: Dan Carpenter <dan.carpenter@...aro.org>, "Martin K. Petersen"
	 <martin.petersen@...cle.com>, linux-scsi@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: fix uninitialized pointers with free attr

On Wed, 2025-11-19 at 00:31 -0800, Christoph Hellwig wrote:
> On Wed, Nov 19, 2025 at 12:26:56PM +0530, ally heev wrote:
> > As per the ongoing discussion
> > https://lore.kernel.org/lkml/58fd478f408a34b578ee8d949c5c4b4da4d4f41d.camel@HansenPartnership.com/
> > , I believe there are no changes required here
> 
> What about just dropping that __free thing that just make the code
> harder to read and more buggy?

It does?  The original patch was this:

https://lore.kernel.org/linux-scsi/20240222214508.1630719-9-bvanassche@acm.org/

It's part of the series adding Advice Hints, so we can't just revert it
because the sense buffer would be too small.  Using __free to replace a
stack allocation looks like a nice use of the cleanup primitives: I
think if we removed the __free and added a kfree before each of the six
returns that would make the code more prone to bugs on its next update.

Regards,

James


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ