Files
linux/fs/hfsplus
Dongliang Mu 07db5e247a fs: hfsplus: fix UAF issue in hfsplus_put_super
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]>
2023-03-02 21:54:23 -08:00
..
…
2018-10-31 08:54:13 -07:00
2023-01-19 09:24:26 +01:00
2021-04-12 15:04:29 +02:00
2018-08-22 10:52:50 -07:00
…
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:28 +01:00
2018-08-22 10:52:50 -07:00