1. 21 9月, 2019 1 次提交
  2. 21 11月, 2018 1 次提交
    • M
      ovl: automatically enable redirect_dir on metacopy=on · be677259
      Miklos Szeredi 提交于
      commit d47748e5 upstream.
      
      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: NDaniel Walsh <dwalsh@redhat.com>
      Fixes: d5791044 ("ovl: Provide a mount option metacopy=on/off...")
      Cc: <stable@vger.kernel.org> # v4.19
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      be677259
  3. 20 7月, 2018 2 次提交
  4. 31 5月, 2018 1 次提交
  5. 12 4月, 2018 1 次提交
  6. 24 1月, 2018 3 次提交
  7. 11 12月, 2017 1 次提交
    • M
      ovl: don't follow redirects if redirect_dir=off · 438c84c2
      Miklos Szeredi 提交于
      Overlayfs is following redirects even when redirects are disabled. If this
      is unintentional (probably the majority of cases) then this can be a
      problem.  E.g. upper layer comes from untrusted USB drive, and attacker
      crafts a redirect to enable read access to otherwise unreadable
      directories.
      
      If "redirect_dir=off", then turn off following as well as creation of
      redirects.  If "redirect_dir=follow", then turn on following, but turn off
      creation of redirects (which is what "redirect_dir=off" does now).
      
      This is a backward incompatible change, so make it dependent on a config
      option.
      Reported-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      438c84c2
  8. 05 10月, 2017 1 次提交
    • A
      ovl: fix regression caused by exclusive upper/work dir protection · 85fdee1e
      Amir Goldstein 提交于
      Enforcing exclusive ownership on upper/work dirs caused a docker
      regression: https://github.com/moby/moby/issues/34672.
      
      Euan spotted the regression and pointed to the offending commit.
      Vivek has brought the regression to my attention and provided this
      reproducer:
      
      Terminal 1:
      
        mount -t overlay -o workdir=work,lowerdir=lower,upperdir=upper none
              merged/
      
      Terminal 2:
      
        unshare -m
      
      Terminal 1:
      
        umount merged
        mount -t overlay -o workdir=work,lowerdir=lower,upperdir=upper none
              merged/
        mount: /root/overlay-testing/merged: none already mounted or mount point
               busy
      
      To fix the regression, I replaced the error with an alarming warning.
      With index feature enabled, mount does fail, but logs a suggestion to
      override exclusive dir protection by disabling index.
      Note that index=off mount does take the inuse locks, so a concurrent
      index=off will issue the warning and a concurrent index=on mount will fail.
      
      Documentation was updated to reflect this change.
      
      Fixes: 2cac0c00 ("ovl: get exclusive ownership on upper/work dirs")
      Cc: <stable@vger.kernel.org> # v4.13
      Reported-by: NEuan Kemp <euank@euank.com>
      Reported-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      85fdee1e
  9. 05 7月, 2017 1 次提交
  10. 05 5月, 2017 1 次提交
  11. 16 12月, 2016 3 次提交
  12. 01 9月, 2016 1 次提交
  13. 27 5月, 2016 1 次提交
  14. 12 11月, 2015 1 次提交
  15. 08 1月, 2015 1 次提交
  16. 13 12月, 2014 2 次提交
  17. 20 11月, 2014 1 次提交
  18. 24 10月, 2014 1 次提交