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
clientinfo.c
createcontext.c
extension_string.c
extension_string.h
glxbyteorder.h
glxcmds.c glx: Fix use after free in MakeCurrent 2021-06-21 08:39:38 +02:00
glxcmdsswap.c
glxcontext.h
glxdrawable.h
glxdri2.c
glxdricommon.c
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
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