pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security Update {py-,}yara to version 3.7.0.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5399b9fd16b6
branches:  trunk
changeset: 371597:5399b9fd16b6
user:      he <he%pkgsrc.org@localhost>
date:      Wed Nov 15 18:22:22 2017 +0000

description:
Update {py-,}yara to version 3.7.0.

Pkgsrc changes:
 * adapt PLIST
 * remove patch which no longer applies
 * apply patches for proper value domain for isxxxx() functions/macros

Upstream changes:
 * time module (Wesley Shields)
 * yara command-line tool now accept multiple rule files
 * Allow a configurable limit for the number of strings per rule
   (option --max-strings-per-rule)
 * Implement integrity check for compiled rules
 * Implement API for customizingimport statement (@edhoedt)
 * Scan process memory in FreeBSD and OpenBDS (Hilko Bengen)
 * BUGFIX: Negated character classes not working with case-insensitive
   regexps (#765)
 * BUGFIX: Multiple bugs while parsing ELF files (Nate Rosenblum)
 * BUGFIX: Out-of-bounds access while parsing PE files.
 * BUGFIX: Memory leaks while parsing invalid rules.

diffstat:

 security/py-yara/distinfo                        |  10 +++---
 security/yara/Makefile.common                    |   4 +-
 security/yara/PLIST                              |   6 +++-
 security/yara/distinfo                           |  14 ++++++----
 security/yara/patches/patch-common.h             |  31 ++++++++++++++++++++++++
 security/yara/patches/patch-libyara_modules_pe.c |  15 +++++++++++
 security/yara/patches/patch-libyara_proc.c       |  16 ------------
 security/yara/patches/patch-libyara_re__lexer.l  |  15 +++++++++++
 8 files changed, 81 insertions(+), 30 deletions(-)

diffs (169 lines):

diff -r 331220c67e7a -r 5399b9fd16b6 security/py-yara/distinfo
--- a/security/py-yara/distinfo Wed Nov 15 15:08:23 2017 +0000
+++ b/security/py-yara/distinfo Wed Nov 15 18:22:22 2017 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.9 2017/07/05 23:55:01 khorben Exp $
+$NetBSD: distinfo,v 1.10 2017/11/15 18:22:22 he Exp $
 
-SHA1 (yara-python-3.6.3.tar.gz) = e1e418060924f667dd6141ae7c704e2bd9000ff4
-RMD160 (yara-python-3.6.3.tar.gz) = 124432b6b0a6599b00a225bc222dc3cc4abcc082
-SHA512 (yara-python-3.6.3.tar.gz) = 22d69e1dad6ac709e9d1e1e5161b9afc0f9424f211b77ea615c304193d42be2823916d39bcd43a0189d862ff9af31bd80a0abd8e6336f039d4e1089fa2526e6a
-Size (yara-python-3.6.3.tar.gz) = 29631 bytes
+SHA1 (yara-python-3.7.0.tar.gz) = e029521297046c87400e966d7524731e8706374c
+RMD160 (yara-python-3.7.0.tar.gz) = d2bb2c5d2a98f40193ec9907cf0f6dd43f576a2c
+SHA512 (yara-python-3.7.0.tar.gz) = 96d43620787f3369843a3255c3dc6ec7e8dd8afedcb8a5414d964c9a30f4e91277156a2543dd9dc28474fc1cfdbedc90e46ed76c83481673fc2c39dd6dc97f73
+Size (yara-python-3.7.0.tar.gz) = 30722 bytes
diff -r 331220c67e7a -r 5399b9fd16b6 security/yara/Makefile.common
--- a/security/yara/Makefile.common     Wed Nov 15 15:08:23 2017 +0000
+++ b/security/yara/Makefile.common     Wed Nov 15 18:22:22 2017 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.common,v 1.10 2017/07/05 23:55:00 khorben Exp $
+# $NetBSD: Makefile.common,v 1.11 2017/11/15 18:22:22 he Exp $
 #
 # used by security/yara/Makefile
 # used by security/py-yara/Makefile
 
-VERSION=       3.6.3
+VERSION=       3.7.0
 GITHUB_TAG=    v${VERSION}
 
 MAINTAINER=    khorben%defora.org@localhost
diff -r 331220c67e7a -r 5399b9fd16b6 security/yara/PLIST
--- a/security/yara/PLIST       Wed Nov 15 15:08:23 2017 +0000
+++ b/security/yara/PLIST       Wed Nov 15 18:22:22 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2017/07/05 23:55:00 khorben Exp $
+@comment $NetBSD: PLIST,v 1.5 2017/11/15 18:22:22 he Exp $
 bin/yara
 bin/yarac
 include/yara.h
@@ -8,13 +8,17 @@
 include/yara/compiler.h
 include/yara/error.h
 include/yara/exec.h
+include/yara/exefiles.h
 include/yara/filemap.h
 include/yara/hash.h
 include/yara/integers.h
 include/yara/libyara.h
 include/yara/limits.h
+include/yara/mem.h
 include/yara/modules.h
 include/yara/object.h
+include/yara/parser.h
+include/yara/proc.h
 include/yara/re.h
 include/yara/rules.h
 include/yara/scan.h
diff -r 331220c67e7a -r 5399b9fd16b6 security/yara/distinfo
--- a/security/yara/distinfo    Wed Nov 15 15:08:23 2017 +0000
+++ b/security/yara/distinfo    Wed Nov 15 18:22:22 2017 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.10 2017/07/05 23:55:00 khorben Exp $
+$NetBSD: distinfo,v 1.11 2017/11/15 18:22:22 he Exp $
 
-SHA1 (yara-3.6.3.tar.gz) = 7817b753cc62e2cb14aa7249585f5fe0b032a959
-RMD160 (yara-3.6.3.tar.gz) = ecc0901fa49aa6ae45d9850e6bb6da9ab15cbeca
-SHA512 (yara-3.6.3.tar.gz) = f928fe93e93385b5711c1076b042473299e1eb1c7c345433b01b7638677d9b8fb95a8ac2a7ef52012dc178ec0ef5772d6b6d0b65b5717d2074290bb44031b3f8
-Size (yara-3.6.3.tar.gz) = 505556 bytes
-SHA1 (patch-libyara_proc.c) = cbe52e79c63eb6389a5f7d1107d15a57ca4890f9
+SHA1 (yara-3.7.0.tar.gz) = 89fd429bf40db1039c0a3ff7cd94d79ec450c024
+RMD160 (yara-3.7.0.tar.gz) = 069f9815ead81ebf2be3151b14a4fcc3046770d7
+SHA512 (yara-3.7.0.tar.gz) = cd0214d39c6d1c5bc8410a1ec67e42ec8a672be382fb11e0a0f98cb03af1ef5db92e74216a9b98a6bdedf9721d4470639e340edbd39ca0184233652839742a33
+Size (yara-3.7.0.tar.gz) = 558035 bytes
+SHA1 (patch-common.h) = 199ab70fb828124e07ae51a467ed50ad95f2b616
+SHA1 (patch-libyara_modules_pe.c) = db69a250dabc9a074cd17c795e7b0d117b2585bf
+SHA1 (patch-libyara_re__lexer.l) = 169802090dd922f06d8c32a0d1ea5409cf660f61
diff -r 331220c67e7a -r 5399b9fd16b6 security/yara/patches/patch-common.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/yara/patches/patch-common.h      Wed Nov 15 18:22:22 2017 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-common.h,v 1.1 2017/11/15 18:22:22 he Exp $
+
+Ensure we adhere to valid value domain for isxxxx() function/macro.
+
+--- common.h.orig      2017-11-10 11:21:21.000000000 +0000
++++ common.h
+@@ -86,7 +86,7 @@ int is_integer(const char *str)
+ 
+   while(*str)
+   {
+-    if (!isdigit(*str))
++    if (!isdigit((unsigned char)*str))
+       return FALSE;
+     str++;
+   }
+@@ -114,7 +114,7 @@ int is_float(const char *str)
+ 
+       has_dot = TRUE;
+     }
+-    else if (!isdigit(*str))
++    else if (!isdigit((unsigned char)*str))
+     {
+       return FALSE;
+     }
+@@ -125,4 +125,4 @@ int is_float(const char *str)
+   return has_dot; // to be float must contain a dot
+ }
+ 
+-#endif
+\ No newline at end of file
++#endif
diff -r 331220c67e7a -r 5399b9fd16b6 security/yara/patches/patch-libyara_modules_pe.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/yara/patches/patch-libyara_modules_pe.c  Wed Nov 15 18:22:22 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-libyara_modules_pe.c,v 1.1 2017/11/15 18:22:22 he Exp $
+
+Ensure we adhere to valid value domain for isxxxx() function/macro.
+
+--- libyara/modules/pe.c.orig  2017-11-10 11:21:21.000000000 +0000
++++ libyara/modules/pe.c
+@@ -1673,7 +1673,7 @@ define_function(imphash)
+       // Lowercase the whole thing.
+ 
+       for (i = 0; i < final_name_len; i++)
+-        final_name[i] = tolower(final_name[i]);
++        final_name[i] = tolower((unsigned char)final_name[i]);
+ 
+       yr_md5_update(&ctx, final_name, final_name_len);
+ 
diff -r 331220c67e7a -r 5399b9fd16b6 security/yara/patches/patch-libyara_proc.c
--- a/security/yara/patches/patch-libyara_proc.c        Wed Nov 15 15:08:23 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-libyara_proc.c,v 1.2 2015/08/30 08:58:47 dholland Exp $
-
-Add NetBSD support
-
---- libyara/proc.c.orig        2015-06-06 06:50:32.000000000 +0000
-+++ libyara/proc.c
-@@ -153,7 +153,8 @@ int yr_process_get_memory(
- #include <yara/mem.h>
- 
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
--    defined(__OpenBSD__) || defined(__MACH__)
-+    defined(__OpenBSD__) || defined(__MACH__) || defined(__NetBSD__) || \
-+    defined(__DragonFly__) || defined(__Bitrig__)
- #define PTRACE_ATTACH PT_ATTACH
- #define PTRACE_DETACH PT_DETACH
- #endif
diff -r 331220c67e7a -r 5399b9fd16b6 security/yara/patches/patch-libyara_re__lexer.l
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/yara/patches/patch-libyara_re__lexer.l   Wed Nov 15 18:22:22 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-libyara_re__lexer.l,v 1.1 2017/11/15 18:22:22 he Exp $
+
+Ensure we adhere to valid value domain for isxxxx() function/macro.
+
+--- libyara/re_lexer.l.orig    2017-11-10 11:21:21.000000000 +0000
++++ libyara/re_lexer.l
+@@ -488,7 +488,7 @@ int escaped_char_value(
+   switch(text[1])
+   {
+   case 'x':
+-    if (!isxdigit(text[2]) || !isxdigit(text[3]))
++    if (!isxdigit((unsigned char)text[2]) || !isxdigit((unsigned char)text[3]))
+       return 0;
+     hex[0] = text[2];
+     hex[1] = text[3];



Home | Main Index | Thread Index | Old Index