CVE-2022-46149: out-of-bounds read possible when setting list-of-pointers
Cap'n Proto is a data interchange format and remote procedure call (RPC) system. Cap'n Proro prior to versions 0.7.1, 0.8.1, 0.9.2, and 0.10.3, as well as versions of Cap'n Proto's 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. Cap'n 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.
Other sources
If a message consumer expects data of type "list of pointers", and if the consumer performs certain specific actions on such data, then a message producer can cause the consumer to read out-of-bounds memory. This could trigger a process crash in the consumer, or in some cases could allow exfiltration of private in-memory data.
The C++ Cap'n Proto library is also affected by this bug. See the advisory on the main Cap'n Proto repo for a succinct description of the exact circumstances in which the problem can arise.
— OSV
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/capnprototo a version that resolves this vulnerability.Fixed in 0.9.2-2Fixed in 1.1.0-2Fixed in 1.5.0-2 - Upgrade
Upgrade
debian/rust-capnpto a version that resolves this vulnerability.Fixed in 0.14.11-1.2Fixed in 0.19.2-1Fixed in 0.27.2-1 - Upgrade
Upgrade
debian/capnprototo a version that resolves this vulnerability.Fixed in 0.9.2-2 - Upgrade
Upgrade
debian/rust-capnpto a version that resolves this vulnerability.Fixed in 0.14.11-1.1 - Upgrade
Upgrade
rust/capnpto a version that resolves this vulnerability.Fixed in 0.13.7 - Upgrade
Upgrade
rust/capnpto a version that resolves this vulnerability.Fixed in 0.14.11 - Upgrade
Upgrade
rust/capnpto a version that resolves this vulnerability.Fixed in 0.15.2 - Upgrade
Upgrade
Cap'n Proto C++ libraryto a version that resolves this vulnerability.Fixed in 0.10.3 - Upgrade
Upgrade
capnp Rust crateto a version that resolves this vulnerability.Fixed in 0.15.2 - Operational
Rebuild dependent applications after upgrading because the bug is present in inlined code.
Event History
Frequently Asked Questions
What is CVE-2022-46149?
CVE-2022-46149 is a vulnerability in Cap'n Proto that allows for out-of-bounds read due to a logic error handling.
What is the severity of CVE-2022-46149?
The severity of CVE-2022-46149 is medium with a CVSS score of 5.4.
Which versions of Cap'n Proto are affected by CVE-2022-46149?
Versions 0.7.1, 0.8.1, 0.9.2, and 0.10.3 of Cap'n Proto, as well as versions of Cap'n Proto's Rust implementation prior to 0.13.7, 0.14.11, and 0.15.2 are affected by CVE-2022-46149.
Where can I find more information about CVE-2022-46149?
You can find more information about CVE-2022-46149 on the official GitHub page of Cap'n Proto and the Fedora project's mailing list.
How can I fix CVE-2022-46149?
To fix CVE-2022-46149, it is recommended to update to versions 0.7.1, 0.8.1, 0.9.2, or 0.10.3 of Cap'n Proto, or versions 0.13.7, 0.14.11, or 0.15.2 of Cap'n Proto's Rust implementation.