From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [bug report] CIFS: Implement follow_link for SMB2
Date: Tue, 12 Jul 2016 16:55:07 +0300 [thread overview]
Message-ID: <20160712135507.GA30732@mwanda> (raw)
Hello Pavel Shilovsky,
The patch b42bf88828cd: "CIFS: Implement follow_link for SMB2" from
Aug 14, 2013, leads to the following static checker warning:
fs/cifs/smb2pdu.c:1408 SMB2_open()
warn: potentially allocating too little. 77 vs 4
fs/cifs/smb2pdu.c
1402 rc = SendReceive2(xid, ses, iov, num_iovecs, &resp_buftype, 0);
1403 rsp = (struct smb2_create_rsp *)iov[0].iov_base;
1404
1405 if (rc != 0) {
1406 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE);
1407 if (err_buf)
1408 *err_buf = kmemdup(rsp, get_rfc1002_length(rsp) + 4,
I'm not an expert, but these look like it might be controlled from user
space. How do we know that get_rfc1002_length() returns something large
enough?
1409 GFP_KERNEL);
1410 goto creat_exit;
1411 }
1412
regards,
dan carpenter
next reply other threads:[~2016-07-12 13:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 13:55 Dan Carpenter [this message]
2016-07-19 19:27 ` [bug report] CIFS: Implement follow_link for SMB2 Pavel Shilovsky
[not found] ` <CAKywueR7pGqL-HqqJH60XxPJ8fr1Mf3H7BZsSp2ePfXkdvH5sQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-24 7:40 ` 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=20160712135507.GA30732@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pshilovsky-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