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: <20130729162016.3299ead3@tlielax.poochiereds.net>
Date:	Mon, 29 Jul 2013 16:20:16 -0400
From:	Jeff Layton <jlayton@...hat.com>
To:	Andi Shyti <andi@...zian.org>
Cc:	smfrench@...il.com, linux-cifs@...r.kernel.org,
	linux-kernel@...r.kernel.org, mikko.rapeli@....fi,
	pshilovsky@...ba.org
Subject: Re: [PATCH v2] cifs: file: initialize oparms.reconnect before using
 it

On Mon, 29 Jul 2013 20:04:35 +0200
Andi Shyti <andi@...zian.org> wrote:

> In the cifs_reopen_file function, if the following statement is
> asserted:
> 
> (tcon->unix_ext && cap_unix(tcon->ses) &&
>             (CIFS_UNIX_POSIX_PATH_OPS_CAP &
>             (tcon->fsUnixInfo.Capability)))
> 
> and we succeed to open with cifs_posix_open, the function jumps
> to the label reopen_success and checks for oparms.reconnect
> which is not initialized.
> 
> This issue has been reported by scan.coverity.com
> 
> Signed-off-by: Andi Shyti <andi@...zian.org>
> ---
>  fs/cifs/file.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 1e57f36..7e36ae3 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -647,6 +647,7 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush)
>  				     oflags, &oplock, &cfile->fid.netfid, xid);
>  		if (rc == 0) {
>  			cifs_dbg(FYI, "posix reopen succeeded\n");
> +			oparms.reconnect = true;
>  			goto reopen_success;
>  		}
>  		/*

Still doesn't do much to improve this code, but that fix shouldn't
break anything.

Reviewed-by: Jeff Layton <jlayton@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ