Bug 1024992 - (CVE-2017-5956) VUL-0: CVE-2017-5956: virglrenderer: OOB access while in vrend_draw_vbo
(CVE-2017-5956)
VUL-0: CVE-2017-5956: virglrenderer: OOB access while in vrend_draw_vbo
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Lin Ma
Security Team bot
CVSSv2:SUSE:CVE-2017-5956:3.8:(AV:A/A...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-13 11:35 UTC by Mikhail Kasimov
Modified: 2018-02-16 07:33 UTC (History)
2 users (show)

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


Attachments
Additional fix to avoid memory leak (588 bytes, patch)
2017-02-24 10:31 UTC, Matthias Gerstner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Kasimov 2017-02-13 11:35:22 UTC
Ref: http://seclists.org/oss-sec/2017/q1/416
=============================================
  Hello,

Virgil 3d project, used by Quick Emulator(Qemu) to implement 3D GPU support for the virtio GPU, is vulnerable to an OOB array access issue. It could occur when in vrend_draw_vbo.


A guest user/process could use this flaw to crash the Qemu process instance resulting DoS.


Upstream patch:
---------------
  -> https://cgit.freedesktop.org/virglrenderer/commit/?id=a5ac49940c40ae415eac0cf912eac7070b4ba95d

Reference:
----------
  -> https://bugzilla.redhat.com/show_bug.cgi?id=1421073

This issue was reported by Li Qiang of 360.cn Inc.

'CVE-2017-5956' assigned via -> https://cveform.mitre.org/

Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F


=============================================
Comment 1 Matthias Gerstner 2017-02-13 14:38:35 UTC
Our only codestream is affected in:

SUSE:SLE-12-SP2:Update/virglrenderer/virglrenderer-0.5.0/src/vrend_decode.c:612

I'm not sure yet but the upstream patch might still be incomplete, because it
might open a memory leak by not freeing the ve structure.
Comment 2 Swamp Workflow Management 2017-02-13 23:01:00 UTC
bugbot adjusting priority
Comment 3 Matthias Gerstner 2017-02-15 08:34:41 UTC
I've written the reporter of this issue and he confirmed that the current fix
for this issue leaves a memory leak open, because the memory allocated in this
line:

  ve = calloc(num_elements, sizeof(struct pipe_vertex_element));

is not freed in the context of the new return statement. Maybe we will get a
follow-up CVE for this or at least a new upstream commit.
Comment 4 Matthias Gerstner 2017-02-24 10:31:32 UTC
Created attachment 715395 [details]
Additional fix to avoid memory leak
Comment 5 Matthias Gerstner 2017-02-24 10:33:20 UTC
(In reply to matthias.gerstner@suse.com from comment #3)

> Maybe we will get a follow-up CVE for this or at least a new upstream
> commit.

Neither happened until now. I'm providing a possible bugfix for the resulting
memory leak in attachment 715395 [details]. I've also added a comment on the oss-sec
mailing list to make people aware of the incomplete fix.
Comment 6 Swamp Workflow Management 2017-03-22 20:09:48 UTC
SUSE-SU-2017:0798-1: An update that fixes 13 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1021616,1021627,1024232,1024244,1024992,1024993,1025505,1025507,1026723,1026725,1026922,1027108,1027376
CVE References: CVE-2016-10163,CVE-2016-10214,CVE-2017-5580,CVE-2017-5937,CVE-2017-5956,CVE-2017-5957,CVE-2017-5993,CVE-2017-5994,CVE-2017-6209,CVE-2017-6210,CVE-2017-6317,CVE-2017-6355,CVE-2017-6386
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP2 (src):    virglrenderer-0.5.0-11.1
SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src):    virglrenderer-0.5.0-11.1
SUSE Linux Enterprise Server 12-SP2 (src):    virglrenderer-0.5.0-11.1
SUSE Linux Enterprise Desktop 12-SP2 (src):    virglrenderer-0.5.0-11.1
Comment 7 Swamp Workflow Management 2017-03-31 16:15:43 UTC
openSUSE-SU-2017:0902-1: An update that fixes 13 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1021616,1021627,1024232,1024244,1024992,1024993,1025505,1025507,1026723,1026725,1026922,1027108,1027376
CVE References: CVE-2016-10163,CVE-2016-10214,CVE-2017-5580,CVE-2017-5937,CVE-2017-5956,CVE-2017-5957,CVE-2017-5993,CVE-2017-5994,CVE-2017-6209,CVE-2017-6210,CVE-2017-6317,CVE-2017-6355,CVE-2017-6386
Sources used:
openSUSE Leap 42.2 (src):    virglrenderer-0.5.0-3.3.1
Comment 8 Marcus Meissner 2018-02-16 07:33:24 UTC
released