The following flaw was reported in libXdmcp: Summary and Impact ------------------ XDM uses weak entropy to generate the session keys on non-BSD systems: void XdmcpGenerateKey (XdmAuthKeyPtr key) { #ifndef HAVE_ARC4RANDOM_BUF long lowbits, highbits; srandom ((int)getpid() ^ time((Time_t *)0)); lowbits = random (); highbits = random (); getbits (lowbits, key->data); getbits (highbits, key->data + 4); #else arc4random_buf(key->data, 8); #endif } 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.
Acknowledgments: Name: Eric Sesterhenn (X41 D-Sec GmbH)
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.
It appears that Fedora can enable arc4random in libXdmcp by adding `BuildRequires: libbsd-devel`.
Created libXdmcp tracking bugs for this issue: Affects: fedora-all [bug 1427716]
Statement: 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/.
Original reporter's advisory: https://www.x41-dsec.de/lab/advisories/x41-2017-001-xorg/ Upstream commit: https://cgit.freedesktop.org/xorg/lib/libXdmcp/commit/?id=0554324ec6bbc2071f5d1f8ad211a1643e29eb1f https://cgit.freedesktop.org/xorg/lib/libXdmcp/commit/?id=6d1aee0310001eca8f6ded9814a2a70b3a774896
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