fs/adfs: super: fix use-after-free bug
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 4 Jun 2019 13:50:14 +0000 (14:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Aug 2019 16:29:35 +0000 (18:29 +0200)
commit820402d2fc3f6cf888809783e8e735786b130bb1
tree814280b9c7f625fda1b1bd1c5a60a55d857973af
parent1235f5e013d6d3267204cff4a350184c13039c94
fs/adfs: super: fix use-after-free bug

[ Upstream commit 5808b14a1f52554de612fee85ef517199855e310 ]

Fix a use-after-free bug during filesystem initialisation, where we
access the disc record (which is stored in a buffer) after we have
released the buffer.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/adfs/super.c