All reports
Medium

frr: FRRouting FRR: Privilege escalation via TOCTOU race condition

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2022-42917

Probability of exploitation in the next 30 days: 0.12%

FIRST EPSS · 2026-11-23

Description

In FRRouting FRR before 8.5, the service user (usually frr) can escalate its privileges to root by monitoring the configuration directory (/etc/frr) and replacing config files upon creation with, for example, symlinks to change the ownership of arbitrary files. This is a TOCTOU Race Condition caused by a combination of touch and chown.

A flaw was found in FRRouting FRR. A local service user can exploit a Time-of-check to time-of-use (TOCTOU) race condition by monitoring the configuration directory and replacing configuration files with symbolic links during their creation. This manipulation allows the user to change the ownership of arbitrary files. This can lead to privilege escalation, allowing the service user to gain root privileges.