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 17:06:49 +0000 (19:06 +0200)
commita093208b4c73fcf4519828a8338245c139ecfd4b
treeb2010474b59df615ccd826f580d67b8086e6dde4
parent85d854b421130b3f9a6bee50be9f159e578e6b6d
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