cifs: Fix signature miscalculation
authorDavid Howells <dhowells@redhat.com>
Thu, 12 Sep 2024 15:58:48 +0000 (16:58 +0100)
committerSteve French <stfrench@microsoft.com>
Fri, 13 Sep 2024 00:28:48 +0000 (19:28 -0500)
commit5a20b7cb0d8d3ee490a8e088dc2584aa782e3355
tree54fef32c3a6d20e417cadf8e47f6bf9f53189250
parentda3ea35007d0af457a0afc87e84fddaebc4e0b63
cifs: Fix signature miscalculation

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@redhat.com>
Reviewed-by: Tom Talpey <tom@talpey.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsencrypt.c