[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH2r5ms+7qDhOkxf=ti4Lifh1Tm0k2ipy8_rXaHhL7ygEqXvsw@mail.gmail.com>
Date: Thu, 12 Sep 2024 11:24:03 -0500
From: Steve French <smfrench@...il.com>
To: David Howells <dhowells@...hat.com>
Cc: Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.com>,
Shyam Prasad N <nspmangalore@...il.com>, Rohith Surabattula <rohiths.msft@...il.com>,
Jeff Layton <jlayton@...nel.org>, linux-cifs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cifs: Fix signature miscalculation
looks like this fixes the problem - merged into cifs-2.6.git for-next
On Thu, Sep 12, 2024 at 10:59 AM David Howells <dhowells@...hat.com> wrote:
>
>
> Fix the calculation of packet signatures by adding the offset into a page
> in the read or write data payload when hashing the pages from it.
>
> Fixes: 39bc58203f04 ("cifs: Add a function to Hash the contents of an iterator")
> Signed-off-by: David Howells <dhowells@...hat.com>
> cc: Steve French <sfrench@...ba.org>
> cc: Paulo Alcantara <pc@...guebit.com>
> cc: Shyam Prasad N <nspmangalore@...il.com>
> cc: Rohith Surabattula <rohiths.msft@...il.com>
> cc: Jeff Layton <jlayton@...nel.org>
> cc: linux-cifs@...r.kernel.org
> cc: linux-fsdevel@...r.kernel.org
> ---
> fs/smb/client/cifsencrypt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/cifsencrypt.c b/fs/smb/client/cifsencrypt.c
> index 6322f0f68a17..b0473c2567fe 100644
> --- a/fs/smb/client/cifsencrypt.c
> +++ b/fs/smb/client/cifsencrypt.c
> @@ -129,7 +129,7 @@ static ssize_t cifs_shash_xarray(const struct iov_iter *iter, ssize_t maxsize,
> for (j = foffset / PAGE_SIZE; j < npages; j++) {
> len = min_t(size_t, maxsize, PAGE_SIZE - offset);
> p = kmap_local_page(folio_page(folio, j));
> - ret = crypto_shash_update(shash, p, len);
> + ret = crypto_shash_update(shash, p + offset, len);
> kunmap_local(p);
> if (ret < 0)
> return ret;
>
>
--
Thanks,
Steve
Powered by blists - more mailing lists