Interesting! Does sudo somehow get confused about checking for a password at all when the current date is the UNIX epoch? I wonder, does this require the user to be listed in sudoers with any privileges or is it just straight to root?
Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
11–20 of 74 posts
Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#12Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#13From the vulnerability announcement, it seems like this only allows a user to "set" NOPASSWD for that user's sudo regardless of what's in sudoers. It also doesn't seem to allow escalation beyond what's in sudoers. Am I missing something?
Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#14 Only the superuser may set the date, and if the system securelevel (see
securelevel(7)) is greater than 1, the time may not be changed by more
than 1 second.
EDIT: so you need to be root anyway or have root access to change the date.Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#15Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#16From the FreeBSD man for date Only the superuser may set the date, and if the system securelevel (see securelevel(7)) is greater than 1, the time may not be changed by more than 1 second. EDIT: so you need to be root anyway or have root access to change the date.
Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#17Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#18TL;DR: users in /etc/sudoers can run code as root with sudo.
Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#19Re: Run sudo -k, set your clock to 01.01.1970, run sudo su and boom you're root
#20From the vulnerability announcement, it seems like this only allows a user to "set" NOPASSWD for that user's sudo regardless of what's in sudoers. It also doesn't seem to allow escalation beyond what's in sudoers. Am I missing something?
It's certainly worth mentioning (and patching), but I wouldn't describe it as "and boom you're root".