1. 01 Nov, 2018 1 commit
    • Miklos Szeredi's avatar
      ovl: automatically enable redirect_dir on metacopy=on · d47748e5
      Miklos Szeredi authored
      Current behavior is to automatically disable metacopy if redirect_dir is
      not enabled and proceed with the mount.
      
      If "metacopy=on" mount option was given, then this behavior can confuse the
      user: no mount failure, yet metacopy is disabled.
      
      This patch makes metacopy=on imply redirect_dir=on.
      
      The converse is also true: turning off full redirect with redirect_dir=
      {off|follow|nofollow} will disable metacopy.
      
      If both metacopy=on and redirect_dir={off|follow|nofollow} is specified,
      then mount will fail, since there's no way to correctly resolve the
      conflict.
      Reported-by: default avatarDaniel Walsh <dwalsh@redhat.com>
      Fixes: d5791044 ("ovl: Provide a mount option metacopy=on/off...")
      Cc: <stable@vger.kernel.org> # v4.19
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      d47748e5
  2. 31 Oct, 2018 1 commit
    • Miklos Szeredi's avatar
      ovl: check whiteout in ovl_create_over_whiteout() · 5e127580
      Miklos Szeredi authored
      Kaixuxia repors that it's possible to crash overlayfs by removing the
      whiteout on the upper layer before creating a directory over it.  This is a
      reproducer:
      
       mkdir lower upper work merge
       touch lower/file
       mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merge
       rm merge/file
       ls -al merge/file
       rm upper/file
       ls -al merge/
       mkdir merge/file
      
      Before commencing with a vfs_rename(..., RENAME_EXCHANGE) verify that the
      lookup of "upper" is positive and is a whiteout, and return ESTALE
      otherwise.
      
      Reported by: kaixuxia <xiakaixu1987@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Fixes: e9be9d5e ("overlay filesystem")
      Cc: <stable@vger.kernel.org> # v3.18
      5e127580
  3. 26 Oct, 2018 11 commits
  4. 22 Oct, 2018 8 commits
  5. 21 Oct, 2018 3 commits
  6. 20 Oct, 2018 11 commits
  7. 19 Oct, 2018 5 commits