depends, libevent: update to 2.1.13-stable - #406
Open
xanimo wants to merge 1 commit into
Open
Conversation
libevent 2.1.13-stable was released 2026-07-01 and carries seven security
advisories over the 2.1.12-stable we ship, which dates from 2020-07-05.
libdogecoin exercises all three affected subsystems:
bufferevent/evbuffer src/net.c, src/rest.c
GHSA-c2pj-cg4r-88c8 dangling pointer in evbuffer_add_reference
evhttp src/net.c, src/rest.c, src/cli/spvnode.c
GHSA-2gmv-p5m7-98p6 HTTP trailers permitted header smuggling
GHSA-q39v-w2g7-gr8j header parsing permitted request smuggling
GHSA-jcwh-pvf2-73p2 CRLF and NUL handling allowed parser mismatch
GHSA-cvq5-vrvr-j338 AF_UNIX heap out-of-bound write, -DNDEBUG only
evdns src/net.c (DNS seeds)
GHSA-58rx-7448-jw47 OOB write in dnsname_to_labels
Also fixed upstream: OOB read in decode_tag_internal (GHSA-fj29-64w6-73h6)
and integer overflow in evtag_unmarshal_header (GHSA-45c6-qx49-89m8), both
in evtag/evrpc, which this library does not use.
Two consumers had to move together. depends/packages/libevent.mk feeds the
autotools and gitian builds via AC_CHECK_LIB; src/libevent is the vendored
copy that CMake configures and builds in-tree. Bumping one and not the
other would leave whichever half a given build used still on 2.1.12.
The vendored tree was the libevent git checkout rather than the release
tarball, and carried exactly one local change:
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2.1.13 still declares 3.1, so that line is re-applied. It is the only
delta -- verified by diffing the old vendored tree against a pristine
2.1.12 checkout, which agreed everywhere else.
Nine files are removed rather than replaced: build-aux/{compile,
config.guess,config.sub,depcomp,install-sh,ltmain.sh,missing,test-driver}
is autoreconf output, and cmake/BuildType.cmake is an orphan present in
neither the 2.1.12 tarball nor the 2.1.13 tree. Nothing in this repository
runs autotools against the vendored copy -- CMakeLists.txt drives it with
`cmake ..` and `cmake --build` -- and BuildType.cmake is referenced by no
CMakeLists on either side, so both are dead weight.
The depends sha256 was checked against a pristine download rather than
copied: 2.1.12 hashes to the 92e6de1b value already pinned, which confirms
the method, and 2.1.13 hashes to f7e9383b8c0baa81b687e5b5eecc01beefaf1b19
b64151d95ed61647fe7a315c. Worth confirming against the upstream GPG
signature before merge; a hash I computed from a download I made is only
as good as that download.
The depends Windows patch, 0001-fix-windows-getaddrinfo.patch, still
applies (offset 42 lines) and is still needed -- the fix has not landed
upstream.
Builds and links against the new tree with WITH_NET=ON, 81/81.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We ship libevent 2.1.12-stable (2020-07-05). 2.1.13-stable was released 2026-07-01 carrying seven security advisories, and libdogecoin exercises all three affected subsystems.
bufferevent/evbuffernet.c,rest.cevbuffer_add_referenceevhttpnet.c,rest.c,cli/spvnode.c-DNDEBUGonly)evdnsnet.c(DNS seeds)dnsname_to_labelsTwo more are fixed upstream in
evtag/evrpc(GHSA-fj29-64w6-73h6, GHSA-45c6-qx49-89m8) which we don't use.Unlike everything else in the current audit, this is known-vulnerable code we ship, not a hypothesis.
Both vendoring paths had to move together
depends/packages/libevent.mk— feeds autotools and gitian viaAC_CHECK_LIBsrc/libevent— the vendored copy CMake configures and builds in-treeBumping one would leave whichever half a given build used still on 2.1.12. (This is the same split #388's parity gate surfaced.)
Local delta preserved
The vendored tree was libevent's git checkout, not the release tarball, and carried exactly one local change:
2.1.13 still declares
3.1, so it's re-applied. I verified that's the only delta by diffing the old vendored tree against a pristine 2.1.12 checkout — they agreed everywhere else.Nine files removed, not replaced
build-aux/{compile,config.guess,config.sub,depcomp,install-sh,ltmain.sh,missing,test-driver}is autoreconf output, andcmake/BuildType.cmakeis an orphan present in neither the 2.1.12 tarball nor the 2.1.13 tree.Nothing here runs autotools against the vendored copy —
CMakeLists.txtdrives it withcmake ../cmake --build— andBuildType.cmakeis referenced by no CMakeLists on either side. Both are dead weight, which is why the diff shows 17k deletions against 451 insertions: 28 files are the real 2.1.12→2.1.13 source delta, 0 files added.Verification
92e6de1b…value already pinned — which validates the method. 2.1.13 hashes tof7e9383b8c0baa81b687e5b5eecc01beefaf1b19b64151d95ed61647fe7a315c.0001-fix-windows-getaddrinfo.patchstill applies (offset 42 lines) and is still needed — the fix hasn't landed upstream.WITH_NET=ON. 81/81.Found while auditing dependency currency: there's no submodule and no pin-checking, so nothing would ever have surfaced this. Worth considering a periodic check as a follow-up — this sat four releases behind for six years.