Skip to content

Commit a33fb01

Browse files
fs/ntfs3: Fix general protection fault in run_is_mapped_full
Fixed deleating of a non-resident attribute in ntfs_create_inode() rollback. Reported-by: syzbot+9af29acd8f27fbce94bc@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent 090f612 commit a33fb01

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

fs/ntfs3/inode.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,10 @@ int ntfs_create_inode(struct mnt_idmap *idmap, struct inode *dir,
17181718
attr = ni_find_attr(ni, NULL, NULL, ATTR_EA, NULL, 0, NULL, NULL);
17191719
if (attr && attr->non_res) {
17201720
/* Delete ATTR_EA, if non-resident. */
1721-
attr_set_size(ni, ATTR_EA, NULL, 0, NULL, 0, NULL, false, NULL);
1721+
struct runs_tree run;
1722+
run_init(&run);
1723+
attr_set_size(ni, ATTR_EA, NULL, 0, &run, 0, NULL, false, NULL);
1724+
run_close(&run);
17221725
}
17231726

17241727
if (rp_inserted)

0 commit comments

Comments
 (0)