CVE-2023-50711: Vmm sys util `serde` Deserialization For `FamStructWrapper` Lacks Vulnerability

MODERATE
Advisory Identifier: GHSA-875g-mfp6-g7f9
CVSS 5.7
CWE-787
Published
Advisory Summary

CVE-2023-50711 is a MODERATE (CVSS 5.7) `serde` deserialization for `famstructwrapper` lacks vulnerability (CWE-787: Out-of-bounds Write) affecting Vmm sys util libraries in the crates.io ecosystem. The issue involves `serde` deserialization for `famstructwrapper` lacks bound checks that could potentially lead to out-of-bounds memory access. Remediation is available by upgrading affected packages to version 0.12.0.

CVE-2023-50711 at a Glance

CVE Identifier CVE-2023-50711
GHSA Identifier GHSA-875g-mfp6-g7f9
Severity MODERATE
CVSS v3.1 Base Score 5.7
CWE Classification CWE-787: Out-of-bounds Write
Affected Product Vmm sys util
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2023-50711

To remediate this vulnerability, upgrade all affected Vmm sys util dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

vmm-sys-util fixed: 0.12.0
Upgrade vmm-sys-util to 0.12.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for vmm-sys-util

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-50711, inspect your project dependencies for Vmm sys util:

inspect dependencies for vmm-sys-util

Analyze the terminal output to locate any version of Vmm sys util in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Vmm sys util, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact An issue was discovered in the FamStructWrapper::deserialize implementation provided by the crate for vmm_sys_util::fam::FamStructWrapper, which can lead to out of bounds memory accesses. The deserialization does not check that the length stored in the header matches the flexible array length. Mismatch in the lengths might allow out of bounds memory access through Rust-safe methods. Impacted versions: >= 0.5.0 ### Patches The issue was corrected in version 0.12.0 by inserting a check that verifies the lengths of compared flexible arrays are equal for any deserialized header and aborting deserialization otherwise. Moreover, the API was changed so that header length can only be modified through Rust-unsafe code. This ensures that users cannot trigger out-of-bounds memory access from Rust-safe code.

CVE-2023-50711 Affected Vmm sys util Versions

1 component(s)
Fixed Versions:
0.12.0
Product / Package Ecosystem Affected Versions Fixed Version
vmm-sys-util
crates.io
≥ 0.5.0
< 0.12.0
0.12.0

References

Frequently Asked Questions

What is CVE-2023-50711?
CVE-2023-50711 is a security vulnerability in Vmm sys util involving `serde` deserialization for `FamStructWrapper` lacks bound checks that could potentially lead to out-of-bounds memory access under CWE-787: Out-of-bounds Write.
Which Vmm sys util versions are affected?
Affected versions include releases prior to 0.12.0 across affected packages: vmm-sys-util.
What version fixes CVE-2023-50711?
Upgrading to 0.12.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vmm-sys-util affected?
Yes, vmm-sys-util is affected in releases prior to 0.12.0. Upgrade your dependency to 0.12.0 or later.
What is the CVSS score of CVE-2023-50711?
CVE-2023-50711 has a CVSS v3.1 base score of 5.7 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L.
What CWE is associated with CVE-2023-50711?
CVE-2023-50711 is classified under CWE-787: Out-of-bounds Write (The product writes data past the end, or before the beginning, of the intended buffer.).
How can I check crates.io dependencies for CVE-2023-50711?
Run the dependency tree command: 'inspect dependencies for vmm-sys-util'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-875g-mfp6-g7f9",
  "modified" : "2024-02-10T03:30:19Z",
  "published" : "2024-01-02T16:28:08Z",
  "aliases" : [ "CVE-2023-50711" ],
  "summary" : "`serde` deserialization for `FamStructWrapper` lacks bound checks that could potentially lead to out-of-bounds memory access",
  "details" : "### Impact\n\nAn issue was discovered in the FamStructWrapper::deserialize implementation provided by the crate for vmm_sys_util::fam::FamStructWrapper, which can lead to out of bounds memory accesses. The deserialization does not check that the length stored in the header matches the flexible array length. Mismatch in the lengths might allow out of bounds memory access through Rust-safe methods.\n\nImpacted versions: >= 0.5.0\n\n### Patches\n\nThe issue was corrected in version 0.12.0 by inserting a check that verifies the lengths of compared flexible arrays are equal for any deserialized header and aborting deserialization otherwise. Moreover, the API was changed so that header length can only be modified through Rust-unsafe code. This ensures that users cannot trigger out-of-bounds memory access from Rust-safe code.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "vmm-sys-util"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.5.0"
      }, {
        "fixed" : "0.12.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rust-vmm/vmm-sys-util/security/advisories/GHSA-875g-mfp6-g7f9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50711"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-vmm/vmm-sys-util/commit/30172fca2a8e0a38667d934ee56682247e13f167"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rust-vmm/vmm-sys-util"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W5XMCLV2P3ANS3XN4NXZTV4PUNTLWUNJ"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0002.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-787" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-02T16:28:08Z",
    "nvd_published_at" : "2024-01-02T20:15:10Z"
  }
}