xserver/glx
Olivier Fourdan aad61e8e03 glx: Fix use after free in MakeCurrent
The fix from commit c468d34c7 - "glx: Set ContextTag for all contexts"
is actually incomplete, it correctly sets the context tag for direct
contexts as well, but would fail to mark the context's currentClient.

As a result, when the context is destroyed, it would be freed
immediately rather than being just scheduled for deletion, even though
it is still current for some client. leading to a use-after-free.

Make sure to also set the context's currentClient for direct contexts as
well, not just indirect ones.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Fixes: c468d34c7 - "glx: Set ContextTag for all contexts"
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1186
Reviewed-by: Adam Jackson <ajax@redhat.com>
2021-06-21 08:39:38 +02:00
..
Makefile.am configure: Build hashtable for Xres and glvnd 2020-11-09 09:38:46 +00:00
clientinfo.c
createcontext.c GLX: fix context render type queries 2020-11-26 20:07:55 +00:00
extension_string.c glx: Implement GLX_EXT_get_drawable_type 2020-09-28 17:16:24 +00:00
extension_string.h glx: Implement GLX_EXT_get_drawable_type 2020-09-28 17:16:24 +00:00
glxbyteorder.h
glxcmds.c glx: Fix use after free in MakeCurrent 2021-06-21 08:39:38 +02:00
glxcmdsswap.c glx: Use vnd layer for dispatch (v4) 2018-02-14 17:04:44 -05:00
glxcontext.h GLX: fix context render type queries 2020-11-26 20:07:55 +00:00
glxdrawable.h
glxdri2.c Revert "dri2: Don't make reference to noClientException" 2020-01-28 13:26:41 -05:00
glxdricommon.c glx: fixup symbol name for get_extensions function 2020-03-23 20:50:30 +00:00
glxdricommon.h glx: remove unused systemTimeExtension 2017-09-08 11:23:35 -07:00
glxdriswrast.c dix: Call SourceValidate before GetImage 2019-10-30 16:26:01 +00:00
glxext.c glx: Require depth > 12 for GLX visuals 2018-04-24 14:36:04 -04:00
glxext.h glx: Fix GLX_CONTEXT_RELEASE_BEHAVIOR_ARB handling 2019-05-01 14:38:09 +00:00
glxscreens.c glx: Do not call into Composite if it is disabled. 2018-04-10 14:37:47 -04:00
glxscreens.h glx: Use vnd layer for dispatch (v4) 2018-02-14 17:04:44 -05:00
glxserver.h glx: Enable GLX_ARB_create_context_no_error (v2) 2018-02-26 10:18:58 -05:00
glxutil.h
indirect_dispatch.c
indirect_dispatch.h
indirect_dispatch_swap.c glx: Remove unused bswap_CARD64 2020-11-30 16:22:26 +00:00
indirect_program.c
indirect_reqsize.c
indirect_reqsize.h
indirect_size.h
indirect_size_get.c
indirect_size_get.h
indirect_table.c
indirect_table.h
indirect_texture_compression.c
indirect_util.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
indirect_util.h
meson.build meson: hide C API if Xorg is disabled (like autotools) 2021-03-11 00:22:36 +00:00
render2.c
render2swap.c
renderpix.c
renderpixswap.c
rensize.c
single2.c
single2swap.c
singlepix.c
singlepixswap.c
singlesize.c
singlesize.h
swap_interval.c
unpack.h
vnd_dispatch_stubs.c glx: Import glxvnd server module (v2) 2018-02-14 17:04:35 -05:00
vndcmds.c glx: Check for byte-swapping in SetReplyHeader 2021-05-30 13:49:37 -07:00
vndext.c GLX: Set GlxServerExports::{major,minor}Version 2019-05-21 10:50:42 -07:00
vndserver.h GLX: Add a function to change a clients vendor list. 2019-05-17 08:25:28 -07:00
vndservermapping.c GLX: Add a function to change a clients vendor list. 2019-05-17 08:25:28 -07:00
vndservervendor.c glx: Import glxvnd server module (v2) 2018-02-14 17:04:35 -05:00
vndservervendor.h glx: Import glxvnd server module (v2) 2018-02-14 17:04:35 -05:00
xfont.c glx: Use vnd layer for dispatch (v4) 2018-02-14 17:04:44 -05:00