[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/etch-security, updated. debian/0.90.1dfsg-4etch18-1-gd14eaf7

Michael Tautschnig mt at debian.org
Sun Apr 12 07:08:03 UTC 2009


The following commit has been merged in the debian/etch-security branch:
commit d14eaf7be8e8e1087ea5dddac2db2e6dddd07dea
Author: Michael Tautschnig <mt at debian.org>
Date:   Sun Apr 12 08:09:44 2009 +0200

    Backported fix for #1552
    
    Signed-off-by: Michael Tautschnig <mt at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 196b5d9..dc1f27a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+clamav (0.90.1dfsg-4etch19) oldstable-security; urgency=low
+
+  * Backported hardening of CLI_ISCONTAINED macros (fixes UPack crash with
+    malformed file, #1552)
+
+ -- Stephen Gran <sgran at debian.org>  Sun, 12 Apr 2009 08:09:20 +0200
+
 clamav (0.90.1dfsg-4etch18) oldstable-security; urgency=low
 
   * [CVE-2008-6680] Fixed division by zero with --detect-broken.
diff --git a/debian/patches/00list b/debian/patches/00list
index 807c9db..349b038 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -27,3 +27,4 @@
 49.special.c.dpatch
 50.pe.c.CVE-2008-6680.dpatch
 51.untar.c.CVE-2009-1270.dpatch
+52.others.h.CVE-XXXX-XXXX.dpatch
diff --git a/debian/patches/52.others.h.CVE-XXXX-XXXX.dpatch b/debian/patches/52.others.h.CVE-XXXX-XXXX.dpatch
new file mode 100644
index 0000000..18eb56b
--- /dev/null
+++ b/debian/patches/52.others.h.CVE-XXXX-XXXX.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 52.others.h.CVE-XXXX-XXXX.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: UPack crash with malformed file
+
+ at DPATCH@
+diff --git a/libclamav/others.h b/libclamav/others.h
+index a01a414..7e636a7 100644
+--- a/libclamav/others.h
++++ b/libclamav/others.h
+@@ -41,12 +41,12 @@ extern uint8_t cli_debug_flag;
+  * The macro can be used to protect against wraps.
+  */
+ #define CLI_ISCONTAINED(bb, bb_size, sb, sb_size)	\
+-    (bb_size > 0 && sb_size > 0 && sb_size <= bb_size	\
+-     && sb >= bb && sb + sb_size <= bb + bb_size && sb + sb_size > bb)
++  ((bb_size) > 0 && (sb_size) > 0 && (size_t)(sb_size) <= (size_t)(bb_size) \
++   && (sb) >= (bb) && ((sb) + (sb_size)) <= ((bb) + (bb_size)) && ((sb) + (sb_size)) > (bb) && (sb) < ((bb) + (bb_size)))
+ 
+ #define CLI_ISCONTAINED2(bb, bb_size, sb, sb_size)	\
+-    (bb_size > 0 && sb_size >= 0 && sb_size <= bb_size	\
+-     && sb >= bb && sb + sb_size <= bb + bb_size && sb + sb_size >= bb)
++  ((bb_size) > 0 && (sb_size) >= 0 && (size_t)(sb_size) <= (size_t)(bb_size) \
++   && (sb) >= (bb) && ((sb) + (sb_size)) <= ((bb) + (bb_size)) && ((sb) + (sb_size)) >= (bb) && (sb) < ((bb) + (bb_size)))
+ 
+ #define CLI_MAX_ALLOCATION 184549376
+ 

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list