]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ecryptfs: replace BUG_ON with error handling code
authorAditya Pakki <pakki001@umn.edu>
Fri, 14 Feb 2020 18:21:01 +0000 (12:21 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2020 16:23:43 +0000 (17:23 +0100)
commit0cdc01b0ad58e95b5b89f84195e0595a2fbbaf5d
tree7b430848f8026841e97cae930c9978a759e84488
parent5eb48fd9cbc68e18f9357c4b1c4ab2f22448cb9e
ecryptfs: replace BUG_ON with error handling code

commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72 upstream.

In crypt_scatterlist, if the crypt_stat argument is not set up
correctly, the kernel crashes. Instead, by returning an error code
upstream, the error is handled safely.

The issue is detected via a static analysis tool written by us.

Fixes: 237fead619984 (ecryptfs: fs/Makefile and fs/Kconfig)
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ecryptfs/crypto.c