busybox: Include complete fix for CVE-2011-5325
PATCH 1/1 busybox: Include complete fix for CVE-2011-5325
It looks like not all the parts required for fixing CVE-2011-5325 made it into oe-core master before the recipe was upgraded to the upstream fixed version.
The partial fix meant that symlinks deemed unsafe enough to delay were never actually realized. This backport from upstream fixes the problem.
--- .../busybox/busybox/CVE-2011-5325-fix2.patch | 32 +++++++++++++++++++ meta/recipes-core/busybox/busybox_1.27.2.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta/recipes-core/busybox/busybox/CVE-2011-5325-fix2.patch
meta/recipes-core/busybox/busybox/CVE-2011-5325-fix2.patch new file +32 -0
@@ -0,0 +1,32 @@ +From d9503224c8a93a30b0c8627084b2744d3ee6f403 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <[email protected]> +Date: Fri, 30 Mar 2018 20:18:12 +0200 +Subject: [PATCH] cpio: extract "unsafe" symlinks the same way tar/unzip does + +function old new delta +cpio_main 588 596 +8 + +Signed-off-by: Natanael Copa <[email protected]> +Signed-off-by: Denys Vlasenko <[email protected]> + +Upstream-Status: Backport from 1.29.0 [https://git.busybox.net/busybox/commit/?id=d9503224c8a93a30b0c8627084b2744d3ee6f403] + +--- + archival/cpio.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/archival/cpio.c b/archival/cpio.c +index 1d6cbd1e2..308ec1b25 100644 +--- a/archival/cpio.c ++++ b/archival/cpio.c +@@ -508,6 +508,8 @@ int cpio_main(int argc UNUSED_PARAM, char **argv) + while (get_header_cpio(archive_handle) == EXIT_SUCCESS) + continue; + ++ create_symlinks_from_list(archive_handle->symlink_placeholders); ++ + if (archive_handle->cpio__blocks != (off_t)-1 + && !(opt & OPT_QUIET) + ) { +-- +2.20.1
meta/recipes-core/busybox/busybox_1.27.2.bb +1 -0
@@ -44,6 +44,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://makefile-libbb-race.patch \ file://CVE-2011-5325.patch \ file://CVE-2011-5325-fix.patch \ + file://CVE-2011-5325-fix2.patch \ file://CVE-2017-15873.patch \ file://busybox-CVE-2017-16544.patch \ file://busybox-fix-lzma-segfaults.patch \
Signature · 1 line
2.20.1
Quoted 7 lines · Mike Crowe
It looks like not all the parts required for fixing CVE-2011-5325 made it into oe-core master before the recipe was upgraded to the upstream fixed version.
The partial fix meant that symlinks deemed unsafe enough to delay were never actually realized. This backport from upstream fixes the problem.
Grrr, I managed to send the version that lacked the [sumo] prefix. :(
Sorry.
Mike.
✗ patchtest: failure for busybox: Include complete fix for CVE-2011-5325
In reply to Mike Crowe== Series Details ==
Series: busybox: Include complete fix for CVE-2011-5325
Revision: 1
URL : https://patchwork.openembedded.org/series/18360/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 4bb3e8f98e)
* Patch busybox: Include complete fix for CVE-2011-5325 Issue Patch is missing Signed-off-by [test_signed_off_by_presence] Suggested fix Sign off the patch (either manually or with "git commit --amend -s")
* Patch busybox: Include complete fix for CVE-2011-5325 Issue Missing or incorrectly formatted CVE tag in included patch file [test_cve_tag_format] Suggested fix Correct or include the CVE tag on cve patch with format: "CVE: CVE-YYYY-XXXX"
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe