blob: 8125173f95ae4372934450724c6375adaadced35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
Fix CVE-2017-12858:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-12858
Patch copied from upstream source repository:
https://github.com/nih-at/libzip/commit/2217022b7d1142738656d891e00b3d2d9179b796
From 2217022b7d1142738656d891e00b3d2d9179b796 Mon Sep 17 00:00:00 2001
From: Thomas Klausner <tk@giga.or.at>
Date: Mon, 14 Aug 2017 10:55:44 +0200
Subject: [PATCH] Fix double free().
Found by Brian 'geeknik' Carpenter using AFL.
---
THANKS | 1 +
lib/zip_dirent.c | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/THANKS b/THANKS
index be0cca9..a80ee1d 100644
--- a/THANKS
+++ b/THANKS
@@ -12,6 +12,7 @@ BALATON Zoltan <balaton@eik.bme.hu>
Benjamin Gilbert <bgilbert@backtick.net>
Boaz Stolk <bstolk@aweta.nl>
Bogdan <bogiebog@gmail.com>
+Brian 'geeknik' Carpenter <geeknik@protonmail.ch>
Chris Nehren <cnehren+libzip@pobox.com>
Coverity <info@coverity.com>
Dane Springmeyer <dane.springmeyer@gmail.com>
diff --git a/lib/zip_dirent.c b/lib/zip_dirent.c
index a369900..e5a7cc9 100644
--- a/lib/zip_dirent.c
+++ b/lib/zip_dirent.c
@@ -579,9 +579,6 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
}
if (!_zip_dirent_process_winzip_aes(zde, error)) {
- if (!from_buffer) {
- _zip_buffer_free(buffer);
- }
return -1;
}
|