diff options
author | Paulo Alcantara <paulo@paulo.ac> | 2018-06-23 20:52:25 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-08-07 22:15:41 +0300 |
commit | a12d0c590cc7ae01892f06c5ad6d19580ecdd0de (patch) | |
tree | b0467b1ea540b6b9748b3e9bf22d5035808fe83b | |
parent | 256b4c3f03d77d8c0dc69e3a6ceb3afd0d1810bd (diff) | |
download | linux-a12d0c590cc7ae01892f06c5ad6d19580ecdd0de.tar.xz |
cifs: Make sure all data pages are signed correctly
Check if every data page is signed correctly in sigining helper.
Signed-off-by: Paulo Alcantara <palcantara@suse.de>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r-- | fs/cifs/cifsencrypt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index b4672eafc5bf..85b31cfa2f3c 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -83,7 +83,13 @@ int __cifs_calc_signature(struct smb_rqst *rqst, kaddr = (char *) kmap(rqst->rq_pages[i]) + offset; - crypto_shash_update(shash, kaddr, len); + rc = crypto_shash_update(shash, kaddr, len); + if (rc) { + cifs_dbg(VFS, "%s: Could not update with payload\n", + __func__); + kunmap(rqst->rq_pages[i]); + return rc; + } kunmap(rqst->rq_pages[i]); } |