Repository navigation
miniupnpd: backport CVE-2026-5720 fix to 2.3.9 - #31069
Merged
Merged
Conversation
tillo
force-pushed
the
miniupnpd-cve-2026-5720
branch
from
October 31, 2026 11:30
9fd291b to
ba341a6
Compare
ParseHttpHeaders() removes the enclosing quotes of a header value without checking first that the value is long enough. A single quote underflows the length to SIZE_MAX - 1 and the memchr() that follows reads past the end of the request buffer, so a malformed SOAP request crashes the daemon. The fix is upstream commit f56bd09, first released in 2.3.10, and it reached master as part of the 2.3.11 update. The version bump itself is not taken here: 2.3.10 broke port forwarding and 2.3.11 repaired it, and neither belongs in a release branch for one security fix. The 25.12 branch gets the one hunk, with PKG_RELEASE going to 2. The patch is relative to the extracted tarball root, because the build strips the single top-level directory and applies with patch -p1. It was verified to apply cleanly to the 2.3.9 tarball whose hash this Makefile pins. CVE: https://nvd.nist.gov/vuln/detail/CVE-2026-5720 Upstream fix: miniupnp/miniupnp@f56bd09 Signed-off-by: Martino Dell'Ambrogio <tillo@tillo.ch> (cherry picked from commit 983e263)
tillo
force-pushed
the
miniupnpd-cve-2026-5720
branch
from
October 31, 2026 12:06
ba341a6 to
f68827f
Compare
Contributor
|
cc @commodo |
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.
📦 Package Details
Maintainer: none named in
net/miniupnpd(adopting the package for this fix)Description:
Backport of the CVE-2026-5720 fix to the
openwrt-25.12branch.ParseHttpHeaders()removes the enclosing quotes of a header value without first checking that the value is at least 2 bytes long. ASOAPActionheader carrying a single quote therefore underflows the length (CWE-191) and the followingmemchr()scans far past the request buffer (CWE-125); one request is enough to take the daemon down, and OpenWrt's init script sets norespawn, so it stays down until it is restarted by hand.The fix is upstream commit
f56bd09bd(upnphttp.c: fix removal of quotes in ParseHttpHeaders()), first released in 2.3.10.openwrt-25.12still packages the pristine 2.3.9 tarball with nopatches/directory, so the branch is affected;mastermoved the package to 2.3.11 in #30701, which is more than a release branch wants — 2.3.10 broke port forwarding and needed 2.3.11 to repair it (bbdd738), so taking the whole-point bump would drag that regression pair along with a security fix.On the cherry-pick line
The commit carries
(cherry picked from commit 983e2638…)— the master commit that brought 2.3.11 into the tree, and with it thef56bd09fix. It is not a verbatim copy: the backport keeps 2.3.9 asPKG_VERSION, keeps the existingPKG_HASH, and takes only theupnphttp.chunk, withPKG_RELEASEbumped to 2 so the rebuilt package supersedes 2.3.9-r1. The formality check therefore reports the diff as deviating from the upstream commit; that deviation is the point of the patch.🧪 Run Testing Details
patch -p1against a freshly extractedminiupnpd-2.3.9.tar.gz(sha25666cb3c3d…, i.e. thePKG_HASHthe branch already uses) and applies without fuzz. The compiled daemon is what CI builds here; I have not run a crash reproducer against a live router.✅ Formalities
git amformat and applies cleanly to the 2.3.9 tarball.