bcachefs: Add missing validation for superblock section clean
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 6 May 2024 02:28:00 +0000 (22:28 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 6 May 2024 14:58:17 +0000 (10:58 -0400)
commitf39055220f6f98a180e3503fe05bbf9921c425c8
treeb05e0089cf0c0d080acb9041c48654131d5c123b
parent6b8cbfc3db7582d6f26c6b757d8e949174641709
bcachefs: Add missing validation for superblock section clean

We were forgetting to check for jset entries that overrun the end of the
section - both in validate and to_text(); to_text() needs to be safe for
types that fail to validate.

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