Q:

Sudo ownership changed, can't use sudo to fix it

I am using Ubuntu 17.04.
By mistake, I have changed the ownership of sudo. So now I can't make any changes as the chown command I could use to fix it needs sudo. 
If I use sudo I get 
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

A:

If you really just changed the ownership of the sudo command--that is, the file /usr/bin/sudo--then you can fix this by using pkexec instead of sudo to run chown and change the ownership back. This command does that:
pkexec chown root: /usr/bin/sudo

pkexec will prompt you for your password (as would sudo if you were able to run it).
root: means the same thing as root:root, in case you had changed the group owner as well.
If you have changed the ownership of many more files besides /usr/bin/sudo, and in particular if you have changed the ownership of all files in /usr/bin (which would also happen if you changed permissions on / or /usr but passed the -R flag to chown, specifying recursive operation), then that will not be sufficient.  But based on the description you have given in the question--that you have specifically changed the ownership of /usr/bin/sudo--running that one pkexec command should be sufficient.

