Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8c8ce79 authored by Lukas Czerner's avatar Lukas Czerner Committed by Gerrit - the friendly Code Review server
Browse files

ext4: fix potential use after free in __ext4_journal_stop



There is a use-after-free possibility in __ext4_journal_stop() in the
case that we free the handle in the first jbd2_journal_stop() because
we're referencing handle->h_err afterwards. This was introduced in
9705acd63b125dee8b15c705216d7186daea4625 and it is wrong. Fix it by
storing the handle->h_err value beforehand and avoid referencing
potentially freed handle.

Change-Id: I68f13ab93f017e4886d8cf1b5c6e234a138a3e34
Fixes: 9705acd63b125dee8b15c705216d7186daea4625
Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
Reviewed-by: default avatarAndreas Dilger <adilger@dilger.ca>
Cc: stable@vger.kernel.org
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git


Git-commit: 6934da9238da947628be83635e365df41064b09b
Signed-off-by: default avatarDennis Cagle <d-cagle@codeaurora.org>
parent 66b5de39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment