{"id":"GHSA-655h-hg88-5qmf","aliases":["GHSA-655h-hg88-5qmf","RUSTSEC-2025-0051"],"related":[],"kind":"vulnerability","state":"published","title":"Rust XCB `xcb::Connection::connect_to_fd*` functions violate I/O safety","summary":"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.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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.","format":"markdown","source":"ghsa"}],"published":"2025-08-05T12:00:00.000Z","modified":"2025-10-28T06:29:23.247Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"}],"cwes":["CWE-666","CWE-672"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.6.0"}],"ecosystem":"crates.io","package":"xcb","purl":"pkg:cargo/xcb","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"1.6.0"}],"ecosystem":"crates.io","package":"xcb","purl":"pkg:cargo/xcb","source":"rustsec"}],"references":[{"url":"https://github.com/rust-x-bindings/rust-xcb/issues/167","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/rust-x-bindings/rust-xcb/issues/282","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/rust-x-bindings/rust-xcb/pull/283","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/rustsec/advisory-db/pull/2355","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rust-x-bindings/rust-xcb/commit/da830976870c1174e3b33eb0643177be3991c002","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rust-x-bindings/rust-xcb","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0051.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/xcb","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-655h-hg88-5qmf","url":"https://github.com/advisories/GHSA-655h-hg88-5qmf","licence":"CC-BY-4.0","modified":"2025-10-28T06:29:23.247Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2025-0051","url":"https://rustsec.org/advisories/RUSTSEC-2025-0051.html","licence":"CC0-1.0","modified":"2025-10-28T06:29:23.247Z"}],"updatedAt":"2026-11-25T22:56:43.262Z"}