• Andrew Morton's avatar
    [PATCH] fix /proc/pid/fd ownership across setuid() · d24db0a5
    Andrew Morton authored
    From: "B. D. Elliott" <bde@nwlink.com>
    
    There's a bug:
    
    - Someone reads a (say) root-owned process's /proc/pid/fd directory
    
      The inodes are instantiated owned by root.
    
    - That process does a setuid
    
    - The /proc/pid/* files still have the old ownerships.
    
    This happened because we are now caching the proc entries.
    
    The patch rewrites the ownership of the inodes under /proc/pid in the
    d_revalidate() handler.
    d24db0a5
base.c 32.4 KB