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: <e561be10-ab09-41b6-8326-773ece90ac32@app.fastmail.com>
Date: Thu, 05 Feb 2026 17:30:20 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Jakub Kicinski" <kuba@...nel.org>, "Arnd Bergmann" <arnd@...nel.org>
Cc: "Jeff Garzik" <jeff@...zik.org>, bhelgaas@...gle.com,
 "David S . Miller" <davem@...emloft.net>,
 "Thomas Gleixner" <tglx@...nel.org>, "Lukas Wunner" <lukas@...ner.de>,
 linux-kernel@...r.kernel.org, andrew+netdev@...n.ch,
 giovanni.cabiddu@...el.com, Netdev <netdev@...r.kernel.org>,
 gallatin@...i.com, brice@...i.com, "Ingo Molnar" <mingo@...nel.org>,
 "Paolo Abeni" <pabeni@...hat.com>, "Eric Dumazet" <edumazet@...gle.com>
Subject: Re: [2/2,v3] myri10ge: avoid uninitialized variable use

On Thu, Feb 5, 2026, at 05:57, Jakub Kicinski wrote:
>> @@ -2238,6 +2250,8 @@ static int myri10ge_get_txrx(struct myri10ge_priv *mgp, int slice)
>>  	status = 0;
>>  	if (slice == 0 || (mgp->dev->real_num_tx_queues > 1)) {
>>  		cmd.data0 = slice;
>> +		cmd.data1 = 0;
>> +		cmd.data2 = 0;
>>  		status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SEND_OFFSET,
>>  					   &cmd, 0);
>>  		ss->tx.lanai = (struct mcp_kreq_ether_send __iomem *)
>>  			    (mgp->sram + cmd.data0);
>>  	}
>>  	cmd.data0 = slice;
>>  	status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SMALL_RX_OFFSET,
>>  				    &cmd, 0);
>
> The initialization of cmd.data1 and cmd.data2 is inside the conditional
> block. When slice > 0 and real_num_tx_queues <= 1, does the subsequent
> myri10ge_send_cmd() call for MXGEFW_CMD_GET_SMALL_RX_OFFSET use
> uninitialized data1/data2 values?
>
> Simon Horman pointed this out in his review of v2:
> https://lore.kernel.org/all/20250622162715.GA297140@horms.kernel.org/
>
> He provided a diff showing that the second cmd.data0 = slice assignment
> also needs cmd.data1 and cmd.data2 initialization. This feedback does
> not appear to have been addressed in v3.

Indeed, I thought I had addressed this, but somehow ended up
rebasing to an older version of my original patch. Sent v4 now.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ