summaryrefslogtreecommitdiffstats
path: root/lib/test_sysctl.c
diff options
context:
space:
mode:
authorDongliang Mu <mudongliangabcd@gmail.com>2023-02-26 13:49:47 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-03-03 06:54:23 +0100
commit07db5e247ab5858439b14dd7cc1fe538b9efcf32 (patch)
treec208850ebb405da463e783f6c3c6dc4b39f4dd74 /lib/test_sysctl.c
parentpanic: fix the panic_print NMI backtrace setting (diff)
downloadlinux-07db5e247ab5858439b14dd7cc1fe538b9efcf32.tar.xz
linux-07db5e247ab5858439b14dd7cc1fe538b9efcf32.zip
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/20230226124948.3175736-1-mudongliangabcd@gmail.com Reported-by: syzbot+57e3e98f7e3b80f64d56@syzkaller.appspotmail.com Tested-by: Dongliang Mu <mudongliangabcd@gmail.com> Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com> Cc: Bart Van Assche <bvanassche@acm.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: Muchun Song <songmuchun@bytedance.com> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/test_sysctl.c')
0 files changed, 0 insertions, 0 deletions