Time-of-check Time-of-use (TOCTOU) Affecting rust-zbus-polkit package, versions <5.1.0-1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.13% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-RUSTZBUSPOLKIT-19453042
  • published1 Sept 2026
  • disclosed31 Aug 2026

Introduced: 31 Aug 2026

CVE-2026-78422  (opens in a new tab)
CWE-367  (opens in a new tab)
CWE-686  (opens in a new tab)

How to fix?

Upgrade Debian:unstable rust-zbus-polkit to version 5.1.0-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream rust-zbus-polkit package and not the rust-zbus-polkit package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

Subject::new_for_owner() in the zbus_polkit crate encodes the uid entry of a unix-process polkit subject as an unsigned 32-bit integer (D-Bus type u), whereas the org.freedesktop.PolicyKit1.Authority interface specifies a signed 32-bit integer (D-Bus type i). Because of this type mismatch, polkit silently discards the caller-supplied UID and instead determines the subject's owner itself by looking up the PID in /proc, a lookup that is inherently subject to a time-of-check/time-of-use race.

Consequently, an application that passes a UID obtained from a trustworthy source — for example SO_PEERCRED Unix socket peer credentials — in order to defend against PID reuse receives no protection, and the supplied UID has no effect on the authorization decision. A local unprivileged attacker who can cause an authorized process to terminate and then win the race to have their own process assigned the same PID can be authorized under the identity of the terminated process, bypassing the polkit authorization check and performing actions the attacker is not entitled to.

This issue affects zbus_polkit before 5.1.0.