[Forensics-changes] [yara] 01/02: Added fix for possible buffer overrun in PE module

Hilko Bengen bengen at moszumanska.debian.org
Sun Aug 2 21:12:44 UTC 2015


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

bengen pushed a commit to branch master
in repository yara.

commit df6331bc0fd89a7b120e527f79332d5b460e715f
Author: Hilko Bengen <bengen at debian.org>
Date:   Sun Aug 2 23:05:35 2015 +0200

    Added fix for possible buffer overrun in PE module
---
 ...ossible-buffer-overrun-in-pe_parse_header.patch | 24 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/0001-Fix-possible-buffer-overrun-in-pe_parse_header.patch b/debian/patches/0001-Fix-possible-buffer-overrun-in-pe_parse_header.patch
new file mode 100644
index 0000000..ccfafc4
--- /dev/null
+++ b/debian/patches/0001-Fix-possible-buffer-overrun-in-pe_parse_header.patch
@@ -0,0 +1,24 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sun, 2 Aug 2015 23:04:58 +0200
+Subject: Fix possible buffer overrun in pe_parse_header
+
+(See upstream commits 6ad11828a8d9784777f50236930112f8d3360f1b and
+14dbf62b132c1d7294fa3b4a535d5fec3f6246b9)
+---
+ libyara/modules/pe.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
+index 848822d..4dcc13c 100644
+--- a/libyara/modules/pe.c
++++ b/libyara/modules/pe.c
+@@ -1304,7 +1304,8 @@ void pe_parse_header(
+     if (!struct_fits_in_pe(pe, section, IMAGE_SECTION_HEADER))
+       break;
+ 
+-    strlcpy(section_name, (char*) section->Name, IMAGE_SIZEOF_SHORT_NAME + 1);
++    strncpy(section_name, (char*) section->Name, IMAGE_SIZEOF_SHORT_NAME);
++    section_name[IMAGE_SIZEOF_SHORT_NAME] = '\0';
+ 
+     set_string(
+         section_name,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8f463f8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-possible-buffer-overrun-in-pe_parse_header.patch

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



More information about the forensics-changes mailing list