-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sudo responds with "killed" #117
Comments
Exit code 137 most likely means sudo died from SIGKILL (128 + 9 == 137). Is there anything in the kernel message log that indicates why sudo was killed? One change in sudo 1.9.8 that could be relevant is that it is now compiled using -fstack-clash-protection and links with -z noexecstack. I wonder if either of those are causing problems. You can try passing configure the --disable-hardening option when building sudo and see if that makes any difference. |
Thanks for the quick answer.
No, nothing
Unfortunately that didn't help |
I did a I traced it down to
|
Does the uuid unit test crash or fail? For example:
should produce:
|
It looks like this is due to getentropy() failing. Perhaps sudo's configure script detected getentropy() in the C library but it is not actually implemented. You can override configure's check by setting ac_cv_func_getentropy=no in the environment. E.g.
That will cause sudo to use fallback code for this. I'll take a look at handling getentropy() returning ENOSYS. |
this also fails
|
That seems to "fix" it
|
Great. My best guess is that for older kernels the glibc getentropy() emulation is failing. Perhaps the kernel is too old to support getrandom(). I'll just disable the use of getentropy() in sudo on Linux by default. |
The glibc getentropy() emulation will fail on older kernels that don't support getrandom(). Also use sudo_fatal() instead of sending SIGKILL on getentropy() failure. GitHub issue #117.
Closing now that 00e53b3 has been committed. |
Is there going to be a new tag that includes this fix? |
I wasn't planning on one anytime soon. It is easy to workaround by just telling configure you don't have getentropy. |
In PostmarketOS, an Alpine base OS mainly targeted at smartphones we experience crashes of
sudo
when running on older kernels. It printsKilled
and returns with code 137.sudo-1.9.7_p1-r1
from alpine still works. Looks like the issue got introduced in 1.9.8.Related issue: https://gitlab.com/postmarketOS/pmaports/-/issues/1252
sudo_debug
The text was updated successfully, but these errors were encountered: