1. CVE archive
  2. 2012
  3. CVE-2012-0871

CVE-2012-0871

6.3 Medium severity CVSS v2.0 · source NVD AV:L/AC:M/Au:N/C:N/I:C/A:C 6.3 – Medium

Description

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/.

Affected products

VendorProductVersionPlatform
opensuse opensuse 12.1 –
systemd project systemd <= 037 –
systemd project systemd 1 –
systemd project systemd 2 –
systemd project systemd 3 –
systemd project systemd 4 –
systemd project systemd 5 –
systemd project systemd 6 –
systemd project systemd 7 –
systemd project systemd 8 –
systemd project systemd 9 –
systemd project systemd 10 –
systemd project systemd 11 –
systemd project systemd 12 –
systemd project systemd 13 –
systemd project systemd 14 –
systemd project systemd 15 –
systemd project systemd 16 –
systemd project systemd 17 –
systemd project systemd 18 –
systemd project systemd 19 –
systemd project systemd 20 –
systemd project systemd 21 –
systemd project systemd 22 –
systemd project systemd 23 –
systemd project systemd 24 –
systemd project systemd 25 –
systemd project systemd 26 –
systemd project systemd 27 –
systemd project systemd 28 –
systemd project systemd 29 –
systemd project systemd 30 –
systemd project systemd 31 –
systemd project systemd 32 –
systemd project systemd 33 –
systemd project systemd 34 –
systemd project systemd 35 –
systemd project systemd 36 –
All 55 Systemd Project Systemd vulnerabilities

Vulnerability type

CWE-59 Improper Link Resolution Before File Access

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.

Impact on systems

ScopeImpact
Confidentiality, Integrity, Access Control Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism
An attacker may be able to traverse the file system to unintended locations and read or overwrite the contents of unexpected files. If the files are used for a security mechanism then an attacker may be able to bypass the mechanism.
Other Execute Unauthorized Code or Commands
Windows simple shortcuts, sometimes referred to as soft links, can be exploited remotely since a .LNK file can be uploaded like a normal file. This can enable remote execution.

How to prevent it

Architecture and Design · Separation of Privilege 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.

All 1,878 CWE-59 CVEs, with trend and prevention

Source: MITRE CWE catalog · cwe.mitre.org