{"id":"GHSA-655h-hg88-5qmf","summary":"Rust XCB `xcb::Connection::connect_to_fd*` functions violate I/O safety","details":"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.\n\nStarting 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.","aliases":["RUSTSEC-2025-0051"],"modified":"2025-10-28T06:29:23.247912Z","published":"2025-08-22T17:34:45Z","database_specific":{"cwe_ids":["CWE-666","CWE-672"],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2025-08-22T17:34:45Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/rust-x-bindings/rust-xcb/issues/167"},{"type":"WEB","url":"https://github.com/rust-x-bindings/rust-xcb/issues/282"},{"type":"WEB","url":"https://github.com/rust-x-bindings/rust-xcb/pull/283"},{"type":"WEB","url":"https://github.com/rustsec/advisory-db/pull/2355"},{"type":"WEB","url":"https://github.com/rust-x-bindings/rust-xcb/commit/da830976870c1174e3b33eb0643177be3991c002"},{"type":"PACKAGE","url":"https://github.com/rust-x-bindings/rust-xcb"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2025-0051.html"}],"affected":[{"package":{"name":"xcb","ecosystem":"crates.io","purl":"pkg:cargo/xcb"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.6.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-655h-hg88-5qmf/GHSA-655h-hg88-5qmf.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}