bcachefs: Fix downgrade_table_extra()
Fix a UAF: we were calling darray_make_room() and retaining a pointer to the old buffer. And fix an UBSAN warning: struct bch_sb_field_downgrade_entry uses __counted_by, so set dst->nr_errors before assigning to the array entry. Reported-by:<syzbot+14c52d86ddbd89bea13e@syzkaller.appspotmail.com> Signed-off-by:
Kent Overstreet <kent.overstreet@linux.dev>
Loading
Please register or sign in to comment