...
If the program is run with the setuid-0
flag, the state of the UID
's over time might be:
Description | code Code | EUID | RUID | SSUID |
---|---|---|---|---|
program startup |
| 0 | user | 0 |
temporary drop | | user | user | 0 |
restore | | 0 | user | 0 |
permanent drop | | user | user | user |
restore (attacker) | | user | user | user |
If, for some reason, the program fails to restore privileges, it will be unable to permanently drop them later:
Description | code Code | EUID | RUID | SSUID |
---|---|---|---|---|
program startup |
| 0 | user | 0 |
temporary drop | | user | user | 0 |
restore | | user | user | 0 |
permanent drop | | user | user | 0 |
restore (attacker) | | 0 | 0 | 0 |
...