21810433 fix memory management issues with SEAP in openscap
authorJacob Varughese <jacob.varughese@oracle.com>
Wed, 23 Sep 2015 08:28:19 -0700
changeset 4893 95c28fe27246
parent 4889 28ca829107b4
child 4894 7219201c1b0d
21810433 fix memory management issues with SEAP in openscap
components/openscap/patches/seap-packet.c.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/openscap/patches/seap-packet.c.patch	Wed Sep 23 08:28:19 2015 -0700
@@ -0,0 +1,24 @@
+This patch fixes some memory management issues with 
+SEAP. This patch has not been contributed upstream
+but will be done by 2015-09-30.
+--- openscap-1.2.3/src/OVAL/probes/SEAP/seap-packet.c.~1~	2015-09-09 08:47:22.067689406 -0700
++++ openscap-1.2.3/src/OVAL/probes/SEAP/seap-packet.c	2015-09-09 08:47:46.696514370 -0700
[email protected]@ -730,7 +730,6 @@
+                         } else {
+                                 SEXP_list_free (sexp_buffer);
+                                 SEXP_psetup_free (psetup);
+-				SEXP_free(sexp_buffer);
+                                 dI("eloop_restart\n");
+                                 goto eloop_start;
+                         }
+--- openscap-1.2.3/src/OVAL/probes/SEAP/sexp-value.c.~1~	2015-09-10 15:14:06.694228778 -0700
++++ openscap-1.2.3/src/OVAL/probes/SEAP/sexp-value.c	2015-09-10 15:15:53.755827733 -0700
[email protected]@ -119,7 +119,7 @@
+         _A(sz < 16);
+ 
+         if (sm_memalign ((void **)(void *)&lblk, SEXP_LBLK_ALIGN,
+-                         sizeof (uintptr_t) + (2 * sizeof (uint16_t)) + (sizeof (SEXP_t) * (1 << sz))) != 0) {
++                         sizeof (struct SEXP_val_lblk) + (sizeof (SEXP_t) * (1 << sz))) != 0) {
+                 /* TODO: handle this */
+                 abort ();
+                 return ((uintptr_t) NULL);