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.test.osv.dev/v1/vulns/RUSTSEC-2025-0051
Published
2025-08-05T12:00:00Z
Modified
2025-08-22T11:20:53Z
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

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

Database specific

{
    "cvss": null,
    "informational": "unsound",
    "categories": []
}