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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1997287019.61739775783590.JavaMail.epsvc@epcpadp2new>
Date: Mon, 17 Feb 2025 12:19:51 +0530
From: Selvarasu Ganesan <selvarasu.g@...sung.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: mathias.nyman@...el.com, WeitaoWang-oc@...oxin.com,
	Thinh.Nguyen@...opsys.com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, jh0801.jung@...sung.com,
	dh10.jung@...sung.com, naushad@...sung.com, akash.m5@...sung.com,
	h10.kim@...sung.com, eomji.oh@...sung.com, alim.akhtar@...sung.com,
	thiagu.r@...sung.com, muhammed.ali@...sung.com, pritam.sutar@...sung.com,
	cpgs@...sung.com, stable@...r.kernel.org
Subject: Re: [PATCH v2 2/2] usb: xhci: Fix unassigned variable 'bcdUSB' in
 xhci_create_usb3x_bos_desc()


On 2/14/2025 1:35 PM, Greg KH wrote:
> On Thu, Feb 13, 2025 at 09:51:26AM +0530, Selvarasu Ganesan wrote:
>> Fix the following smatch error:
>> drivers/usb/host/xhci-hub.c:71 xhci_create_usb3x_bos_desc() error: unassigned variable 'bcdUSB'
> That really doesn't say what is happening here at all.  Please provide a
> lot more information as the response from a tool could, or could not, be
> a real issue, how are we supposed to know?
>
> And "unassigned" really isn't the bug that is being fixed here, please
> describe it better.
>
> Same for patch 2 of the series.
>
> Also, your 0/2 email was not threaded with these patches, something odd
> happened in your email setup, you might want to look into that.
>
> thanks,
>
> greg k-h
>

Hi Greg,

I understand your concern about whether the response from the tool could 
be a real issue or not. However, please check the provided code, I 
believe there is an issue worth considering.
In both conditions of the code snippet, the logical check is not valid 
because the 'bcdUSB' variable has not been assigned any value initially. 
Therefore, we believe that the tool is correctly identifying this problem.

If you do not consider it an issue, we can ignore this commit.


Please find the relevant portion of the code below:

========================================================================
u16                             bcdUSB;
...
...
/* Create the descriptor for port with the highest revision */
for (i = 0; i < xhci->num_port_caps; i++) {
     ..
     ..
*  if (i == 0 || bcdUSB < rev) { *
         bcdUSB = rev;
         port_cap = &xhci->port_caps[i];
     }
}
..
..
*if (bcdUSB >= 0x0310) {* //*Logically invalid to check bcdUSB without 
assigning a valuewhere above **xhci->num_port_caps become NULL*.
     if (port_cap->psi_count) {

         u8 num_sym_ssa = 0;

=======================================================================


yeah some issue in ouremail setup. We will fix it.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ