CVE-2024-43806 (GCVE-0-2024-43806)

Vulnerability from cvelistv5 – Published: 2024-08-26 18:43 – Updated: 2024-08-26 19:40
VLAI
Title
`rustix::fs::Dir` iterator with the `linux_raw` backend can cause memory explosion
Summary
Rustix is a set of safe Rust bindings to POSIX-ish APIs. When using `rustix::fs::Dir` using the `linux_raw` backend, it's possible for the iterator to "get stuck" when an IO error is encountered. Combined with a memory over-allocation issue in `rustix::fs::Dir::read_more`, this can cause quick and unbounded memory explosion (gigabytes in a few seconds if used on a hot path) and eventually lead to an OOM crash of the application. The symptoms were initially discovered in https://github.com/imsnif/bandwhich/issues/284. That post has lots of details of our investigation. Full details can be read on the GHSA-c827-hfw6-qwvm repo advisory. If a program tries to access a directory with its file descriptor after the file has been unlinked (or any other action that leaves the `Dir` iterator in the stuck state), and the implementation does not break after seeing an error, it can cause a memory explosion. As an example, Linux's various virtual file systems (e.g. `/proc`, `/sys`) can contain directories that spontaneously pop in and out of existence. Attempting to iterate over them using `rustix::fs::Dir` directly or indirectly (e.g. with the `procfs` crate) can trigger this fault condition if the implementation decides to continue on errors. An attacker knowledgeable about the implementation details of a vulnerable target can therefore try to trigger this fault condition via any one or a combination of several available APIs. If successful, the application host will quickly run out of memory, after which the application will likely be terminated by an OOM killer, leading to denial of service. This issue has been addressed in release versions 0.35.15, 0.36.16, 0.37.25, and 0.38.19. Users are advised to upgrade. There are no known workarounds for this issue.
SSVC
Exploitation: poc Automatable: no Technical Impact: partial
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2024-08-26 19:37 UTC
CWE
  • CWE-400 - Uncontrolled Resource Consumption
Assigner
GitHub_M CNA
References
Impacted products
Vendor Product Version
bytecodealliance rustix Affected: >= 0.35.11, < 0.35.15
Affected: >= 0.36.0, < 0.36.16
Affected: >= 0.37.0, < 0.37.25
Affected: >= 0.38.0, < 0.38.19
Create a notification for this product.
bytecodealliance rustix Affected: 0.35.11 , < 0.35.15 (custom)
Affected: 0.36.0 , < 0.36.16 (custom)
Affected: 0.37.0 , < 0.37.25 (custom)
Affected: 0.38.0 , < 0.38.19 (custom)
    cpe:2.3:a:bytecodealliance:rustix:*:*:*:*:*:*:*:*
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "affected": [
          {
            "cpes": [
              "cpe:2.3:a:bytecodealliance:rustix:*:*:*:*:*:*:*:*"
            ],
            "defaultStatus": "unknown",
            "product": "rustix",
            "vendor": "bytecodealliance",
            "versions": [
              {
                "lessThan": "0.35.15",
                "status": "affected",
                "version": "0.35.11",
                "versionType": "custom"
              },
              {
                "lessThan": "0.36.16",
                "status": "affected",
                "version": "0.36.0",
                "versionType": "custom"
              },
              {
                "lessThan": "0.37.25",
                "status": "affected",
                "version": "0.37.0",
                "versionType": "custom"
              },
              {
                "lessThan": "0.38.19",
                "status": "affected",
                "version": "0.38.0",
                "versionType": "custom"
              }
            ]
          }
        ],
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-43806",
                "options": [
                  {
                    "Exploitation": "poc"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-08-26T19:37:59.015162Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-08-26T19:40:46.911Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "rustix",
          "vendor": "bytecodealliance",
          "versions": [
            {
              "status": "affected",
              "version": "\u003e= 0.35.11, \u003c 0.35.15"
            },
            {
              "status": "affected",
              "version": "\u003e= 0.36.0, \u003c 0.36.16"
            },
            {
              "status": "affected",
              "version": "\u003e= 0.37.0, \u003c 0.37.25"
            },
            {
              "status": "affected",
              "version": "\u003e= 0.38.0, \u003c 0.38.19"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "Rustix is a set of safe Rust bindings to POSIX-ish APIs. When using `rustix::fs::Dir` using the `linux_raw` backend, it\u0027s possible for the iterator to \"get stuck\" when an IO error is encountered. Combined with a memory over-allocation issue in `rustix::fs::Dir::read_more`, this can cause quick and unbounded memory explosion (gigabytes in a few seconds if used on a hot path) and eventually lead to an OOM crash of the application. The symptoms were initially discovered in https://github.com/imsnif/bandwhich/issues/284. That post has lots of details of our investigation. Full details can be read on the GHSA-c827-hfw6-qwvm repo advisory. If a program tries to access a directory with its file descriptor after the file has been unlinked (or any other action that leaves the `Dir` iterator in the stuck state), and the implementation does not break after seeing an error, it can cause a memory explosion. As an example, Linux\u0027s various virtual file systems (e.g. `/proc`, `/sys`) can contain directories that spontaneously pop in and out of existence. Attempting to iterate over them using `rustix::fs::Dir` directly or indirectly (e.g. with the `procfs` crate) can trigger this fault condition if the implementation decides to continue on errors. An attacker knowledgeable about the implementation details of a vulnerable target can therefore try to trigger this fault condition via any one or a combination of several available APIs. If successful, the application host will quickly run out of memory, after which the application will likely be terminated by an OOM killer, leading to denial of service. This issue has been addressed in release versions 0.35.15, 0.36.16, 0.37.25, and 0.38.19. Users are advised to upgrade. There are no known workarounds for this issue."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 6.5,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "NONE",
            "integrityImpact": "NONE",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-400",
              "description": "CWE-400: Uncontrolled Resource Consumption",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-08-26T18:43:22.626Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/bytecodealliance/rustix/security/advisories/GHSA-c827-hfw6-qwvm",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/bytecodealliance/rustix/security/advisories/GHSA-c827-hfw6-qwvm"
        },
        {
          "name": "https://github.com/imsnif/bandwhich/issues/284",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/imsnif/bandwhich/issues/284"
        }
      ],
      "source": {
        "advisory": "GHSA-c827-hfw6-qwvm",
        "discovery": "UNKNOWN"
      },
      "title": "`rustix::fs::Dir` iterator with the `linux_raw` backend can cause memory explosion"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2024-43806",
    "datePublished": "2024-08-26T18:43:22.626Z",
    "dateReserved": "2024-08-16T14:20:37.326Z",
    "dateUpdated": "2024-08-26T19:40:46.911Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": {
        "adp": [
          {
            "affected": [
              {
                "cpes": [
                  "cpe:2.3:a:bytecodealliance:rustix:*:*:*:*:*:*:*:*"
                ],
                "defaultStatus": "unknown",
                "product": "rustix",
                "vendor": "bytecodealliance",
                "versions": [
                  {
                    "lessThan": "0.35.15",
                    "status": "affected",
                    "version": "0.35.11",
                    "versionType": "custom"
                  },
                  {
                    "lessThan": "0.36.16",
                    "status": "affected",
                    "version": "0.36.0",
                    "versionType": "custom"
                  },
                  {
                    "lessThan": "0.37.25",
                    "status": "affected",
                    "version": "0.37.0",
                    "versionType": "custom"
                  },
                  {
                    "lessThan": "0.38.19",
                    "status": "affected",
                    "version": "0.38.0",
                    "versionType": "custom"
                  }
                ]
              }
            ],
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2024-43806",
                    "options": [
                      {
                        "Exploitation": "poc"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2024-08-26T19:37:59.015162Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2024-08-26T19:40:36.419Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "rustix",
              "vendor": "bytecodealliance",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003e= 0.35.11, \u003c 0.35.15"
                },
                {
                  "status": "affected",
                  "version": "\u003e= 0.36.0, \u003c 0.36.16"
                },
                {
                  "status": "affected",
                  "version": "\u003e= 0.37.0, \u003c 0.37.25"
                },
                {
                  "status": "affected",
                  "version": "\u003e= 0.38.0, \u003c 0.38.19"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "Rustix is a set of safe Rust bindings to POSIX-ish APIs. When using `rustix::fs::Dir` using the `linux_raw` backend, it\u0027s possible for the iterator to \"get stuck\" when an IO error is encountered. Combined with a memory over-allocation issue in `rustix::fs::Dir::read_more`, this can cause quick and unbounded memory explosion (gigabytes in a few seconds if used on a hot path) and eventually lead to an OOM crash of the application. The symptoms were initially discovered in https://github.com/imsnif/bandwhich/issues/284. That post has lots of details of our investigation. Full details can be read on the GHSA-c827-hfw6-qwvm repo advisory. If a program tries to access a directory with its file descriptor after the file has been unlinked (or any other action that leaves the `Dir` iterator in the stuck state), and the implementation does not break after seeing an error, it can cause a memory explosion. As an example, Linux\u0027s various virtual file systems (e.g. `/proc`, `/sys`) can contain directories that spontaneously pop in and out of existence. Attempting to iterate over them using `rustix::fs::Dir` directly or indirectly (e.g. with the `procfs` crate) can trigger this fault condition if the implementation decides to continue on errors. An attacker knowledgeable about the implementation details of a vulnerable target can therefore try to trigger this fault condition via any one or a combination of several available APIs. If successful, the application host will quickly run out of memory, after which the application will likely be terminated by an OOM killer, leading to denial of service. This issue has been addressed in release versions 0.35.15, 0.36.16, 0.37.25, and 0.38.19. Users are advised to upgrade. There are no known workarounds for this issue."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "HIGH",
                "baseScore": 6.5,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "NONE",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
                "version": "3.1"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-400",
                  "description": "CWE-400: Uncontrolled Resource Consumption",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2024-08-26T18:43:22.626Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/bytecodealliance/rustix/security/advisories/GHSA-c827-hfw6-qwvm",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/bytecodealliance/rustix/security/advisories/GHSA-c827-hfw6-qwvm"
            },
            {
              "name": "https://github.com/imsnif/bandwhich/issues/284",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/imsnif/bandwhich/issues/284"
            }
          ],
          "source": {
            "advisory": "GHSA-c827-hfw6-qwvm",
            "discovery": "UNKNOWN"
          },
          "title": "`rustix::fs::Dir` iterator with the `linux_raw` backend can cause memory explosion"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2024-43806",
        "datePublished": "2024-08-26T18:43:22.626Z",
        "dateReserved": "2024-08-16T14:20:37.326Z",
        "dateUpdated": "2024-08-26T19:40:46.911Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.