Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package iniparser for openSUSE:Factory checked in at 2023-06-16 16:52:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iniparser (Old) and /work/SRC/openSUSE:Factory/.iniparser.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iniparser" Fri Jun 16 16:52:58 2023 rev:11 rq:1092976 version:4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/iniparser/iniparser.changes 2022-09-04 22:11:31.584242513 +0200 +++ /work/SRC/openSUSE:Factory/.iniparser.new.15902/iniparser.changes 2023-06-16 16:53:54.057369912 +0200 @@ -1,0 +2,6 @@ +Fri Jun 2 18:36:09 UTC 2023 - Antonio Teixeira <antonio.teixe...@suse.com> + +- Add handle-null-return-getstring.patch (bsc#1211889) + CVE-2023-33461: NULL pointer dereference in iniparser_getboolean() + +------------------------------------------------------------------- New: ---- handle-null-return-getstring.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iniparser.spec ++++++ --- /var/tmp/diff_new_pack.kdIy1r/_old 2023-06-16 16:53:54.609373194 +0200 +++ /var/tmp/diff_new_pack.kdIy1r/_new 2023-06-16 16:53:54.613373218 +0200 @@ -31,6 +31,9 @@ Patch01: Fail-testrun-on-test-failure.patch Patch02: Fix-buffer-overflow-from-sprintf.patch Patch03: Fix-tests-on-32bit.patch +# PATCH-FIX-SUSE handle-null-return-getstring.patch bsc#1211889 -- CVE-2023-33461: NULL pointer dereference in iniparser_getboolean() +# https://github.com/ndevilla/iniparser/pull/146 +Patch04: handle-null-return-getstring.patch %description Libiniparser offers parsing of ini files from the C level. ++++++ handle-null-return-getstring.patch ++++++ >From ace9871f65d11b5d73f0b9ee8cf5d2807439442d Mon Sep 17 00:00:00 2001 From: Antonio <antonio...@gmail.com> Date: Fri, 2 Jun 2023 15:03:10 -0300 Subject: [PATCH] Handle null return from iniparser_getstring Fix handling of NULL returns from iniparser_getstring in iniparser_getboolean, iniparser_getlongint and iniparser_getdouble, avoiding a crash. --- src/iniparser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/iniparser.c b/src/iniparser.c index f1d1658..dbceb20 100644 --- a/src/iniparser.c +++ b/src/iniparser.c @@ -456,7 +456,7 @@ long int iniparser_getlongint(const dictionary * d, const char * key, long int n const char * str ; str = iniparser_getstring(d, key, INI_INVALID_KEY); - if (str==INI_INVALID_KEY) return notfound ; + if (str==NULL || str==INI_INVALID_KEY) return notfound ; return strtol(str, NULL, 0); } @@ -511,7 +511,7 @@ double iniparser_getdouble(const dictionary * d, const char * key, double notfou const char * str ; str = iniparser_getstring(d, key, INI_INVALID_KEY); - if (str==INI_INVALID_KEY) return notfound ; + if (str==NULL || str==INI_INVALID_KEY) return notfound ; return atof(str); } @@ -553,7 +553,7 @@ int iniparser_getboolean(const dictionary * d, const char * key, int notfound) const char * c ; c = iniparser_getstring(d, key, INI_INVALID_KEY); - if (c==INI_INVALID_KEY) return notfound ; + if (c==NULL || c==INI_INVALID_KEY) return notfound ; if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') { ret = 1 ; } else if (c[0]=='n' || c[0]=='N' || c[0]=='0' || c[0]=='f' || c[0]=='F') {