Bug 949068 (CVE-2015-5162) - VUL-0: CVE-2015-5162: openstack-nova,openstack-glance,openstack-cinder: Malicious image causes OOM on the compute host
Summary: VUL-0: CVE-2015-5162: openstack-nova,openstack-glance,openstack-cinder: Malic...
Status: RESOLVED FIXED
Alias: CVE-2015-5162
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Cloud Bugs
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/157335/
Whiteboard: CVSSv2:RedHat:CVE-2015-5162:5.0:(AV:N...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-06 15:52 UTC by Andreas Stieger
Modified: 2018-04-26 14:38 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
afl1.img (516 bytes, application/octet-stream)
2015-10-06 15:53 UTC, Andreas Stieger
Details
afl2.img (192.50 KB, application/octet-stream)
2015-10-06 15:53 UTC, Andreas Stieger
Details
afl3.img (63.87 KB, application/octet-stream)
2015-10-06 15:54 UTC, Andreas Stieger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Stieger 2015-10-06 15:52:45 UTC
https://bugs.launchpad.net/ossa/+bug/1449062

qemu image parser is not hardened against malicious input and can be abused to allocated an arbitrary amount of memory and/or dump a lot of information when used with "--output=json".

Reproducers:

> $ /usr/bin/time qemu-img info afl1.img
> image: afl1.img
> [...]
> 0.13user 0.19system 0:00.36elapsed 92%CPU (0avgtext+0avgdata 642416maxresident)k
> 0inputs+0outputs (0major+156927minor)pagefaults 0swaps
> 
> The original image is 516 bytes, but it causes qemu-img to allocate 640 MB.
> -- afl2.img --
> 
> $ qemu-img info --output=json afl2.img | wc -l
> 589843
> 
> This is a 200K image which causes qemu-img info to output half a
> million lines of JSON (14 MB of JSON).
> 
> Glance runs the --output=json variant of the command.
> 
> -- afl3.img --
> 
> $ /usr/bin/time qemu-img info afl3.img
> image: afl3.img
> [...]
> 0.09user 0.35system 0:00.47elapsed 94%CPU (0avgtext+0avgdata 1262388maxresident)k
> 0inputs+0outputs (0major+311994minor)pagefaults 0swaps
> 
> qemu-img allocates 1.3 GB (actually, a bit more if you play with
> ulimit -v). It appears that you could change it to allocate
> arbitrarily large amounts of RAM.


nova, cinder.

> Nova: versions through 2014.2.3, 2015.1 versions through 2015.1.1
> Cinder: versions through 2014.2.3, 2015.1 versions through 2015.1.1
> Glance: 2015.1 versions through 2015.1.1

We are good with glance as I can see.

References:
https://bugs.launchpad.net/ossa/+bug/1449062
https://bugzilla.redhat.com/show_bug.cgi?id=1268303
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-5162
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-5162
Comment 1 Andreas Stieger 2015-10-06 15:53:29 UTC
Created attachment 650362 [details]
afl1.img

Reproducer 1 from upstream bug
Comment 2 Andreas Stieger 2015-10-06 15:53:47 UTC
Created attachment 650363 [details]
afl2.img

Reproducer 2 from upstream bug
Comment 3 Andreas Stieger 2015-10-06 15:54:14 UTC
Created attachment 650364 [details]
afl3.img

Reproducer 3 from upstream bug. Apparently found by fuzzer afl.
Comment 4 Swamp Workflow Management 2015-10-06 22:00:10 UTC
bugbot adjusting priority
Comment 5 Benjamin Brunner 2016-01-14 16:30:41 UTC
We currently have a running update for openstack-nova for the SLE12-compute node which is not in QA yet. Can we already merge the fix to the running update?
Comment 6 Andreas Stieger 2016-01-14 16:43:52 UTC
(In reply to Benjamin Brunner from comment #5)
> We currently have a running update for openstack-nova for the SLE12-compute
> node which is not in QA yet. Can we already merge the fix to the running
> update?

Yes. Please include the following (started update)

Security: bnc#934768, bnc#949068, bnc#960601
L3: bnc#945453
Comment 7 Bernhard Wiedemann 2016-01-25 13:21:09 UTC
There was a fix in
https://review.openstack.org/#/c/209627/
but it got reverted quickly via
https://review.openstack.org/#/c/234696/
because of nova segfaults
Comment 8 Johannes Segitz 2017-08-10 14:57:14 UTC
fixed in current cloud offerings