android_kernel_motorola_sm6375/fs/hfsplus
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dongliang Mu 3776ef785e fs: hfsplus: fix UAF issue in hfsplus_put_super
commit 07db5e247ab5858439b14dd7cc1fe538b9efcf32 upstream.

The current hfsplus_put_super first calls hfs_btree_close on
sbi->ext_tree, then invokes iput on sbi->hidden_dir, resulting in an
use-after-free issue in hfsplus_release_folio.

As shown in hfsplus_fill_super, the error handling code also calls iput
before hfs_btree_close.

To fix this error, we move all iput calls before hfsplus_btree_close.

Note that this patch is tested on Syzbot.

Link: https://lkml.kernel.org/r/[email protected]
Reported-by: [email protected]
Tested-by: Dongliang Mu <[email protected]>
Signed-off-by: Dongliang Mu <[email protected]>
Cc: Bart Van Assche <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-03-11 16:43:59 +01:00
..
attributes.c
bfind.c
bitmap.c
bnode.c
brec.c
btree.c
catalog.c
dir.c
extents.c
hfsplus_fs.h hfsplus: fix bug causing custom uid and gid being unable to be assigned with mount 2023-01-18 11:41:43 +01:00
hfsplus_raw.h
inode.c hfs/hfsplus: use WARN_ON for sanity check 2023-01-18 11:41:59 +01:00
ioctl.c
Kconfig
Makefile
options.c hfsplus: fix bug causing custom uid and gid being unable to be assigned with mount 2023-01-18 11:41:43 +01:00
part_tbl.c
super.c fs: hfsplus: fix UAF issue in hfsplus_put_super 2023-03-11 16:43:59 +01:00
tables.c
unicode.c
wrapper.c
xattr.c
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c