Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
1.7

Rust XCB Connect Functions Can Close File Descriptors

published 1 year ago
Summary

Rust's XCB library has a bug that can cause file descriptors to be closed unexpectedly, leading to I/O errors. This affects developers using XCB version 1.5 or earlier. To fix, upgrade to XCB version 1.6.0 or later, and use the safe alternatives `connect_with_fd` and `connect_with_fd_and_extensions` instead of the old functions.

What to do
  • Update rtbo xcb to version 1.6.0.
Affected software
Ecosystem VendorProductAffected versions
rust rtbo xcb < 1.6.0
Fix: upgrade to 1.6.0
Original advisory text
Rust XCB `xcb::Connection::connect_to_fd*` functions violate I/O safety
The API of `xcb::Connection` has constructors which allow an arbitrary `RawFd` to be used as a socket connection. On either failure of these constructors or on the drop of `Connection`, it closes the associated file descriptor. Thus, a program which uses an `OwnedFd` (such as a `UnixStream`) as the file descriptor can close the file descriptor and continue to attempt using it or close an already-closed file descriptor, violating I/O safety.

Starting in version 1.6.0, `xcb` provides `Connection::connect_with_fd` and `Connection::connect_with_fd_and_extensions` as safe alternatives and deprecates the problematic functions.
Fix within
Internet-facing 60 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit (estimated)
  • Gives an attacker partial control (estimated)
Severity
1.7 Low
Type
CWE-666Operation on Resource in Wrong Phase of Lifetime
CWE-672Operation on a Resource after Expiration or Release
Timeline
Published22 Aug 2025
Updated13 Mar 2026
First seen6 Mar 2026
Sources
Track software like this
Free during beta