Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package opusfile for openSUSE:Factory checked in at 2023-03-19 00:30:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opusfile (Old) and /work/SRC/openSUSE:Factory/.opusfile.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opusfile" Sun Mar 19 00:30:27 2023 rev:10 rq:1072681 version:0.12 Changes: -------- --- /work/SRC/openSUSE:Factory/opusfile/opusfile.changes 2020-09-23 18:49:11.781806848 +0200 +++ /work/SRC/openSUSE:Factory/.opusfile.new.31432/opusfile.changes 2023-03-19 00:30:28.824063373 +0100 @@ -1,0 +2,6 @@ +Wed Mar 15 20:17:36 UTC 2023 - Michael Gorse <mgo...@suse.com> + +- Add opusfile-CVE-2022-47021.patch: fix a NULL pointer + dereference (boo#1207381 CVE-2022-47021). + +------------------------------------------------------------------- New: ---- opusfile-CVE-2022-47021.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opusfile.spec ++++++ --- /var/tmp/diff_new_pack.nJtYur/_old 2023-03-19 00:30:29.316065707 +0100 +++ /var/tmp/diff_new_pack.nJtYur/_new 2023-03-19 00:30:29.324065745 +0100 @@ -1,7 +1,7 @@ # # spec file for package opusfile # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2013 Bjørn Lie (zai...@opensuse.org). # # All modifications and additions to the file contributed by third parties @@ -26,6 +26,8 @@ Group: System/Libraries URL: https://www.opus-codec.org/ Source: https://downloads.xiph.org/releases/opus/opusfile-%{version}.tar.gz +# PATCH-FIX-UPSTREAM opusfile-CVE-2022-47021.patch boo#1207381 mgo...@suse.com -- fix a NULL pointer dereference. +Patch0: opusfile-CVE-2022-47021.patch BuildRequires: pkgconfig BuildRequires: pkgconfig(ogg) >= 1.3 BuildRequires: pkgconfig(openssl) @@ -67,7 +69,7 @@ Files for development with %{name}. %prep -%setup -q +%autosetup -p1 %build %configure \ ++++++ opusfile-CVE-2022-47021.patch ++++++ >From 0a4cd796df5b030cb866f3f4a5e41a4b92caddf5 Mon Sep 17 00:00:00 2001 From: Ralph Giles <gi...@thaumas.net> Date: Tue, 6 Sep 2022 19:04:31 -0700 Subject: [PATCH] Propagate allocation failure from ogg_sync_buffer. Instead of segfault, report OP_EFAULT if ogg_sync_buffer returns a null pointer. This allows more graceful recovery by the caller in the unlikely event of a fallible ogg_malloc call. We do check the return value elsewhere in the code, so the new checks make the code more consistent. Thanks to https://github.com/xiph/opusfile/issues/36 for reporting. Signed-off-by: Timothy B. Terriberry <tterr...@xiph.org> Signed-off-by: Mark Harris <mark....@gmail.com> --- src/opusfile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/opusfile.c b/src/opusfile.c index ca219b2..3c3c81e 100644 --- a/src/opusfile.c +++ b/src/opusfile.c @@ -148,6 +148,7 @@ static int op_get_data(OggOpusFile *_of,int _nbytes){ int nbytes; OP_ASSERT(_nbytes>0); buffer=(unsigned char *)ogg_sync_buffer(&_of->oy,_nbytes); + if(OP_UNLIKELY(buffer==NULL))return OP_EFAULT; nbytes=(int)(*_of->callbacks.read)(_of->stream,buffer,_nbytes); OP_ASSERT(nbytes<=_nbytes); if(OP_LIKELY(nbytes>0))ogg_sync_wrote(&_of->oy,nbytes); @@ -1527,6 +1528,7 @@ static int op_open1(OggOpusFile *_of, if(_initial_bytes>0){ char *buffer; buffer=ogg_sync_buffer(&_of->oy,(long)_initial_bytes); + if(OP_UNLIKELY(buffer==NULL))return OP_EFAULT; memcpy(buffer,_initial_data,_initial_bytes*sizeof(*buffer)); ogg_sync_wrote(&_of->oy,(long)_initial_bytes); }