summaryrefslogtreecommitdiffstats
path: root/fs/pstore/ram.c
diff options
context:
space:
mode:
authorPi-Hsun Shih <pihsun@chromium.org>2019-05-20 14:51:19 +0800
committerKees Cook <keescook@chromium.org>2019-05-31 00:32:06 -0700
commita9fb94a99bb515d8720ba8440ce3aba84aec80f8 (patch)
treed272383bd25c4efd32c2d3449aeb76cabf52314b /fs/pstore/ram.c
parenta188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff)
downloadlinux-stable-a9fb94a99bb515d8720ba8440ce3aba84aec80f8.tar.gz
linux-stable-a9fb94a99bb515d8720ba8440ce3aba84aec80f8.tar.bz2
linux-stable-a9fb94a99bb515d8720ba8440ce3aba84aec80f8.zip
pstore: Set tfm to NULL on free_buf_for_compression
Set tfm to NULL on free_buf_for_compression() after crypto_free_comp(). This avoid a use-after-free when allocate_buf_for_compression() and free_buf_for_compression() are called twice. Although free_buf_for_compression() freed the tfm, allocate_buf_for_compression() won't reinitialize the tfm since the tfm pointer is not NULL. Fixes: 95047b0519c1 ("pstore: Refactor compression initialization") Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org> Cc: stable@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/ram.c')
0 files changed, 0 insertions, 0 deletions