diff options
author | Colin Walters <walters@redhat.com> | 2015-06-04 12:15:18 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-06-17 12:59:36 -0400 |
commit | ea544ffc18405237ccd95d28d7f45afef49aca17 (patch) | |
tree | 1f3b11087f101e608f18a1f30fb55fb7a7465218 /configure.ac | |
parent | 8277d89eb530db5254aed1a66cf52c11243675a8 (diff) | |
download | polkit-ea544ffc18405237ccd95d28d7f45afef49aca17.tar.gz |
CVE-2015-4625: Use unpredictable cookie values, keep them secret
Tavis noted that it'd be possible with a 32 bit counter for someone to
cause the cookie to wrap by creating Authentication requests in a
loop.
Something important to note here is that wrapping of signed integers
is undefined behavior in C, so we definitely want to fix that. All
counter integers used in this patch are unsigned.
See the comment above `authentication_agent_generate_cookie` for
details, but basically we're now using a cookie of the form:
```
<agent serial> - <agent random id> - <session serial> - <session
random id>
```
Which has multiple 64 bit counters, plus unpredictable random 128 bit
integer ids (effectively UUIDs, but we're not calling them that
because we don't need to be globally unique.
We further ensure that the cookies are not visible to other processes
by changing the setuid helper to accept them over standard input. This
means that an attacker would have to guess both ids.
In any case, the security hole here is better fixed with the other
change to bind user id (uid) of the agent with cookie lookups, making
cookie guessing worthless.
Nevertheless, I think it's worth doing this change too, for defense in
depth.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90832
CVE: CVE-2015-4625
Reported-by: Tavis Ormandy <taviso@google.com>
Reviewed-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Colin Walters <walters@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index d9a97bb..91cc627 100644 --- a/configure.ac +++ b/configure.ac @@ -121,7 +121,7 @@ if test "x$GCC" = "xyes"; then changequote([,])dnl fi -PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-2.0 >= 2.30.0]) +PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-unix-2.0 >= 2.30.0]) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_30], |