Commits on Source (9)
-
-
-
-
-
-
-
-
Peter Hutterer authored
The handling of appending/prepending properties was incorrect, with at least two bugs: the property length was set to the length of the new part only, i.e. appending or prepending N elements to a property with P existing elements always resulted in the property having N elements instead of N + P. Second, when pre-pending a value to a property, the offset for the old values was incorrect, leaving the new property with potentially uninitalized values and/or resulting in OOB memory writes. For example, prepending a 3 element value to a 5 element property would result in this 8 value array: [N, N, N, ?, ?, P, P, P ] P, P ^OOB write The XI2 code is a copy/paste of the RandR code, so the bug exists in both. CVE-2023-5367, ZDI-CAN-22153 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
PointerWindows[] keeps a reference to the last window our sprite entered - changes are usually handled by CheckMotion(). If we switch between screens via XWarpPointer our dev->spriteInfo->sprite->win is set to the new screen's root window. If there's another window at the cursor location CheckMotion() will trigger the right enter/leave events later. If there is not, it skips that process and we never trigger LeaveWindow() - PointerWindows[] for the device still refers to the previous window. If that window is destroyed we have a dangling reference that will eventually cause a use-after-free bug when checking the window hierarchy later. To trigger this, we require: - two protocol screens - XWarpPointer to the other screen's root window - XDestroyWindow before entering any other window This is a niche bug so we hack around it by making sure we reset the PointerWindows[] entry so we cannot have a dangling pointer. This doesn't handle Enter/Leave events correctly but the previous code didn't either. CVE-2023-5380, ZDI-CAN-21608 This vulnerability was discovered by: Sri working with Trend Micro Zero Day Initiative Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Adam Jackson <ajax@redhat.com>
Showing
- Xi/xiproperty.c 2 additions, 2 deletionsXi/xiproperty.c
- dix/enterleave.h 0 additions, 2 deletionsdix/enterleave.h
- hw/xfree86/common/xf86AutoConfig.c 3 additions, 0 deletionshw/xfree86/common/xf86AutoConfig.c
- hw/xfree86/common/xf86str.h 1 addition, 1 deletionhw/xfree86/common/xf86str.h
- hw/xfree86/os-support/bsd/bsd_init.c 2 additions, 2 deletionshw/xfree86/os-support/bsd/bsd_init.c
- hw/xfree86/os-support/bsd/ppc_video.c 4 additions, 0 deletionshw/xfree86/os-support/bsd/ppc_video.c
- hw/xfree86/os-support/meson.build 6 additions, 2 deletionshw/xfree86/os-support/meson.build
- include/eventstr.h 3 additions, 0 deletionsinclude/eventstr.h
- include/meson.build 1 addition, 1 deletioninclude/meson.build
- mi/mipointer.c 15 additions, 2 deletionsmi/mipointer.c
- randr/rrproperty.c 2 additions, 2 deletionsrandr/rrproperty.c