• Miklos Szeredi's avatar
    ovl: check privs before decoding file handle · c846af05
    Miklos Szeredi authored
    CAP_DAC_READ_SEARCH is required by open_by_handle_at(2) so check it in
    ovl_decode_real_fh() as well to prevent privilege escalation for
    unprivileged overlay mounts.
    
    [Amir] If the mounter is not capable in init ns, ovl_check_origin() and
    ovl_verify_index() will not function as expected and this will break index
    and nfs export features.  So check capability in ovl_can_decode_fh(), to
    auto disable those features.
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    c846af05
namei.c 28.6 KB