Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libHX for openSUSE:Factory checked in at 2021-10-16 22:46:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libHX (Old) and /work/SRC/openSUSE:Factory/.libHX.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libHX" Sat Oct 16 22:46:59 2021 rev:63 rq:925102 version:4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libHX/libHX.changes 2021-10-11 15:31:16.090811389 +0200 +++ /work/SRC/openSUSE:Factory/.libHX.new.1890/libHX.changes 2021-10-16 22:47:17.984674703 +0200 @@ -1,0 +2,6 @@ +Wed Oct 13 12:59:26 UTC 2021 - Jan Engelhardt <jeng...@inai.de> + +- Update to release 4.1 + * io: fix a use-after-free in conjunction with HX_realpath + +------------------------------------------------------------------- Old: ---- libHX-4.0.1.tar.asc libHX-4.0.1.tar.xz New: ---- libHX-4.1.tar.asc libHX-4.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libHX.spec ++++++ --- /var/tmp/diff_new_pack.mMx7SJ/_old 2021-10-16 22:47:18.412675064 +0200 +++ /var/tmp/diff_new_pack.mMx7SJ/_new 2021-10-16 22:47:18.416675068 +0200 @@ -18,7 +18,7 @@ Name: libHX %define lname libHX32 -Version: 4.0.1 +Version: 4.1 Release: 0 Summary: Collection of routines for C and C++ programming License: LGPL-2.1-or-later ++++++ libHX-4.0.1.tar.xz -> libHX-4.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.0.1/configure new/libHX-4.1/configure --- old/libHX-4.0.1/configure 2021-10-03 02:30:13.977160683 +0200 +++ new/libHX-4.1/configure 2021-10-13 14:57:20.466030028 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libHX 4.0.1. +# Generated by GNU Autoconf 2.69 for libHX 4.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='libHX' PACKAGE_TARNAME='libhx' -PACKAGE_VERSION='4.0.1' -PACKAGE_STRING='libHX 4.0.1' +PACKAGE_VERSION='4.1' +PACKAGE_STRING='libHX 4.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1340,7 +1340,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 libHX 4.0.1 to adapt to many kinds of systems. +\`configure' configures libHX 4.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1410,7 +1410,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libHX 4.0.1:";; + short | recursive ) echo "Configuration of libHX 4.1:";; esac cat <<\_ACEOF @@ -1525,7 +1525,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libHX configure 4.0.1 +libHX configure 4.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2251,7 +2251,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libHX $as_me 4.0.1, which was +It was created by libHX $as_me 4.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3112,7 +3112,7 @@ # Define the identity of the package. PACKAGE='libhx' - VERSION='4.0.1' + VERSION='4.1' cat >>confdefs.h <<_ACEOF @@ -17712,7 +17712,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libHX $as_me 4.0.1, which was +This file was extended by libHX $as_me 4.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17778,7 +17778,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libHX config.status 4.0.1 +libHX config.status 4.1 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/libHX-4.0.1/configure.ac new/libHX-4.1/configure.ac --- old/libHX-4.0.1/configure.ac 2021-10-03 01:05:06.000000000 +0200 +++ new/libHX-4.1/configure.ac 2021-10-13 14:54:52.000000000 +0200 @@ -1,4 +1,4 @@ -AC_INIT([libHX], [4.0.1]) +AC_INIT([libHX], [4.1]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.0.1/doc/changelog.rst new/libHX-4.1/doc/changelog.rst --- old/libHX-4.0.1/doc/changelog.rst 2021-10-03 01:05:06.000000000 +0200 +++ new/libHX-4.1/doc/changelog.rst 2021-10-13 14:54:52.000000000 +0200 @@ -1,3 +1,12 @@ +v4.1 (2021-10-13) +================= + +Fixes: + +* io: fix a use-after-free in conjunction with HX_realpath / + fix missing NULLing of a pointer within HX_readlink + + v4.0 (2021-10-03) ================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.0.1/src/io.c new/libHX-4.1/src/io.c --- old/libHX-4.0.1/src/io.c 2021-10-03 01:05:06.000000000 +0200 +++ new/libHX-4.1/src/io.c 2021-10-13 14:54:52.000000000 +0200 @@ -316,8 +316,10 @@ ssize_t ret = readlink(path, *target, linkbuf_size); if (ret < 0) { int saved_errno = errno; - if (allocate) + if (allocate) { HXmc_free(*target); + *target = nullptr; + } return -(errno = saved_errno); } if (static_cast(size_t, ret) < linkbuf_size) { @@ -327,8 +329,10 @@ linkbuf_size *= 2; if (HXmc_setlen(target, linkbuf_size) == NULL) { int saved_errno = errno; - if (allocate) + if (allocate) { HXmc_free(*target); + *target = nullptr; + } return -(errno = saved_errno); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.0.1/src/tc-realpath.c new/libHX-4.1/src/tc-realpath.c --- old/libHX-4.0.1/src/tc-realpath.c 2021-10-03 01:05:06.000000000 +0200 +++ new/libHX-4.1/src/tc-realpath.c 2021-10-13 14:54:52.000000000 +0200 @@ -11,6 +11,7 @@ #include <stdlib.h> #include <libHX/io.h> #include <libHX/option.h> +#include <libHX/string.h> static unsigned int rp_flags; static unsigned int rp_absolute; @@ -42,6 +43,14 @@ return true; } +static void t_1(void) +{ + hxmc_t *tmp = HXmc_strinit(""); + /* two components, so that HX_readlink gets called twice */ + HX_realpath(&tmp, "/dev/tty", HX_REALPATH_DEFAULT); + HXmc_free(tmp); +} + int main(int argc, const char **argv) { hxmc_t *res; @@ -49,6 +58,7 @@ if (!rp_get_options(&argc, &argv)) return EXIT_FAILURE; + t_1(); res = NULL; while (--argc > 0) {