Tadeusz Struk
unread,Sep 15, 2022, 4:34:37 PM9/15/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to syzbot+70627c...@syzkaller.appspotmail.com, syzkaller-a...@googlegroups.com, tadeus...@linaro.org
#syz test:
https://android.googlesource.com/kernel/common android12-5.10-lts
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 38531c5e16c6..6562fad27dde 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1583,6 +1583,11 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i,
/* Compute min_offs and last. */
last = s->first;
+ if (!last) {
+ ret = -EFSCORRUPTED;
+ goto out;
+ }
+
for (; !IS_LAST_ENTRY(last); last = next) {
next = EXT4_XATTR_NEXT(last);
if ((void *)next >= s->end) {
--
2.37.3