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
glxcontext.h GLX: fix context render type queries 2020-11-26 20:07:55 +00:00
glxdrawable.h
glxdri2.c
glxdricommon.c glx: fixup symbol name for get_extensions function 2020-03-23 20:50:30 +00:00
glxdricommon.h
glxdriswrast.c
glxext.c
glxext.h
glxscreens.c
glxscreens.h
glxserver.h
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
vndcmds.c glx: Check for byte-swapping in SetReplyHeader 2021-05-30 13:49:37 -07:00
vndext.c
vndserver.h
vndservermapping.c
vndservervendor.c
vndservervendor.h
xfont.c