Skip to content

Commit dc3ba22

Browse files
committed
cmake, doc: Add check for CVE-2022-46149
Also document minimum Cap'n Proto version in doc/install.md
1 parent 8ceeaa6 commit dc3ba22

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

CMakeLists.txt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,29 @@ endif()
1212

1313
include("cmake/compat_find.cmake")
1414

15-
find_package(CapnProto 0.7.0 REQUIRED)
1615
find_package(Threads REQUIRED)
16+
find_package(CapnProto 0.7 REQUIRED)
17+
18+
# Check for list-of-pointers memory access bug from Nov 2022
19+
# https://nvd.nist.gov/vuln/detail/CVE-2022-46149
20+
# https://github.com/advisories/GHSA-qqff-4vw4-f6hx
21+
# https://github.com/capnproto/capnproto/security/advisories/GHSA-qqff-4vw4-f6hx
22+
# https://github.com/capnproto/capnproto/blob/master/security-advisories/2022-11-30-0-pointer-list-bounds.md
23+
# https://capnproto.org/news/2022-11-30-CVE-2022-46149-security-advisory.html
24+
# https://dwrensha.github.io/capnproto-rust/2022/11/30/out_of_bounds_memory_access_bug.html
25+
if(CapnProto_VERSION STREQUAL "0.7.0"
26+
OR CapnProto_VERSION STREQUAL "0.8.0"
27+
OR CapnProto_VERSION STREQUAL "0.9.0"
28+
OR CapnProto_VERSION STREQUAL "0.9.1"
29+
OR CapnProto_VERSION STREQUAL "0.10.0"
30+
OR CapnProto_VERSION STREQUAL "0.10.1"
31+
OR CapnProto_VERSION STREQUAL "0.10.2")
32+
message(FATAL_ERROR
33+
"Cap'n Proto ${CapnProto_VERSION} is affected by CVE-2022-46149.\n"
34+
"Please install an updated package.\n"
35+
"Details: https://github.com/advisories/GHSA-qqff-4vw4-f6hx
36+
")
37+
endif()
1738

1839
set(MPGEN_EXECUTABLE "" CACHE FILEPATH "If specified, should be full path to an external mpgen binary to use rather than the one built internally.")
1940

doc/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# libmultiprocess Installation
22

3-
Installation currently requires Cap'n Proto:
3+
Installation currently requires Cap'n Proto 0.7 or higher:
44

55
```sh
66
apt install libcapnp-dev capnproto

0 commit comments

Comments
 (0)