• 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
namei.c 18.9 KB