CVE-2022-23523: Linux loader Linux-loader Reading Beyond EOF Could Vulnerability

LOW
Advisory Identifier: GHSA-52h2-m2cf-9jh6
CVSS 1.9
CWE-125 CWE-835 CWE-119
Published
Advisory Summary

CVE-2022-23523 is a LOW (CVSS 1.9) linux-loader reading beyond eof could vulnerability (CWE-125: Out-of-bounds Read) affecting Linux loader libraries in the crates.io ecosystem. The issue involves linux-loader reading beyond eof could lead to infinite loop. Remediation is available by upgrading affected packages to version 0.8.1.

CVE-2022-23523 at a Glance

CVE Identifier CVE-2022-23523
GHSA Identifier GHSA-52h2-m2cf-9jh6
Severity LOW
CVSS v3.1 Base Score 1.9
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Linux loader
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 1.9

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

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

How to Fix CVE-2022-23523

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

linux-loader fixed: 0.8.1
Upgrade linux-loader to 0.8.1
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 linux-loader

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-23523, inspect your project dependencies for Linux loader:

inspect dependencies for linux-loader

Analyze the terminal output to locate any version of Linux loader in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.1), 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-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Linux loader, 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 The linux-loader crate used the offsets and sizes provided in the ELF headers to determine the offsets to read from. If those offsets pointed beyond the end of the file this could lead to an infinite loop. Virtual Machine Monitors using the `linux-loader` crate could enter an infinite loop if the ELF header of the kernel they are loading was modified in a malicious manner. ### Patches The issue has been addressed in 0.8.1 ### Workarounds The issue can be mitigated by ensuring that only trusted kernel images are loaded or by verifying that the headers to not point beyond the end of the file. ### References See: https://github.com/rust-vmm/linux-loader/pull/125

CVE-2022-23523 Affected Linux loader Versions

1 component(s)
Fixed Versions:
0.8.1
Product / Package Ecosystem Affected Versions Fixed Version
linux-loader
crates.io
< 0.8.1
0.8.1

References

Frequently Asked Questions

What is CVE-2022-23523?
CVE-2022-23523 is a security vulnerability in Linux loader involving linux-loader reading beyond EOF could lead to infinite loop under CWE-125: Out-of-bounds Read.
Which Linux loader versions are affected?
Affected versions include releases prior to 0.8.1 across affected packages: linux-loader.
What version fixes CVE-2022-23523?
Upgrading to 0.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is linux-loader affected?
Yes, linux-loader is affected in releases prior to 0.8.1. Upgrade your dependency to 0.8.1 or later.
What is the CVSS score of CVE-2022-23523?
CVE-2022-23523 has a CVSS v3.1 base score of 1.9 (LOW) with vector string CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2022-23523?
CVE-2022-23523 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check crates.io dependencies for CVE-2022-23523?
Run the dependency tree command: 'inspect dependencies for linux-loader'. 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-52h2-m2cf-9jh6",
  "modified" : "2022-12-12T22:35:41Z",
  "published" : "2022-12-12T22:35:41Z",
  "aliases" : [ "CVE-2022-23523" ],
  "summary" : "linux-loader reading beyond EOF could lead to infinite loop",
  "details" : "### Impact\nThe linux-loader crate used the offsets and sizes provided in the ELF headers to determine the offsets to read from. If those offsets pointed beyond the end of the file this could lead to an infinite loop. Virtual Machine Monitors using the `linux-loader` crate could enter an infinite loop if the ELF header of the kernel they are loading was modified in a malicious manner.\n\n### Patches\nThe issue has been addressed in 0.8.1\n\n### Workarounds\nThe issue can be mitigated by ensuring that only trusted kernel images are loaded or by verifying that the headers to not point beyond the end of the file.\n\n### References\n\nSee: https://github.com/rust-vmm/linux-loader/pull/125\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "linux-loader"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rust-vmm/linux-loader/security/advisories/GHSA-52h2-m2cf-9jh6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23523"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-vmm/linux-loader/pull/125"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-vmm/linux-loader/commit/a44f152da4f38c538ed492b1efa8515be2047db2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rust-vmm/linux-loader"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119", "CWE-125", "CWE-835" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-12T22:35:41Z",
    "nvd_published_at" : "2022-12-13T08:15:00Z"
  }
}