]> git.dujemihanovic.xyz Git - linux.git/commit
bcachefs: Fix a UAF after write_super()
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 20 Jun 2024 23:42:39 +0000 (19:42 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 21 Jun 2024 14:17:07 +0000 (10:17 -0400)
commit2fe79ce7d1e8ec5059e7dfc15f3c769ae9679569
tree2d65be5f950ce8e9d89c633e0b08f67917dfe455
parente6b3a655ac7ba5282b1504851488236865804cb8
bcachefs: Fix a UAF after write_super()

write_super() may reallocate the superblock buffer - but
bch_sb_field_ext was referencing it; don't use it after the write_super
call.

Reported-by: syzbot+8992fc10a192067b8d8a@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery.c