GHSA-655h-hg88-5qmf
LOWRust 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.
- Published
- 5 Aug 2025
- Last modified
- 28 Oct 2025
- Weakness
- CWE-666CWE-672
- Also known as
- RUSTSEC-2025-0051
- Sources
- OSVJSONOSV RUSTSEC-2025-0051JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:U |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | xcb | < 1.6.0 | 1.6.0 |
| OSV | crates.io | xcb | >= 0.0.0-0, < 1.6.0 | 1.6.0 |
References
- https://github.com/rust-x-bindings/rust-xcb/issues/167 · WEB, REPORT
- https://github.com/rust-x-bindings/rust-xcb/issues/282 · WEB, REPORT
- https://github.com/rust-x-bindings/rust-xcb/pull/283 · WEB
- https://github.com/rustsec/advisory-db/pull/2355 · WEB
- https://github.com/rust-x-bindings/rust-xcb/commit/da830976870c1174e3b33eb0643177be3991c002 · WEB
- https://github.com/rust-x-bindings/rust-xcb · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2025-0051.html · WEB, ADVISORY
- https://crates.io/crates/xcb · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 5 Aug 2025)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 22 Aug 2025)