From d12963549e0a3398ae7a4bc1b56a7110dfb987a5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 26 Mar 2013 10:50:27 +0100 Subject: [PATCH] xbps: merge another patch from master to fix a user-after-free. --- ...commit.c-fix-a-use-after-free-in-sta.patch | 30 +++++++++++++++++++ srcpkgs/xbps/template | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/xbps/patches/0002-lib-transaction_commit.c-fix-a-use-after-free-in-sta.patch diff --git a/srcpkgs/xbps/patches/0002-lib-transaction_commit.c-fix-a-use-after-free-in-sta.patch b/srcpkgs/xbps/patches/0002-lib-transaction_commit.c-fix-a-use-after-free-in-sta.patch new file mode 100644 index 0000000000..be66cae4b3 --- /dev/null +++ b/srcpkgs/xbps/patches/0002-lib-transaction_commit.c-fix-a-use-after-free-in-sta.patch @@ -0,0 +1,30 @@ +From 7c4f20ba89bee94b5259df3b0b1af0bb1deeab0a Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Tue, 26 Mar 2013 10:35:20 +0100 +Subject: [PATCH] lib/transaction_commit.c: fix a use-after-free in state cb + (found by ojab). + +--- + lib/transaction_commit.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/transaction_commit.c b/lib/transaction_commit.c +index dd148b0..e1edf7b 100644 +--- lib/transaction_commit.c ++++ lib/transaction_commit.c +@@ -88,11 +88,11 @@ check_binpkgs_hash(struct xbps_handle *xhp, prop_object_iterator_t iter) + rv = xbps_file_hash_check(binfile, sha256); + if (rv != 0) { + free(binfile); +- free(filen); + xbps_set_cb_state(xhp, XBPS_STATE_VERIFY_FAIL, + rv, pkgver, + "Failed to verify `%s' package integrity: %s", + filen, strerror(rv)); ++ free(filen); + break; + } + free(binfile); +-- +1.8.2 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 320653fb3d..a1dc33d9b9 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,7 +1,7 @@ # Template file for 'xbps' pkgname=xbps version=0.22 -revision=2 +revision=3 build_style=configure configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin --enable-static --enable-debug --enable-tests"