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 | Vendor | Product | Affected 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.
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.
References
- https://github.com/rust-x-bindings/rust-xcb/issues/167
- https://github.com/rust-x-bindings/rust-xcb/issues/282
- https://github.com/rust-x-bindings/rust-xcb/pull/283
- https://github.com/rustsec/advisory-db/pull/2355
- https://github.com/rust-x-bindings/rust-xcb/commit/da830976870c1174e3b33eb064317...
- https://rustsec.org/advisories/RUSTSEC-2025-0051.html
- https://github.com/advisories/GHSA-655h-hg88-5qmf
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)
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
GHSA-655h-hg88-5qmf · GHSA
Track software like this
Free during beta