• Kent Overstreet's avatar
    bcachefs: Fix sb_field_downgrade validation · 692aa7a5
    Kent Overstreet authored
    - bch2_sb_downgrade_validate() wasn't checking for a downgrade entry
      extending past the end of the superblock section
    
    - for_each_downgrade_entry() is used in to_text() and needs to work on
      malformed input; it also was missing a check for a field extending
      past the end of the section
    
    Reported-by: syzbot+e49ccab73449180bc9be@syzkaller.appspotmail.com
    Fixes: 84f16387 ("bcachefs: bch_sb_field_downgrade")
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    692aa7a5
sb-downgrade.c 8.11 KB