Re: [PATCH] cifs: Fix smbencrypt() to stop pointing a scatterlist at the stack

From: Sergei Shtylyov
Date: Tue Dec 13 2016 - 06:40:25 EST


Hello!

On 12/12/2016 11:54 PM, Andy Lutomirski wrote:

smbencrypt() points a scatterlist to the stack, which is breaks if

s/is//.

CONFIG_VMAP_STACK=y.

Fix it by switching to crypto_cipher_encrypt_one(). The new code
should be considerably faster as an added benefit.

This code is nearly identical to some code that Eric Biggers
suggested.

Cc: stable@xxxxxxxxxxxxxxx # 4.9 only
Reported-by: Eric Biggers <ebiggers3@xxxxxxxxx>
Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxx>
[...]

MBR, Sergei