From: Paulo Alcantara <pc@cjr.nz>
To: Enzo Matsumiya <ematsumiya@suse.de>, linux-cifs@vger.kernel.org
Cc: smfrench@gmail.com, ronniesahlberg@gmail.com, nspmangalore@gmail.com
Subject: Re: [PATCH] cifs: do not include page data when checking signature
Date: Wed, 18 Jan 2023 17:06:56 -0300 [thread overview]
Message-ID: <871qnrvc7z.fsf@cjr.nz> (raw)
In-Reply-To: <20230118170657.17585-1-ematsumiya@suse.de>
Enzo Matsumiya <ematsumiya@suse.de> writes:
> On async reads, page data is allocated before sending. When the
> response is received but it has no data to fill (e.g.
> STATUS_END_OF_FILE), __calc_signature() will still include the pages in
> its computation, leading to an invalid signature check.
>
> This patch fixes this by not setting the async read smb_rqst page data
> (zeroed by default) if its got_bytes is 0.
>
> This can be reproduced/verified with xfstests generic/465.
>
> Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
> ---
> fs/cifs/smb2pdu.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
next prev parent reply other threads:[~2023-01-18 20:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 17:06 [PATCH] cifs: do not include page data when checking signature Enzo Matsumiya
2023-01-18 20:06 ` Paulo Alcantara [this message]
2023-01-18 20:50 ` Steve French
2023-01-18 22:07 ` Steve French
2023-01-18 22:17 ` Paulo Alcantara
[not found] ` <CAH2r5mt2UvW32AZrvjde75NL3V5qWLbc=WTTdaLZsi2B4oYEhA@mail.gmail.com>
2023-01-18 22:31 ` ronnie sahlberg
2023-01-18 22:59 ` Paulo Alcantara
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=871qnrvc7z.fsf@cjr.nz \
--to=pc@cjr.nz \
--cc=ematsumiya@suse.de \
--cc=linux-cifs@vger.kernel.org \
--cc=nspmangalore@gmail.com \
--cc=ronniesahlberg@gmail.com \
--cc=smfrench@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.