+27
−14
Loading
If an unprivileged task is allowed to relabel itself (/smack/relabel-self is not empty), it can freely create new labels by writing their names into own /proc/PID/attr/smack/current This occurs because do_setattr() imports the provided label in advance, before checking "relabel-self" list. This change ensures that the "relabel-self" list is checked before importing the label. Fixes: 38416e53 ("Smack: limited capability for changing process label") Signed-off-by:Konstantin Andreev <andreev@swemel.ru> Signed-off-by:
Casey Schaufler <casey@schaufler-ca.com>