commit | bd411e563a7525fbc1140d2805a5e7d899c0463d | [log] [tgz] |
---|---|---|
author | Jann Horn <jann@thejh.net> | Sun Apr 19 02:48:39 2015 +0200 |
committer | chrmhoffmann <chrmhoffmann@gmail.com> | Sat Aug 12 17:38:53 2017 +0200 |
tree | 19e9c261dde8fb0ee737181a584b26dbeb2e7c7a | |
parent | 3c72acd887e270a062447e20cdb9aac57a6f62b8 [diff] |
fs: take i_mutex during prepare_binprm for set[ug]id executables This prevents a race between chown() and execve(), where chowning a setuid-user binary to root would momentarily make the binary setuid root. This patch was mostly written by Linus Torvalds. Signed-off-by: Jann Horn <jann@thejh.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Conflicts: fs/exec.c Change-Id: Iecebf23d07e299689e4ba4fd74ea8821ef96e72b