summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPi-Hsun Shih <pihsun@chromium.org>2019-05-20 14:51:19 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-11 12:20:52 +0200
commitaa73a3b205a4043ed3146445f28f09536dadf67c (patch)
tree3ca612b2fa2518116faa366f0faa20e5a117a89f /kernel
parentd4128a1b580ca949e829fd919c2579dcaa9138d4 (diff)
pstore: Set tfm to NULL on free_buf_for_compression
commit a9fb94a99bb515d8720ba8440ce3aba84aec80f8 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions