Linux
Last updated
Was this helpful?
Last updated
Was this helpful?
/
kernel from 5.8 to 5.17
Exploiting the bug requires that the user have sudo privileges that allow them to run commands with an arbitrary user ID. Typically, this means that the user’s sudoers entry has the special value ALL
in the Runas specifier.
ex. alice myhost = (ALL) /usr/bin/id
If a sudoers entry is written to allow the user to run a command as any user except root, the bug can be used to avoid this restriction.
ex. bob myhost = (ALL, !root) /usr/bin/vi
You have to find log files on which logrotate is run and on which you have write permissions. Then run exploit on the writable log file.
Prepare payload
If "create"-option
is set in logrotate.cfg:
If "compress"-option
is set in logrotate.cfg:
sudo 1.8.21 | 1.8.31 | 1.8.27 | 1.9.2 | other
sudo < 1.8.28
/ Polkit < 0.105-26
Logrotate 3.8.6 | 3.11.0 | 3.15.0 | 3.18.0