Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-11790

ext4: include terminating u32 in size of xattr entries when expanding inodes

Details

    • 3
    • 9223372036854775807

    Description

      From: Theodore Ts'o <tytso@mit.edu>
      Subject: [PATCH] ext4: include terminating u32 in size of xattr entries when expanding inodes
      
      In ext4_expand_extra_isize_ea(), we calculate the total size of the xattr header, plus the xattr entries so we know how much of the beginning part of the xattrs to move when expanding the inode extra size. We need to include the terminating u32 at the end of the xattr entries, or else if there is uninitialized, non-zero bytes after the xattr entries and before the xattr values, the list of xattr entries won't be properly terminated.
      
      Reported-by: Steve Graham <stgraham2000@gmail.com>
      Signed-off-by: Theodore Ts'o <tytso@mit.edu>
      ---
      fs/ext4/xattr.c | 2 +-
      1 file changed, 1 insertion(+), 1 deletion(-)
      
      diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
      index 7fddd519adae..86ed9c686249 100644
      --- a/fs/ext4/xattr.c
      +++ b/fs/ext4/xattr.c
      @@ -2722,7 +2722,7 @@ int ext4_expand_extra_isize_ea(struct inode *inode,
               base = IFIRST(header);
               end = (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size;
               min_offs = end - base;
      -        total_ino = sizeof(struct ext4_xattr_ibody_header);
      +        total_ino = sizeof(struct ext4_xattr_ibody_header) + sizeof(u32);
      
               error = xattr_check_inode(inode, header, end);
               if (error)
      

      Attachments

        Activity

          [LU-11790] ext4: include terminating u32 in size of xattr entries when expanding inodes

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34314/
          Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes
          Project: fs/lustre-release
          Branch: b2_12
          Current Patch Set:
          Commit: 9894f5904bf5c1dd098cb569f6c1efb12feadc0b

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34314/ Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes Project: fs/lustre-release Branch: b2_12 Current Patch Set: Commit: 9894f5904bf5c1dd098cb569f6c1efb12feadc0b

          Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34314
          Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes
          Project: fs/lustre-release
          Branch: b2_12
          Current Patch Set: 1
          Commit: 58f266fdf37e5509038a7c9aae24f32a63450769

          gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34314 Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: 58f266fdf37e5509038a7c9aae24f32a63450769

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34270/
          Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes
          Project: fs/lustre-release
          Branch: b2_10
          Current Patch Set:
          Commit: 07ec3feade28bed117a8b1a93595296e723705fa

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34270/ Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes Project: fs/lustre-release Branch: b2_10 Current Patch Set: Commit: 07ec3feade28bed117a8b1a93595296e723705fa

          Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34270
          Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes
          Project: fs/lustre-release
          Branch: b2_10
          Current Patch Set: 1
          Commit: f134399730e79d1125d10f49168751470456cbb1

          gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34270 Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes Project: fs/lustre-release Branch: b2_10 Current Patch Set: 1 Commit: f134399730e79d1125d10f49168751470456cbb1
          pjones Peter Jones added a comment -

          Landed for 2.13

          pjones Peter Jones added a comment - Landed for 2.13

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33893/
          Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 7c800e460661972925a7acab51f023d0b38161b5

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33893/ Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes Project: fs/lustre-release Branch: master Current Patch Set: Commit: 7c800e460661972925a7acab51f023d0b38161b5

          Li Dongyang (dongyangli@ddn.com) uploaded a new patch: https://review.whamcloud.com/33893
          Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 93a8183d3290cf1697bf4b98c4787c282c767e3f

          gerrit Gerrit Updater added a comment - Li Dongyang (dongyangli@ddn.com) uploaded a new patch: https://review.whamcloud.com/33893 Subject: LU-11790 ldiskfs: add terminating u32 when expanding inodes Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 93a8183d3290cf1697bf4b98c4787c282c767e3f

          Hi Dongyang, can you please make patches for the affected kernels. 

          adilger Andreas Dilger added a comment - Hi Dongyang, can you please make patches for the affected kernels. 

          People

            dongyang Dongyang Li
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: