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]
Date:	Mon, 16 Nov 2015 14:27:44 +0530
From:	Sathya Perla <sathya.perla@...gotech.com>
To:	Ivan Vecera <ivecera@...hat.com>
Cc:	netdev@...r.kernel.org,
	Sriharsha Basavapatna <sriharsha.basavapatna@...gotech.com>,
	Ajit Kumar Khaparde <ajit.khaparde@...gotech.com>,
	Padmanabh Ratnakar <padmanabh.ratnakar@...gotech.com>
Subject: Re: [PATCH net] be2net: check properly status in lancer_cmd_get_file_len()

On Fri, Nov 13, 2015 at 3:22 PM, Ivan Vecera <ivecera@...hat.com> wrote:
> The lancer_cmd_get_file_len() calls lancer_cmd_read_object() to get
> the current size of registers for ethtool registers dump. The size
> is stored in data_read but only when the returned status is 0 otherwise
> it is uninitialized thus random.
>
> Signed-off-by: Ivan Vecera <ivecera@...hat.com>
> ---
>  drivers/net/ethernet/emulex/benet/be_ethtool.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
> index f4cb8e4..26b6192 100644
> --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
> +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
> @@ -248,6 +248,8 @@ static u32 lancer_cmd_get_file_len(struct be_adapter *adapter, u8 *file_name)
>         status = lancer_cmd_read_object(adapter, &data_len_cmd, 0, 0,
>                                         file_name, &data_read, &eof,
>                                         &addn_status);
> +       if (status)
> +               return 0;
>
>         return data_read;

Ivan, unless I'm missing something...I see that "data_read" is
initialized to 0 in this routine. So, this routine will return 0 when
lancer_cmd_read_object() returns a non-zero status.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ