RUSTSEC-2025-0051

Source
https://rustsec.org/advisories/RUSTSEC-2025-0051
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0051.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2025-0051
Aliases
Published
2025-08-05T12:00:00Z
Modified
2025-10-28T06:29:23.247912Z
Summary
`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.

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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / xcb

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
1.6.0

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "functions": [
            "xcb::Connection::connect_to_fd",
            "xcb::Connection::connect_to_fd_with_extensions"
        ],
        "os": [],
        "arch": []
    }
}

Database specific

categories
[]
cvss
null
informational
"unsound"
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0051.json"