[Forensics-changes] [fcrackzip] 82/93: Fix a buffer overflow in -p.

Giovani Augusto Ferreira giovani-guest at moszumanska.debian.org
Wed Dec 28 03:06:46 UTC 2016


This is an automated email from the git hooks/post-receive script.

giovani-guest pushed a commit to branch debian
in repository fcrackzip.

commit a376e08d5aeea5a4a172bb6153b78b0bc38d2946
Author: Adam Borowski <kilobyte at angband.pl>
Date:   Sat Aug 22 00:57:41 2015 +0200

    Fix a buffer overflow in -p.
---
 debian/changelog                              |  6 ++++++
 debian/patches/30-buffer-overflow-on--p.patch | 18 ++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 25 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 26f5ae0..422667b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+fcrackzip (1.0-6) UNRELEASED; urgency=medium
+
+  * Fix a buffer overflow in -p (Closes: #742463).
+
+ -- Adam Borowski <kilobyte at angband.pl>  Sat, 15 Aug 2015 20:53:23 +0200
+
 fcrackzip (1.0-5) unstable; urgency=low
 
   [ Jari Aalto ]
diff --git a/debian/patches/30-buffer-overflow-on--p.patch b/debian/patches/30-buffer-overflow-on--p.patch
new file mode 100644
index 0000000..48dfffd
--- /dev/null
+++ b/debian/patches/30-buffer-overflow-on--p.patch
@@ -0,0 +1,18 @@
+Description: fix buffer overflow on -p
+ The length of the argument to -p wasn't capped.  This applies to both uses
+ of -p: initial password and dictionary file name.
+Author: Adam Borowski <kilobyte at angband.pl>
+Bug-Debian: https://bugs.debian.org/742463
+
+--- fcrackzip-1.0.orig/main.c
++++ fcrackzip-1.0/main.c
+@@ -474,7 +474,8 @@ main (int argc, char *argv[])
+         break;
+ 
+       case 'p':
+-        strcpy (pw, optarg);
++        strncpy (pw, optarg, sizeof(pw)-1);
++        pw[sizeof(pw)-1] = '\0';
+         break;
+ 
+       case 'l':
diff --git a/debian/patches/series b/debian/patches/series
index 30ba93d..6b3ce31 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 10-manpage-hyphen.patch
 20-bug-430387-cannot-deal-files-with-special-chars.patch
 20-readme.patch
+30-buffer-overflow-on--p.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/fcrackzip.git



More information about the forensics-changes mailing list