CVE Vulnerabilities

CVE-2022-46149

Out-of-bounds Read

Published: Nov 30, 2022 | Modified: Nov 07, 2023
CVSS 3.x
5.4
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L
CVSS 2.x
RedHat/V2
RedHat/V3
5.4 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L
Ubuntu
LOW

Capn Proto is a data interchange format and remote procedure call (RPC) system. Capn Proro prior to versions 0.7.1, 0.8.1, 0.9.2, and 0.10.3, as well as versions of Capn Protos Rust implementation prior to 0.13.7, 0.14.11, and 0.15.2 are vulnerable to out-of-bounds read due to logic error handling list-of-list. This issue may lead someone to remotely segfault a peer by sending it a malicious message, if the victim performs certain actions on a list-of-pointer type. Exfiltration of memory is possible if the victim performs additional certain actions on a list-of-pointer type. To be vulnerable, an application must perform a specific sequence of actions, described in the GitHub Security Advisory. The bug is present in inlined code, therefore the fix will require rebuilding dependent applications. Capn Proto has C++ fixes available in versions 0.7.1, 0.8.1, 0.9.2, and 0.10.3. The capnp Rust crate has fixes available in versions 0.13.7, 0.14.11, and 0.15.2.

Weakness

The product reads data past the end, or before the beginning, of the intended buffer.

Affected Software

Name Vendor Start Version End Version
Capnproto Capnproto * 0.7.1 (excluding)
Capnproto Capnproto 0.9.0 (including) 0.9.2 (excluding)
Capnproto Capnproto 0.10.0 (including) 0.10.3 (excluding)
Capnproto Capnproto 0.8.0 (including) 0.8.0 (including)
Red Hat OpenShift Container Platform 4.12 RedHat conmon-rs-0:0.5.1-3.rhaos4.12.git.el9 *
Capnproto Ubuntu bionic *
Capnproto Ubuntu esm-apps/jammy *
Capnproto Ubuntu esm-apps/xenial *
Capnproto Ubuntu esm-infra-legacy/trusty *
Capnproto Ubuntu esm-infra/bionic *
Capnproto Ubuntu esm-infra/xenial *
Capnproto Ubuntu focal *
Capnproto Ubuntu jammy *
Capnproto Ubuntu kinetic *
Capnproto Ubuntu trusty *
Capnproto Ubuntu trusty/esm *
Capnproto Ubuntu upstream *
Capnproto Ubuntu xenial *
Interchange Ubuntu esm-apps/xenial *
Interchange Ubuntu trusty *
Interchange Ubuntu xenial *

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • To reduce the likelihood of introducing an out-of-bounds read, ensure that you validate and ensure correct calculations for any length argument, buffer size calculation, or offset. Be especially careful of relying on a sentinel (i.e. special character such as NUL) in untrusted inputs.

References