CVE Vulnerabilities

CVE-2012-0871

Improper Link Resolution Before File Access ('Link Following')

Published: Apr 18, 2014 | Modified: Apr 12, 2025
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
6.3 MEDIUM
AV:L/AC:M/Au:N/C:N/I:C/A:C
RedHat/V2
RedHat/V3
Ubuntu
root.io logo minimus.io logo echo.ai logo

The session_link_x11_socket function in login/logind-session.c in systemd-logind in systemd, possibly 37 and earlier, allows local users to create or overwrite arbitrary files via a symlink attack on the X11 user directory in /run/user/.

Weakness

The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

Affected Software

NameVendorStart VersionEnd Version
SystemdSystemd_project*037 (including)
SystemdSystemd_project1 (including)1 (including)
SystemdSystemd_project2 (including)2 (including)
SystemdSystemd_project3 (including)3 (including)
SystemdSystemd_project4 (including)4 (including)
SystemdSystemd_project5 (including)5 (including)
SystemdSystemd_project6 (including)6 (including)
SystemdSystemd_project7 (including)7 (including)
SystemdSystemd_project8 (including)8 (including)
SystemdSystemd_project9 (including)9 (including)
SystemdSystemd_project10 (including)10 (including)
SystemdSystemd_project11 (including)11 (including)
SystemdSystemd_project12 (including)12 (including)
SystemdSystemd_project13 (including)13 (including)
SystemdSystemd_project14 (including)14 (including)
SystemdSystemd_project15 (including)15 (including)
SystemdSystemd_project16 (including)16 (including)
SystemdSystemd_project17 (including)17 (including)
SystemdSystemd_project18 (including)18 (including)
SystemdSystemd_project19 (including)19 (including)
SystemdSystemd_project20 (including)20 (including)
SystemdSystemd_project21 (including)21 (including)
SystemdSystemd_project22 (including)22 (including)
SystemdSystemd_project23 (including)23 (including)
SystemdSystemd_project24 (including)24 (including)
SystemdSystemd_project25 (including)25 (including)
SystemdSystemd_project26 (including)26 (including)
SystemdSystemd_project27 (including)27 (including)
SystemdSystemd_project28 (including)28 (including)
SystemdSystemd_project29 (including)29 (including)
SystemdSystemd_project30 (including)30 (including)
SystemdSystemd_project31 (including)31 (including)
SystemdSystemd_project32 (including)32 (including)
SystemdSystemd_project33 (including)33 (including)
SystemdSystemd_project34 (including)34 (including)
SystemdSystemd_project35 (including)35 (including)
SystemdSystemd_project36 (including)36 (including)
OpensuseOpensuse12.1 (including)12.1 (including)

Potential Mitigations

  • Follow the principle of least privilege when assigning access rights to entities in a software system.
  • Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

References