oss-sec mailing list archives
race condition checking digests/checksums in sudoers
From: Alyssa Milburn <amilburn () zall org>
Date: Tue, 10 Nov 2015 00:23:14 +0000
Hey all, Recent releases of sudo (since 1.8.7) support SHA-2 digests in the sudoers file, which the documentation states "may be useful in situations where the user invoking sudo has write access to the command or its parent directory". The sudoers plugin performs this digest verification while matching rules, and later independently calls execve() to execute the binary. This results in a race condition if the digest functionality is used as suggested (in fact, the rules are matched before the user is prompted for a password, so you have quite some time to replace the binary from underneath sudo). I'm not sure whether this problem is interesting enough to announce or not; I imagine this functionality isn't widely used, but it's clearly unsafe to use in such situations right now, and it seems like it would be a can of worms (at best) to make it completely safe. (Thanks to the maintainer for responding very quickly to my mail!) - Alyssa
Current thread:
- race condition checking digests/checksums in sudoers Alyssa Milburn (Nov 09)
- Re: race condition checking digests/checksums in sudoers cve-assign (Nov 10)
- Re: race condition checking digests/checksums in sudoers cve-assign (Nov 18)
- Re: race condition checking digests/checksums in sudoers Tomas Hoger (Dec 01)
- Re: race condition checking digests/checksums in sudoers cve-assign (Nov 10)