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: <8e854701-16cd-48a8-83ac-29c256d7deb5@gmail.com>
Date: Mon, 14 Jul 2025 10:30:38 +0530
From: Purva Yeshi <purvayeshi550@...il.com>
To: efremov@...ux.com, axboe@...nel.dk
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] block: floppy: Fix uninitialized use of outparam

On 13/07/25 14:17, Denis Efremov wrote:
> 
> 
> On 13/07/2025 11:00, Purva Yeshi wrote:
>> Fix Smatch-detected error:
>> drivers/block/floppy.c:3569 fd_locked_ioctl() error:
>> uninitialized symbol 'outparam'.
>>
>> Smatch may incorrectly warn about uninitialized use of 'outparam'
>> in fd_locked_ioctl(), even though all _IOC_READ commands guarantee
>> its initialization. Initialize outparam to NULL to make this explicit
>> and suppress the false positive.
>>
>> Signed-off-by: Purva Yeshi <purvayeshi550@...il.com>
>> ---
>> V1 - https://lore.kernel.org/all/7dd94691-0b37-4855-be43-661f954275c8@gmail.com/T/#t
>> V2 - Initialize outparam to NULL to suppress Smatch false positive.
>>
>>   drivers/block/floppy.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
>> index e97432032f01..24be0c2c4075 100644
>> --- a/drivers/block/floppy.c
>> +++ b/drivers/block/floppy.c
>> @@ -3411,7 +3411,7 @@ static int fd_locked_ioctl(struct block_device *bdev, blk_mode_t mode,
>>   		struct floppy_max_errors max_errors;
>>   		struct floppy_drive_params dp;
>>   	} inparam;		/* parameters coming from user space */
>> -	const void *outparam;	/* parameters passed back to user space */
>> +	const void *outparam = NULL;	/* parameters passed back to user space */
>>   
>>   	/* convert compatibility eject ioctls into floppy eject ioctl.
>>   	 * We do this in order to provide a means to eject floppy disks before
> 
> Reviewed-by: Denis Efremov <efremov@...ux.com>
> 
> Denis

Hi,

Thank you for the review and for adding your Reviewed-by tag.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ