Hello community,

here is the log from the commit of package s3backer for openSUSE:Factory 
checked in at 2019-08-13 13:17:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/s3backer (Old)
 and      /work/SRC/openSUSE:Factory/.s3backer.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "s3backer"

Tue Aug 13 13:17:08 2019 rev:16 rq:722065 version:1.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/s3backer/s3backer.changes        2019-07-11 
13:17:53.290776942 +0200
+++ /work/SRC/openSUSE:Factory/.s3backer.new.9556/s3backer.changes      
2019-08-13 13:17:10.193479250 +0200
@@ -1,0 +2,9 @@
+Fri Aug  9 18:52:51 UTC 2019 -  <archie.co...@gmail.com>
+
+- Update to release 1.5.3
+  + Fixed bug where IAM update thread was killed after fork (issue #115)
+  + Fixed use-after-free bug in block_cache_verified() (issue #113)
+  + Fixed use-after-free bug when updating IAM credentials (pr #114)
+  + Fixed bug in test mode that was causing bogus I/O errors
+
+-------------------------------------------------------------------

Old:
----
  s3backer-1.5.2.tar.gz

New:
----
  s3backer-1.5.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ s3backer.spec ++++++
--- /var/tmp/diff_new_pack.Y1UJRH/_old  2019-08-13 13:17:10.589479158 +0200
+++ /var/tmp/diff_new_pack.Y1UJRH/_new  2019-08-13 13:17:10.593479157 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           s3backer
-Version:        1.5.2
+Version:        1.5.3
 Release:        0
 Summary:        FUSE-based single file backing store via Amazon S3
 License:        GPL-2.0-or-later

++++++ s3backer-1.5.2.tar.gz -> s3backer-1.5.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/CHANGES new/s3backer-1.5.3/CHANGES
--- old/s3backer-1.5.2/CHANGES  2019-07-09 20:44:36.000000000 +0200
+++ new/s3backer-1.5.3/CHANGES  2019-08-09 20:44:49.000000000 +0200
@@ -1,3 +1,10 @@
+Version 1.5.3 released August 9, 2019
+
+    - Fixed bug where IAM update thread was killed after fork (issue #115)
+    - Fixed use-after-free bug in block_cache_verified() (issue #113)
+    - Fixed use-after-free bug when updating IAM credentials (pr #114)
+    - Fixed bug in test mode that was causing bogus I/O errors
+
 Version 1.5.2 released July 9, 2019
 
     - Fixed bug where block cache would not work when run in the background 
(issue #112)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/block_cache.c 
new/s3backer-1.5.3/block_cache.c
--- old/s3backer-1.5.2/block_cache.c    2019-07-09 20:37:22.000000000 +0200
+++ new/s3backer-1.5.3/block_cache.c    2019-07-31 19:16:00.000000000 +0200
@@ -1321,9 +1321,10 @@
     assert(entry->verify);
     assert(ENTRY_GET_STATE(entry) == CLEAN2 || ENTRY_GET_STATE(entry) == 
READING2);
 
-    /* Give back some memory; if we can't no big deal */
-    if ((new_entry = realloc(entry, sizeof(*entry))) == NULL)
+    /* Allocate new, smaller entry; if we can't no big deal */
+    if ((new_entry = malloc(sizeof(*entry))) == NULL)
         goto done;
+    memcpy(new_entry, entry, sizeof(*entry));
 
     /* Update all references that point to the entry */
     s3b_hash_put(priv->hashtable, new_entry);
@@ -1331,6 +1332,7 @@
         TAILQ_REMOVE(&priv->cleans, entry, link);
         TAILQ_INSERT_TAIL(&priv->cleans, new_entry, link);
     }
+    free(entry);
     entry = new_entry;
 
 done:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/configure new/s3backer-1.5.3/configure
--- old/s3backer-1.5.2/configure        2019-07-09 20:45:06.000000000 +0200
+++ new/s3backer-1.5.3/configure        2019-08-09 20:47:04.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for s3backer FUSE filesystem backed by Amazon 
S3 1.5.2.
+# Generated by GNU Autoconf 2.69 for s3backer FUSE filesystem backed by Amazon 
S3 1.5.3.
 #
 # Report bugs to <https://github.com/archiecobbs/s3backer>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='s3backer FUSE filesystem backed by Amazon S3'
 PACKAGE_TARNAME='s3backer'
-PACKAGE_VERSION='1.5.2'
-PACKAGE_STRING='s3backer FUSE filesystem backed by Amazon S3 1.5.2'
+PACKAGE_VERSION='1.5.3'
+PACKAGE_STRING='s3backer FUSE filesystem backed by Amazon S3 1.5.3'
 PACKAGE_BUGREPORT='https://github.com/archiecobbs/s3backer'
 PACKAGE_URL=''
 
@@ -724,6 +724,7 @@
 enable_assertions
 enable_gprof
 enable_Werror
+enable_sanitize
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1279,7 +1280,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures s3backer FUSE filesystem backed by Amazon S3 1.5.2 to 
adapt to many kinds of systems.
+\`configure' configures s3backer FUSE filesystem backed by Amazon S3 1.5.3 to 
adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1345,7 +1346,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of s3backer FUSE filesystem 
backed by Amazon S3 1.5.2:";;
+     short | recursive ) echo "Configuration of s3backer FUSE filesystem 
backed by Amazon S3 1.5.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1362,6 +1363,8 @@
   --enable-assertions     enable debugging sanity checks (default NO)
   --enable-gprof          Compile and link with gprof(1) support (default NO)
   --enable-Werror         enable compilation with -Werror flag (default NO)
+  --enable-sanitize       enable compilation with -fsanitize=address and
+                          -fsanitize=undefined (default NO)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1446,7 +1449,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-s3backer FUSE filesystem backed by Amazon S3 configure 1.5.2
+s3backer FUSE filesystem backed by Amazon S3 configure 1.5.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1794,7 +1797,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by s3backer FUSE filesystem backed by Amazon S3 $as_me 1.5.2, 
which was
+It was created by s3backer FUSE filesystem backed by Amazon S3 $as_me 1.5.3, 
which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2657,7 +2660,7 @@
 
 # Define the identity of the package.
  PACKAGE='s3backer'
- VERSION='1.5.2'
+ VERSION='1.5.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4951,6 +4954,11 @@
   enableval=$enable_Werror; test x"$enableval" = "xyes" && CFLAGS="${CFLAGS} 
-Werror"
 fi
 
+# Check whether --enable-sanitize was given.
+if test "${enable_sanitize+set}" = set; then :
+  enableval=$enable_sanitize; test x"$enableval" = "xyes" && CFLAGS="${CFLAGS} 
-fsanitize=address -fsanitize=undefined"
+fi
+
 
 # Generated files
 ac_config_files="$ac_config_files Makefile"
@@ -5490,7 +5498,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by s3backer FUSE filesystem backed by Amazon S3 $as_me 
1.5.2, which was
+This file was extended by s3backer FUSE filesystem backed by Amazon S3 $as_me 
1.5.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5556,7 +5564,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-s3backer FUSE filesystem backed by Amazon S3 config.status 1.5.2
+s3backer FUSE filesystem backed by Amazon S3 config.status 1.5.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/configure.ac 
new/s3backer-1.5.3/configure.ac
--- old/s3backer-1.5.2/configure.ac     2019-07-09 20:44:44.000000000 +0200
+++ new/s3backer-1.5.3/configure.ac     2019-08-09 20:45:06.000000000 +0200
@@ -32,7 +32,7 @@
 # this exception statement from all source files in the program, then
 # also delete it here.
 
-AC_INIT([s3backer FUSE filesystem backed by Amazon S3], [1.5.2], 
[https://github.com/archiecobbs/s3backer], [s3backer])
+AC_INIT([s3backer FUSE filesystem backed by Amazon S3], [1.5.3], 
[https://github.com/archiecobbs/s3backer], [s3backer])
 AC_CONFIG_AUX_DIR(scripts)
 AM_INIT_AUTOMAKE(foreign)
 dnl AM_MAINTAINER_MODE
@@ -124,6 +124,10 @@
     AC_HELP_STRING([--enable-Werror],
         [enable compilation with -Werror flag (default NO)]),
     [test x"$enableval" = "xyes" && CFLAGS="${CFLAGS} -Werror"])
+AC_ARG_ENABLE(sanitize,
+    AC_HELP_STRING([--enable-sanitize],
+        [enable compilation with -fsanitize=address and -fsanitize=undefined 
(default NO)]),
+    [test x"$enableval" = "xyes" && CFLAGS="${CFLAGS} -fsanitize=address 
-fsanitize=undefined"])
 
 # Generated files
 AC_CONFIG_FILES(Makefile)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/gitrev.c new/s3backer-1.5.3/gitrev.c
--- old/s3backer-1.5.2/gitrev.c 2019-07-09 20:46:22.000000000 +0200
+++ new/s3backer-1.5.3/gitrev.c 2019-08-09 20:47:13.000000000 +0200
@@ -1 +1 @@
-const char *const s3backer_version = "1.5.2";
+const char *const s3backer_version = "1.5.3";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/hash.c new/s3backer-1.5.3/hash.c
--- old/s3backer-1.5.2/hash.c   2016-07-23 18:19:54.000000000 +0200
+++ new/s3backer-1.5.3/hash.c   2019-07-31 19:16:00.000000000 +0200
@@ -107,6 +107,12 @@
     }
 }
 
+/*
+ * Add/replace entry.
+ *
+ * Note that the value being replaced (if any) is referenced by this function,
+ * so it should not be free'd until after this function returns.
+ */
 void *
 s3b_hash_put(struct s3b_hash *hash, void *value)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/http_io.c new/s3backer-1.5.3/http_io.c
--- old/s3backer-1.5.2/http_io.c        2019-07-09 20:18:16.000000000 +0200
+++ new/s3backer-1.5.3/http_io.c        2019-08-05 11:51:51.000000000 +0200
@@ -413,13 +413,9 @@
     /* Initialize cURL */
     curl_global_init(CURL_GLOBAL_ALL);
 
-    /* Initialize IAM credentials and start updater thread */
-    if (config->ec2iam_role != NULL) {
-        if ((r = update_iam_credentials(priv)) != 0)
-            goto fail5;
-        if ((r = pthread_create(&priv->iam_thread, NULL, 
update_iam_credentials_main, priv)) != 0)
-            goto fail5;
-    }
+    /* Initialize IAM credentials */
+    if (config->ec2iam_role != NULL && (r = update_iam_credentials(priv)) != 0)
+        goto fail5;
 
     /* Take ownership of non-zero block bitmap */
     priv->non_zero = config->nonzero_bitmap;
@@ -881,6 +877,16 @@
 static int
 http_io_create_threads(struct s3backer_store *s3b)
 {
+    struct http_io_private *const priv = s3b->data;
+    struct http_io_conf *const config = priv->config;
+    int r;
+
+    /* Start IAM updater thread if appropriate */
+    if (config->ec2iam_role != NULL
+      && (r = pthread_create(&priv->iam_thread, NULL, 
update_iam_credentials_main, priv)) != 0)
+        return r;
+
+    /* Done */
     return 0;
 }
 
@@ -1085,7 +1091,6 @@
         free(urlbuf);
         return r;
     }
-    free(urlbuf);
 
     /* Determine how many bytes we read */
     buflen = io.buf_size - io.bufs.rdremain;
@@ -1100,6 +1105,7 @@
         (*config->log)(LOG_ERR, "failed to extract EC2 IAM credentials from 
response: %s", strerror(errno));
         free(access_id);
         free(access_key);
+        free(urlbuf);
         return EINVAL;
     }
 
@@ -1113,6 +1119,7 @@
     config->iam_token = iam_token;
     pthread_mutex_unlock(&priv->mutex);
     (*config->log)(LOG_INFO, "successfully updated EC2 IAM credentials from 
%s", io.url);
+    free(urlbuf);
 
     /* Done */
     return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/s3b_config.c 
new/s3backer-1.5.3/s3b_config.c
--- old/s3backer-1.5.2/s3b_config.c     2019-07-09 20:18:43.000000000 +0200
+++ new/s3backer-1.5.3/s3b_config.c     2019-07-26 16:21:11.000000000 +0200
@@ -983,7 +983,8 @@
         config.http_io.accessId = NULL;
 
     /* If no accessId, only read operations will succeed */
-    if (config.http_io.accessId == NULL && !config.fuse_ops.read_only && 
!customBaseURL && config.http_io.ec2iam_role == NULL) {
+    if (!config.test && config.http_io.accessId == NULL
+      && !config.fuse_ops.read_only && !customBaseURL && 
config.http_io.ec2iam_role == NULL) {
         warnx("warning: no `accessId' specified; only read operations will 
succeed");
         warnx("you can eliminate this warning by providing the `--readOnly' 
flag");
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/s3backer.spec 
new/s3backer-1.5.3/s3backer.spec
--- old/s3backer-1.5.2/s3backer.spec    2019-07-09 20:46:12.000000000 +0200
+++ new/s3backer-1.5.3/s3backer.spec    2019-08-09 20:47:11.000000000 +0200
@@ -29,7 +29,7 @@
 # 
 
 Name:           s3backer
-Version:        1.5.2
+Version:        1.5.3
 Release:        1
 License:        GNU General Public License, Version 2
 Summary:        FUSE-based single file backing store via Amazon S3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3backer-1.5.2/test_io.c new/s3backer-1.5.3/test_io.c
--- old/s3backer-1.5.2/test_io.c        2019-07-09 20:19:20.000000000 +0200
+++ new/s3backer-1.5.3/test_io.c        2019-07-26 16:21:11.000000000 +0200
@@ -218,11 +218,21 @@
 
     /* Check expected MD5 */
     if (expect_md5 != NULL) {
-        const int match = memcmp(md5, expect_md5, MD5_DIGEST_LENGTH);
+        const int match = memcmp(md5, expect_md5, MD5_DIGEST_LENGTH) == 0;
 
         if (strict) {
             if (!match) {
-                (*config->log)(LOG_ERR, "%s: wrong MD5 checksum?!", path);
+                (*config->log)(LOG_ERR,
+                   "%s: wrong MD5 checksum?! 
%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+                   " != 
%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", path,
+                  (u_int)md5[0], (u_int)md5[1], (u_int)md5[2], (u_int)md5[3],
+                  (u_int)md5[4], (u_int)md5[5], (u_int)md5[6], (u_int)md5[7],
+                  (u_int)md5[8], (u_int)md5[9], (u_int)md5[10], (u_int)md5[11],
+                  (u_int)md5[12], (u_int)md5[13], (u_int)md5[14], 
(u_int)md5[15],
+                  (u_int)expect_md5[0], (u_int)expect_md5[1], 
(u_int)expect_md5[2], (u_int)expect_md5[3],
+                  (u_int)expect_md5[4], (u_int)expect_md5[5], 
(u_int)expect_md5[6], (u_int)expect_md5[7],
+                  (u_int)expect_md5[8], (u_int)expect_md5[9], 
(u_int)expect_md5[10], (u_int)expect_md5[11],
+                  (u_int)expect_md5[12], (u_int)expect_md5[13], 
(u_int)expect_md5[14], (u_int)expect_md5[15]);
                 return EINVAL;
             }
         } else if (match)
@@ -231,7 +241,13 @@
 
     /* Logging */
     if (config->debug) {
-        (*config->log)(LOG_DEBUG, "test_io: read %0*jx complete%s%s", 
S3B_BLOCK_NUM_DIGITS, (uintmax_t)block_num,
+        (*config->log)(LOG_DEBUG,
+          "test_io: read %0*jx complete, MD5 
%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%s%s",
+          S3B_BLOCK_NUM_DIGITS, (uintmax_t)block_num,
+          (u_int)md5[0], (u_int)md5[1], (u_int)md5[2], (u_int)md5[3],
+          (u_int)md5[4], (u_int)md5[5], (u_int)md5[6], (u_int)md5[7],
+          (u_int)md5[8], (u_int)md5[9], (u_int)md5[10], (u_int)md5[11],
+          (u_int)md5[12], (u_int)md5[13], (u_int)md5[14], (u_int)md5[15],
           zero_block ? " (zero)" : "", r == EEXIST ? " (expected md5 match)" : 
"");
     }
 
@@ -272,8 +288,14 @@
 
     /* Logging */
     if (config->debug) {
-        (*config->log)(LOG_DEBUG, "test_io: write %0*jx started%s",
-          S3B_BLOCK_NUM_DIGITS, (uintmax_t)block_num, src == NULL ? " (zero 
block)" : "");
+        (*config->log)(LOG_DEBUG,
+          "test_io: write %0*jx started, MD5 
%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%s",
+          S3B_BLOCK_NUM_DIGITS, (uintmax_t)block_num,
+          (u_int)md5[0], (u_int)md5[1], (u_int)md5[2], (u_int)md5[3],
+          (u_int)md5[4], (u_int)md5[5], (u_int)md5[6], (u_int)md5[7],
+          (u_int)md5[8], (u_int)md5[9], (u_int)md5[10], (u_int)md5[11],
+          (u_int)md5[12], (u_int)md5[13], (u_int)md5[14], (u_int)md5[15],
+          src == NULL ? " (zero block)" : "");
     }
 
     /* Random delay */


Reply via email to