Bug 1424987 (CVE-2017-2625) - CVE-2017-2625 libXdmcp: weak entropy usage for session keys
Summary: CVE-2017-2625 libXdmcp: weak entropy usage for session keys
Alias: CVE-2017-2625
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1427716 1431689
Blocks: 1424993
TreeView+ depends on / blocked
Reported: 2017-02-20 09:25 UTC by Martin Prpič
Modified: 2021-02-17 02:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
It was discovered that libXdmcp used weak entropy to generate session keys. On a multi-user system using xdmcp, a local attacker could potentially use information available from the process list to brute force the key, allowing them to hijack other users' sessions.
Clone Of:
Last Closed: 2017-03-01 00:37:13 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1865 0 normal SHIPPED_LIVE Moderate: X.org X11 libraries security, bug fix and enhancement update 2017-08-01 17:50:43 UTC

Description Martin Prpič 2017-02-20 09:25:40 UTC
The following flaw was reported in libXdmcp:

Summary and Impact

XDM uses weak entropy to generate the session keys on non-BSD systems:

    XdmcpGenerateKey (XdmAuthKeyPtr key)
        long    lowbits, highbits;
        srandom ((int)getpid() ^ time((Time_t *)0));
        lowbits = random ();
        highbits = random ();
        getbits (lowbits, key->data);
        getbits (highbits, key->data + 4);
        arc4random_buf(key->data, 8);

On multi user systems it might possible to check the PID of the process and how long it is running to get an estimate of these values, which could allow an attacker to attach to the session of a different user.

Comment 1 Martin Prpič 2017-02-20 09:25:43 UTC

Name: Eric Sesterhenn (X41 D-Sec GmbH)

Comment 2 Doran Moppert 2017-02-27 06:28:05 UTC
Adjusted CVSS to include PR:L (attacker must have local shell privileges).

This could be quite a serious attack against xdmcp-based terminal servers in the absence of process namespaces, but this is no longer a common setup.

Comment 5 Doran Moppert 2017-02-27 06:38:49 UTC
It appears that Fedora can enable arc4random in libXdmcp by adding `BuildRequires: libbsd-devel`.

Comment 6 Doran Moppert 2017-03-01 00:17:41 UTC
Created libXdmcp tracking bugs for this issue:

Affects: fedora-all [bug 1427716]

Comment 7 Eric Christensen 2017-07-26 14:04:14 UTC

Red Hat Product Security has rated this issue as having Moderate security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 9 errata-xmlrpc 2017-08-01 16:04:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1865 https://access.redhat.com/errata/RHSA-2017:1865

Note You need to log in before you can comment on or make changes to this bug.