fcaps: clear the same personality flags as suid when fcaps are used
authorEric Paris <eparis@redhat.com>
Tue, 17 Apr 2012 20:26:54 +0000 (16:26 -0400)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 5 Apr 2013 06:12:58 +0000 (09:12 +0300)
commitf0e72176d2c136710e022503ab1312df0d61d464
tree463ea08701adabdeafe83e97fe1e20849093d123
parent5fbdc9b559fe16010fef8a07ed110ac94796f040
fcaps: clear the same personality flags as suid when fcaps are used

commit d52fc5dde171f030170a6cb78034d166b13c9445 upstream.

If a process increases permissions using fcaps all of the dangerous
personality flags which are cleared for suid apps should also be cleared.
Thus programs given priviledge with fcaps will continue to have address space
randomization enabled even if the parent tried to disable it to make it
easier to attack.

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/commoncap.c