-
由 Pi-Hsun Shih 提交于
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: 95047b05 ("pstore: Refactor compression initialization") Signed-off-by: NPi-Hsun Shih <pihsun@chromium.org> Cc: stable@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org>
a9fb94a9