Bugzilla – Bug 932267
VUL-1: CVE-2015-4037: qemu,kvm,xen: insecure temporary file use in /net/slirp.c
Last modified: 2021-01-21 18:25:20 UTC
rh#1222892 Kurt Seifried discovered that temporary files were insecurely created in QEMU's /net/slirp.c implementation: --- > ./net/slirp.c: > snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d", > (long)getpid(), instance++); This one is real, used for -smb argument, to start smbd, making its configuration. Maybe tmpnam() should be used here. --- Original report (and CVE request): http://seclists.org/oss-sec/2015/q2/426 References: https://bugzilla.redhat.com/show_bug.cgi?id=1222892 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-4037 http://seclists.org/oss-sec/2015/q2/538 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-4037
bugbot adjusting priority
SLE 11 SP3 and SLE 12 only
There is now a patch for this in QEMU's master git branch: commit 8b8f1c7e9ddb2e88a144638f6527bf70e32343e3 Author: Michael Tokarev <mjt@tls.msk.ru> Date: Thu May 28 14:12:26 2015 +0300 slirp: use less predictable directory name in /tmp for smb config (CVE-2015- 4037)
Hello guys, I have tested the issue and file's postfix has changed. That is ok. leylek:/images # ls /tmp/qemu-smb. qemu-smb.1B2j7j/ qemu-smb.9L3FFA/ qemu-smb.JcoPTT/ qemu-smb.PFROVU/ However when qemu console is killed (finished unexpectadly) the files are not deleted (see when it can happen Bug #934517). That is not a regression (happening before appliying patch) I am not sure whether from point of view of security it is correct.
(In reply to Viktor Kijasev from comment #9) > Hello guys, > I have tested the issue and file's postfix has changed. > That is ok. > > leylek:/images # ls /tmp/qemu-smb. > qemu-smb.1B2j7j/ qemu-smb.9L3FFA/ qemu-smb.JcoPTT/ qemu-smb.PFROVU/ > > However when qemu console is killed (finished unexpectadly) the files are > not deleted (see when it can happen Bug #934517). > That is not a regression (happening before appliying patch) > > I am not sure whether from point of view of security it is correct. Having files left over upon SIGKILL is okay. Only the filename used needs to be less predictable, so that an attacker cannot put in place his own file or symlink.
SUSE-SU-2015:1152-1: An update that solves one vulnerability and has one errata is now available. Category: security (important) Bug References: 932267,932770 CVE References: CVE-2015-3209 Sources used: SUSE Linux Enterprise Server 11 SP3 (src): kvm-1.4.2-0.22.31.1 SUSE Linux Enterprise Desktop 11 SP3 (src): kvm-1.4.2-0.22.31.1
SUSE-SU-2015:1519-1: An update that solves two vulnerabilities and has one errata is now available. Category: security (important) Bug References: 893892,932267,932770 CVE References: CVE-2015-3209,CVE-2015-4037 Sources used: SUSE Linux Enterprise Server 12 (src): qemu-2.0.2-48.4.1 SUSE Linux Enterprise Desktop 12 (src): qemu-2.0.2-48.4.1
SUSE-SU-2015:1853-1: An update that solves 8 vulnerabilities and has 6 fixes is now available. Category: security (important) Bug References: 877642,907514,910258,918984,923967,932267,941074,944463,944697,947165,950367,950703,950705,950706 CVE References: CVE-2014-0222,CVE-2015-4037,CVE-2015-5239,CVE-2015-6815,CVE-2015-7311,CVE-2015-7835,CVE-2015-7969,CVE-2015-7971 Sources used: SUSE Linux Enterprise Software Development Kit 11-SP3 (src): xen-4.2.5_14-18.2 SUSE Linux Enterprise Server 11-SP3 (src): xen-4.2.5_14-18.2 SUSE Linux Enterprise Desktop 11-SP3 (src): xen-4.2.5_14-18.2 SUSE Linux Enterprise Debuginfo 11-SP3 (src): xen-4.2.5_14-18.2
SUSE-SU-2015:1894-1: An update that solves 8 vulnerabilities and has 9 fixes is now available. Category: security (important) Bug References: 877642,901488,907514,910258,918984,923967,932267,944463,944697,945167,947165,949138,949549,950367,950703,950705,950706 CVE References: CVE-2014-0222,CVE-2015-4037,CVE-2015-5239,CVE-2015-6815,CVE-2015-7311,CVE-2015-7835,CVE-2015-7969,CVE-2015-7971 Sources used: SUSE Linux Enterprise Software Development Kit 11-SP4 (src): xen-4.4.3_02-26.2 SUSE Linux Enterprise Server 11-SP4 (src): xen-4.4.3_02-26.2 SUSE Linux Enterprise Desktop 11-SP4 (src): xen-4.4.3_02-26.2 SUSE Linux Enterprise Debuginfo 11-SP4 (src): xen-4.4.3_02-26.2
SUSE-SU-2015:1908-1: An update that solves 8 vulnerabilities and has 8 fixes is now available. Category: security (important) Bug References: 877642,901488,907514,910258,918984,923967,932267,944463,944697,945167,947165,949138,950367,950703,950705,950706 CVE References: CVE-2014-0222,CVE-2015-4037,CVE-2015-5239,CVE-2015-6815,CVE-2015-7311,CVE-2015-7835,CVE-2015-7969,CVE-2015-7971 Sources used: SUSE Linux Enterprise Software Development Kit 12 (src): xen-4.4.3_02-22.12.1 SUSE Linux Enterprise Server 12 (src): xen-4.4.3_02-22.12.1 SUSE Linux Enterprise Desktop 12 (src): xen-4.4.3_02-22.12.1
Hello, Is this bug valid for xen(sles11sp2) which is using qemu-dm(traditional)? Thank you
(In reply to Zdenek Kubala from comment #16) > Hello, Is this bug valid for xen(sles11sp2) which is using > qemu-dm(traditional)? > Thank you I backported the patch to qemu-dm all the way back to SLE10-SP3. See CVE-2015-4037-qemut-smb-config-dir-name.patch in the sources. Whether any customer has ever used this functionality is unknown. Perhaps only basic regression testing is needed for these LTSS distros in this case.
(In reply to Charles Arnold from comment #17) > (In reply to Zdenek Kubala from comment #16) > > Hello, Is this bug valid for xen(sles11sp2) which is using > > qemu-dm(traditional)? > > Thank you > > I backported the patch to qemu-dm all the way back to SLE10-SP3. > See CVE-2015-4037-qemut-smb-config-dir-name.patch in the sources. > Whether any customer has ever used this functionality is unknown. > Perhaps only basic regression testing is needed for these LTSS distros > in this case. Thx for clarification. And how can I easily reproduce it? Viktor reproduced it with qemu on sle12 but qemu-dm --help on sles11sp2 shows nothing about smb in net section.
(In reply to Zdenek Kubala from comment #18) > (In reply to Charles Arnold from comment #17) > > (In reply to Zdenek Kubala from comment #16) > > > Hello, Is this bug valid for xen(sles11sp2) which is using > > > qemu-dm(traditional)? > > > Thank you > > > > I backported the patch to qemu-dm all the way back to SLE10-SP3. > > See CVE-2015-4037-qemut-smb-config-dir-name.patch in the sources. > > Whether any customer has ever used this functionality is unknown. > > Perhaps only basic regression testing is needed for these LTSS distros > > in this case. > > Thx for clarification. And how can I easily reproduce it? Viktor reproduced > it with qemu on sle12 but qemu-dm --help on sles11sp2 shows nothing about > smb in net section. Or how to test it.
(In reply to Zdenek Kubala from comment #19) > (In reply to Zdenek Kubala from comment #18) > > (In reply to Charles Arnold from comment #17) > > > (In reply to Zdenek Kubala from comment #16) > > > > Hello, Is this bug valid for xen(sles11sp2) which is using > > > > qemu-dm(traditional)? > > > > Thank you > > > > > > I backported the patch to qemu-dm all the way back to SLE10-SP3. > > > See CVE-2015-4037-qemut-smb-config-dir-name.patch in the sources. > > > Whether any customer has ever used this functionality is unknown. > > > Perhaps only basic regression testing is needed for these LTSS distros > > > in this case. > > > > Thx for clarification. And how can I easily reproduce it? Viktor reproduced > > it with qemu on sle12 but qemu-dm --help on sles11sp2 shows nothing about > > smb in net section. > > Or how to test it. There was a lot of code rewrite in this area from 11sp2 to 12 (functions moved to new files and renamed, etc.). It may not have worked well or at all in the old code base. So in this case I think undocumented == unsupported feature and therefore requires no testing.
Makes sense. Thx.
SUSE-SU-2015:1952-1: An update that solves 7 vulnerabilities and has one errata is now available. Category: security (important) Bug References: 877642,932267,944463,944697,950367,950703,950705,950706 CVE References: CVE-2014-0222,CVE-2015-4037,CVE-2015-5239,CVE-2015-6815,CVE-2015-7835,CVE-2015-7969,CVE-2015-7971 Sources used: SUSE Linux Enterprise Server 11-SP2-LTSS (src): xen-4.1.6_08-20.1 SUSE Linux Enterprise Debuginfo 11-SP2 (src): xen-4.1.6_08-20.1
An update workflow for this issue was started. This issue was rated as moderate. Please submit fixed packages until 2015-11-25. When done, reassign the bug to security-team@suse.de. https://swamp.suse.de/webswamp/wf/62332
openSUSE-SU-2015:1964-1: An update that solves 12 vulnerabilities and has two fixes is now available. Category: security (important) Bug References: 877642,932267,938344,939709,939712,941074,944463,944697,947165,950367,950703,950705,950706,951845 CVE References: CVE-2014-0222,CVE-2015-4037,CVE-2015-5154,CVE-2015-5165,CVE-2015-5166,CVE-2015-5239,CVE-2015-6815,CVE-2015-7311,CVE-2015-7835,CVE-2015-7969,CVE-2015-7971,CVE-2015-7972 Sources used: openSUSE 13.1 (src): xen-4.3.4_06-50.1
openSUSE-SU-2015:1965-1: An update that solves 6 vulnerabilities and has one errata is now available. Category: security (moderate) Bug References: 877642,932267,950367,950703,950705,950706,951845 CVE References: CVE-2014-0222,CVE-2015-4037,CVE-2015-7835,CVE-2015-7969,CVE-2015-7971,CVE-2015-7972 Sources used: openSUSE Leap 42.1 (src): xen-4.5.1_12-3.1
openSUSE-SU-2015:2003-1: An update that solves 13 vulnerabilities and has 9 fixes is now available. Category: security (important) Bug References: 877642,901488,907514,910258,918984,923967,925466,932267,935634,938344,939709,939712,944463,944697,945167,947165,949138,950367,950703,950705,950706,951845 CVE References: CVE-2014-0222,CVE-2015-3259,CVE-2015-4037,CVE-2015-5154,CVE-2015-5165,CVE-2015-5166,CVE-2015-5239,CVE-2015-6815,CVE-2015-7311,CVE-2015-7835,CVE-2015-7969,CVE-2015-7971,CVE-2015-7972 Sources used: openSUSE 13.2 (src): xen-4.4.3_02-30.1
all were released. needinfo satisfied i think.
An update workflow for this issue was started. This issue was rated as important. Please submit fixed packages until 2016-01-26. When done, reassign the bug to security-team@suse.de. https://swamp.suse.de/webswamp/wf/62448
SUSE-SU-2016:0658-1: An update that fixes 13 vulnerabilities is now available. Category: security (important) Bug References: 877642,932267,944463,950706,953527,954405,956408,956411,957988,958009,958493,958523,962360 CVE References: CVE-2014-0222,CVE-2015-4037,CVE-2015-5239,CVE-2015-5307,CVE-2015-7504,CVE-2015-7512,CVE-2015-7971,CVE-2015-8104,CVE-2015-8339,CVE-2015-8340,CVE-2015-8504,CVE-2015-8550,CVE-2015-8555 Sources used: SUSE Linux Enterprise Server 10 SP4 LTSS (src): xen-3.2.3_17040_46-0.23.2