Skip to content

GHSA-c8hq-x4mm-p6q6 CVE-2020-36205 RUSTSEC-2020-0097

Memory handling issues in xcb

Medium crates.io
Severity
5.5 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.41%
Chance of exploitation in the next 30 days. Higher than 34.85% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-415 Double Free
CWE-416 Use After Free
Fix
1.0.0
Upgrade xcb to this version or later

Description

An issue was discovered in the xcb crate through 2020-12-10 for Rust. base::Error does not have soundness. Because of the public ptr field, a use-after-free or double-free can occur.

Affected versions

crates.io

PackageVulnerableFixed in
xcb
< 1.0.0
1.0.0
xcb
>= 0.0.0-0, < 1.0.0
1.0.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

xcb crates.io → 1.0.0

cargo
cargo update -p xcb --precise 1.0.0

Severity breakdown

CVSS 3.1 5.5

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-415: Double Free

The product calls free() twice on the same memory address.

How to prevent it
  • Architecture and Design: Choose a language that provides automatic memory management.
  • Implementation: Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.
  • Implementation: Use a static analysis tool to find double free instances.

CWE-416: Use After Free

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.

How to prevent it
  • Architecture and Design: Choose a language that provides automatic memory management.
  • Implementation: When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-655h-hg88-5qmf
Rust XCB `xcb::Connection::connect_to_fd*` functions violate I/O safety
Low Also affects xcb
GHSA-2xpg-3hx4-fm9r
Out of bounds read in xcb
Critical Also affects xcb
GO-2026-4981
Crash when handling long CNAME response in net
High Same weakness, CWE-415
GHSA-vfvv-c25p-m7mm
rkyv: Panic safety bugs in `InlineVec::clear` and `SerVec::clear` enable arbitrary code execution
Medium Same weakness, CWE-415
CVE-2026-33824
Double free in Windows IKE Extension allows an unauthorized attacker to execute code over a network.
Critical Known exploited Same weakness, CWE-415
CVE-2025-62215
Concurrent execution using shared resource with improper synchronization ('race condition') in Windows Kernel allows an authorized attacker to elevate…
High Known exploited Same weakness, CWE-415
GHSA-7mcq-f592-pf7v
Slice Ring Buffer and Slice Deque contains four unique double-free vulnerabilities triggered through safe APIs
High Same weakness, CWE-415
GHSA-pg9f-39pc-qf8g
crossbeam-channel Vulnerable to Double Free on Drop
Medium Same weakness, CWE-415
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor