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: <ZqIHkubX0KK8psPv@test-OptiPlex-Tower-Plus-7010>
Date: Thu, 25 Jul 2024 13:36:42 +0530
From: Hariprasad Kelam <hkelam@...vell.com>
To: Shigeru Yoshida <syoshida@...hat.com>
CC: <make24@...as.ac.cn>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <liujunliang_ljl@....com>,
        <andrew@...n.ch>, <horms@...nel.org>, <linux-usb@...r.kernel.org>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <stable@...r.kernel.org>
Subject: Re: [PATCH net v4] net: usb: sr9700: fix uninitialized variable use
 in sr_mdio_read

On 2024-07-25 at 08:31:00, Shigeru Yoshida (syoshida@...hat.com) wrote:
> On Thu, 25 Jul 2024 10:29:42 +0800, Ma Ke wrote:
> > It could lead to error happen because the variable res is not updated if
> > the call to sr_share_read_word returns an error. In this particular case
> > error code was returned and res stayed uninitialized. Same issue also
> > applies to sr_read_reg.
> > 
> > This can be avoided by checking the return value of sr_share_read_word
> > and sr_read_reg, and propagating the error if the read operation failed.
> > 
> > Found by code review.
> > 
> > Cc: stable@...r.kernel.org
> > Fixes: c9b37458e956 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support")
> > Signed-off-by: Ma Ke <make24@...as.ac.cn>
> 
> I did a quick check for sr9700.c and there seems to be other
> suspicious usage of sr_read_reg().  But, for sr_mdio_read(), I think
> the patch is sufficient.
> 
> Reviewed-by: Shigeru Yoshida <syoshida@...hat.com>
> 
>  Agree with Shigeru, may be you can submit another patch addressing
>  "suspicious usage of sr_read_reg" this patch looks good

Reviewed-by: Hariprasad Kelam <hkelam@...vell.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ