From f030dd866d1e02cf17f609a687260887ba00a31055665603471ad2ac45e97b9c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 18 Apr 2012 09:44:29 +0000 Subject: [PATCH] Accepting request 114337 from home:tiwai:branches:multimedia:apps - VUL-0: csound: buffer overflow in pv_import (CVE-2012-2106, bnc#757254), VUL-0: csound: buffer overflow in lpc_import (CVE-2012-2107, bnc#757255), VUL-0: csound: Stack-based buffer overflow in lpc_import (CVE-2012-2108, bnc#757256): a single patch for all three issues OBS-URL: https://build.opensuse.org/request/show/114337 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/csound?expand=0&rev=13 --- csound-fix-CVE-2012-2107.patch | 57 ++++++++++++++++++++++++++++++++++ csound.changes | 11 +++++++ csound.spec | 2 ++ 3 files changed, 70 insertions(+) create mode 100644 csound-fix-CVE-2012-2107.patch diff --git a/csound-fix-CVE-2012-2107.patch b/csound-fix-CVE-2012-2107.patch new file mode 100644 index 0000000..56732b9 --- /dev/null +++ b/csound-fix-CVE-2012-2107.patch @@ -0,0 +1,57 @@ +From 61d1df45ca9a52bab62892a3c3a13c41e6384505 Mon Sep 17 00:00:00 2001 +From: John ffitch +Date: Tue, 6 Mar 2012 17:12:43 +0000 +Subject: [PATCH] security in utilities + +--- + util/lpci_main.c | 17 ++++++++++++++--- + util/pv_import.c | 4 ++++ + 2 files changed, 18 insertions(+), 3 deletions(-) + +--- a/util/lpci_main.c ++++ b/util/lpci_main.c +@@ -73,17 +73,28 @@ int main(int argc, char **argv) + hdr.headersize, hdr.lpmagic, hdr.npoles, hdr.nvals, + hdr.framrate, hdr.srate, hdr.duration); + str = (char *)malloc(hdr.headersize-sizeof(LPHEADER)+4); +- fread(&hdr, sizeof(char), hdr.headersize-sizeof(LPHEADER)+4, inf); ++ if (str==NULL) { ++ printf("memory allocation failure\n"); ++ exit(1); ++ } ++ if (hdr.headersize-sizeof(LPHEADER)+4 != ++ fread(&hdr, sizeof(char), hdr.headersize-sizeof(LPHEADER)+4, inf)) { ++ printf("Ill formed data\n"); ++ exit(1); ++ } + for (i=0; iMalloc(csound, data.nAnalysisBins*2*sizeof(float)); + int i; ++ if (frame==NULL) { ++ csound->Message(csound, Str("Memory failure\n")); ++ exit(1); ++ } + for (i=1;;i++) { + int j; + for (j=0; j