Add support for using 3-arg pkcheck syntax for process (CVE-2013-4311)
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 28 Aug 2013 14:25:40 +0000 (15:25 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 18 Sep 2013 16:44:15 +0000 (17:44 +0100)
commit69a4bc670bdbb2bb64a92214f0e726fda77aecc4
treeedb687da9aaf384f3e8cd9c0a905db22c0764fb7
parent93853474a689d73895a7ff2c4b80149056cb6061
Add support for using 3-arg pkcheck syntax for process (CVE-2013-4311)

With the existing pkcheck (pid, start time) tuple for identifying
the process, there is a race condition, where a process can make
a libvirt RPC call and in another thread exec a setuid application,
causing it to change to effective UID 0. This in turn causes polkit
to do its permission check based on the wrong UID.

To address this, libvirt must get the UID the caller had at time
of connect() (from SO_PEERCRED) and pass a (pid, start time, uid)
triple to the pkcheck program.

Signed-off-by: Colin Walters <walters@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 922b7fda77b094dbf022d625238262ea05335666)

Conflicts:
src/access/viraccessdriverpolkit.c

Resolution:
  Dropped file that does not exist in this branch.
configure.ac
daemon/remote.c
libvirt.spec.in