From: Shu Wang <shuwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: David Disseldorp <ddiss-l3A5Bk7waGM@public.gmane.org>
Cc: sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org,
linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
Subject: Re: [PATCH 1/2] SMB: fix leak of validate negotiate info response buffer
Date: Fri, 20 Oct 2017 22:49:58 -0400 (EDT) [thread overview]
Message-ID: <61197467.18033621.1508554198404.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20171020124938.9913-2-ddiss-l3A5Bk7waGM@public.gmane.org>
> From: "David Disseldorp" <ddiss-l3A5Bk7waGM@public.gmane.org>
> To: "Shu Wang" <shuwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>, sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
> Cc: "David Disseldorp" <ddiss-l3A5Bk7waGM@public.gmane.org>
> Sent: Friday, October 20, 2017 8:49:37 PM
> Subject: [PATCH 1/2] SMB: fix leak of validate negotiate info response buffer
>
> Fixes: ff1c038addc4 ("Check SMB3 dialects against downgrade attacks")
> Signed-off-by: David Disseldorp <ddiss-l3A5Bk7waGM@public.gmane.org>
> ---
> fs/cifs/smb2pdu.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index 6f0e6343c15e..052ab5dee6b6 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -648,7 +648,7 @@ int smb3_validate_negotiate(const unsigned int xid,
> struct cifs_tcon *tcon)
> {
> int rc = 0;
> struct validate_negotiate_info_req vneg_inbuf;
> - struct validate_negotiate_info_rsp *pneg_rsp;
> + struct validate_negotiate_info_rsp *pneg_rsp = NULL;
> u32 rsplen;
> u32 inbuflen; /* max of 4 dialects */
>
SMB2_ioctl will set pneg_rsp pointer to NULL, so it won't really
cause any issue. Anyway, looks good to me.
1879 SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
1880 >--- u64 volatile_fid, u32 opcode, bool is_fsctl, bool use_ipc,
1881 >--- char *in_data, u32 indatalen,
1882 >--- char **out_data, u32 *plen /* returned data len */)
1883 {
........
1897 >---if (out_data != NULL)
1898 >--->---*out_data = NULL;
1899
next prev parent reply other threads:[~2017-10-21 2:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 10:20 [PATCH] SMB: fix memory leak in smb3_validate_negotiate shuwang
[not found] ` <20171020102033.22936-1-shuwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-20 12:49 ` David Disseldorp
[not found] ` <20171020124938.9913-1-ddiss-l3A5Bk7waGM@public.gmane.org>
2017-10-20 12:49 ` [PATCH 1/2] SMB: fix leak of validate negotiate info response buffer David Disseldorp
[not found] ` <20171020124938.9913-2-ddiss-l3A5Bk7waGM@public.gmane.org>
2017-10-21 2:49 ` Shu Wang [this message]
[not found] ` <61197467.18033621.1508554198404.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-22 14:16 ` David Disseldorp
2017-10-20 12:49 ` [PATCH 2/2] SMB: fix validate negotiate info uninitialised memory use David Disseldorp
[not found] ` <20171020124938.9913-3-ddiss-l3A5Bk7waGM@public.gmane.org>
2017-10-25 18:04 ` Pavel Shilovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61197467.18033621.1508554198404.JavaMail.zimbra@redhat.com \
--to=shuwang-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=ddiss-l3A5Bk7waGM@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
--cc=sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox