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: <20170314094221.336a1be2@xeon-e3>
Date:   Tue, 14 Mar 2017 09:42:21 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Cathy Avery <cavery@...hat.com>
Cc:     kys@...rosoft.com, hch@...radead.org, haiyangz@...rosoft.com,
        jejb@...ux.vnet.ibm.com, martin.petersen@...cle.com,
        devel@...uxdriverproject.org, linux-kernel@...r.kernel.org,
        dan.carpenter@...cle.com, linux-scsi@...r.kernel.org
Subject: Re: [PATCH] scsi: storvsc: Add support for FC rport.

On Tue, 14 Mar 2017 12:01:03 -0400
Cathy Avery <cavery@...hat.com> wrote:

>  #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
>  	if (host->transportt == fc_transport_template) {
> +		struct fc_rport_identifiers ids;
> +
> +		ids.node_name = 0;
> +		ids.port_name = 0;
> +		ids.port_id = 0;
> +		ids.roles |= FC_PORT_ROLE_FCP_TARGET;

Since the variable ids is on the stack, it is uninitialized data.
Doing a OR with uninitialized data is not correct.

Better off to use C99 style iniatializer and skip the zero fields.

		struct fc_rport_identifiers ids = {
			.roles = FC_PORT_ROLE_FCP_TARGET,
		};

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ