Fix CVE-2017-6386 (memory leak introduced by fix for CVE-2017-5994). https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5994 Patch copied from upstream source repository: https://cgit.freedesktop.org/virglrenderer/commit/?id=737c3350850ca4dbc5633b3bdb4118176ce59920 From 737c3350850ca4dbc5633b3bdb4118176ce59920 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 28 Feb 2017 14:52:09 +1000 Subject: renderer: fix memory leak in vertex elements state create Reported-by: Li Qiang Free the vertex array in error path. This was introduced by this commit: renderer: fix heap overflow in vertex elements state create. I rewrote the code to not require the allocation in the first place if we have an error, seems nicer. Signed-off-by: Dave Airlie diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 1bca7ad..e5d9f5c 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -1648,18 +1648,19 @@ int vrend_create_vertex_elements_state(struct vrend_context *ctx, unsigned num_elements, const struct pipe_vertex_element *elements) { - struct vrend_vertex_element_array *v = CALLOC_STRUCT(vrend_vertex_element_array); + struct vrend_vertex_element_array *v; const struct util_format_description *desc; GLenum type; int i; uint32_t ret_handle; - if (!v) - return ENOMEM; - if (num_elements > PIPE_MAX_ATTRIBS) return EINVAL; + v = CALLOC_STRUCT(vrend_vertex_element_array); + if (!v) + return ENOMEM; + v->count = num_elements; for (i = 0; i < num_elements; i++) { memcpy(&v->elements[i].base, &elements[i], sizeof(struct pipe_vertex_element)); -- cgit v0.10.2 on>
AgeCommit message (Expand)Author
2021-03-23Add powerpc64le-linux as a supported Guix architecture....Chris Marusich
2021-03-17maint: Check whether Guile-zlib is recent enough....Ludovic Courtès
2021-02-04build: Add '--with-channel-commit' and related configure flags....Ludovic Courtès
2020-12-11maint: Avoid macros obsolete in Autoconf 2.70....Ludovic Courtès
2020-10-22git: Require Guile-Git 0.3.0 or later....Ludovic Courtès
2020-09-08Remove (guix json) and require Guile-JSON 4.3.0+....Ludovic Courtès
2020-08-29build: Remove check for Guile 2.2.1 bug....Ludovic Courtès
2020-08-24Use "guile-zlib" and "guile-lzlib" instead of (guix config)....Mathieu Othacehe
2020-07-20ssh: Speed up RPCs by using #:nodelay....Lars-Dominik Braun
2020-05-28doc: Remove explicit support for mips64el-linux....Efraim Flashner
2020-05-28maint: Check whether Guile-Gcrypt is recent enough....Ludovic Courtès
2020-02-22build: Depend on guile-ssh 0.12.0...Lars-Dominik Braun
2019-08-17build: 'GUIX_CHECK_GUILE_JSON' really checks for Guile-JSON 3.x....Ludovic Courtès
2019-07-25maint: Switch to Guile-JSON 3.x....Ludovic Courtès