xserver_xorg-server: add upstream security fixes for CVE-2017-10971 / 10972
PATCH 1/1 xserver_xorg-server: add upstream security fixes for CVE-2017-10971 / 10972
Add upstream patches fixing the following security issues:
CVE-2017-10971:
The endianess handling for X Events assumed a fixed size of X Event structures and had a specific 32 byte stack buffer for that.
However "GenericEvents" can have any size, so if the events were sent in the wrong endianess, this stack buffer could be overflowed easily.
So authenticated X users could overflow the stack in the X Server and with the X server usually running as root gaining root prileveges.
CVE-2017-10972:
An information leak out of the X server due to an uninitialized stack area when swapping event endianess.
For more details, see the advisory:
http://www.openwall.com/lists/oss-security/2017/07/06/6
--- ...target-buffer-in-SProcXSendExtensionEvent.patch | 39 ++++++++++++ ...isallow-GenericEvent-in-SendEvent-request.patch | 71 ++++++++++++++++++++++ ...ify-all-events-in-ProcXSendExtensionEvent.patch | 50 +++++++++++++++ .../0005-Xi-Do-not-try-to-swap-GenericEvent.patch | 45 ++++++++++++++ ...target-buffer-in-SProcXSendExtensionEvent.patch | 39 ++++++++++++ ...isallow-GenericEvent-in-SendEvent-request.patch | 71 ++++++++++++++++++++++ ...ify-all-events-in-ProcXSendExtensionEvent.patch | 50 +++++++++++++++ .../0005-Xi-Do-not-try-to-swap-GenericEvent.patch | 45 ++++++++++++++ ...target-buffer-in-SProcXSendExtensionEvent.patch | 39 ++++++++++++ ...isallow-GenericEvent-in-SendEvent-request.patch | 71 ++++++++++++++++++++++ ...ify-all-events-in-ProcXSendExtensionEvent.patch | 50 +++++++++++++++ .../0007-Xi-Do-not-try-to-swap-GenericEvent.patch | 45 ++++++++++++++ 12 files changed, 615 insertions(+) create mode 100644 package/x11r7/xserver_xorg-server/1.14.7/0002-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch create mode 100644 package/x11r7/xserver_xorg-server/1.14.7/0003-dix-Disallow-GenericEvent-in-SendEvent-request.patch create mode 100644 package/x11r7/xserver_xorg-server/1.14.7/0004-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch create mode 100644 package/x11r7/xserver_xorg-server/1.14.7/0005-Xi-Do-not-try-to-swap-GenericEvent.patch create mode 100644 package/x11r7/xserver_xorg-server/1.17.4/0002-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch create mode 100644 package/x11r7/xserver_xorg-server/1.17.4/0003-dix-Disallow-GenericEvent-in-SendEvent-request.patch create mode 100644 package/x11r7/xserver_xorg-server/1.17.4/0004-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch create mode 100644 package/x11r7/xserver_xorg-server/1.17.4/0005-Xi-Do-not-try-to-swap-GenericEvent.patch create mode 100644 package/x11r7/xserver_xorg-server/1.19.3/0004-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch create mode 100644 package/x11r7/xserver_xorg-server/1.19.3/0005-dix-Disallow-GenericEvent-in-SendEvent-request.patch create mode 100644 package/x11r7/xserver_xorg-server/1.19.3/0006-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch create mode 100644 package/x11r7/xserver_xorg-server/1.19.3/0007-Xi-Do-not-try-to-swap-GenericEvent.patch
package/x11r7/xserver_xorg-server/1.14.7/0002-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 05442de962d3dc624f79fc1a00eca3ffc5489ced Mon Sep 17 00:00:00 2001 +From: Michal Srb <[email protected]> +Date: Wed, 24 May 2017 15:54:39 +0300 +Subject: [PATCH] Xi: Zero target buffer in SProcXSendExtensionEvent. + +Make sure that the xEvent eventT is initialized with zeros, the same way as +in SProcSendEvent. + +Some event swapping functions do not overwrite all 32 bytes of xEvent +structure, for example XSecurityAuthorizationRevoked. Two cooperating +clients, one swapped and the other not, can send +XSecurityAuthorizationRevoked event to each other to retrieve old stack data +from X server. This can be potentialy misused to go around ASLR or +stack-protector. + +Signed-off-by: Michal Srb <[email protected]> +Reviewed-by: Peter Hutterer <[email protected]> +Signed-off-by: Peter Hutterer <[email protected]> +Signed-off-by: Peter Korsgaard <[email protected]> +--- + Xi/sendexev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Xi/sendexev.c b/Xi/sendexev.c +index 11d82029f..1cf118ab6 100644 +--- a/Xi/sendexev.c ++++ b/Xi/sendexev.c +@@ -78,7 +78,7 @@ SProcXSendExtensionEvent(ClientPtr client) + { + CARD32 *p; + int i; +- xEvent eventT; ++ xEvent eventT = { .u.u.type = 0 }; + xEvent *eventP; + EventSwapPtr proc; + +-- +2.11.0 +
package/x11r7/xserver_xorg-server/1.14.7/0003-dix-Disallow-GenericEvent-in-SendEvent-request.patch new file +71 -0
71 lines not on this page · raw message
package/x11r7/xserver_xorg-server/1.14.7/0004-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch new file +50 -0
50 lines not on this page · raw message
package/x11r7/xserver_xorg-server/1.14.7/0005-Xi-Do-not-try-to-swap-GenericEvent.patch new file +45 -0
45 lines not on this page · raw message
package/x11r7/xserver_xorg-server/1.17.4/0002-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 05442de962d3dc624f79fc1a00eca3ffc5489ced Mon Sep 17 00:00:00 2001 +From: Michal Srb <[email protected]> +Date: Wed, 24 May 2017 15:54:39 +0300 +Subject: [PATCH] Xi: Zero target buffer in SProcXSendExtensionEvent. + +Make sure that the xEvent eventT is initialized with zeros, the same way as +in SProcSendEvent. + +Some event swapping functions do not overwrite all 32 bytes of xEvent +structure, for example XSecurityAuthorizationRevoked. Two cooperating +clients, one swapped and the other not, can send +XSecurityAuthorizationRevoked event to each other to retrieve old stack data +from X server. This can be potentialy misused to go around ASLR or +stack-protector. + +Signed-off-by: Michal Srb <[email protected]> +Reviewed-by: Peter Hutterer <[email protected]> +Signed-off-by: Peter Hutterer <[email protected]> +Signed-off-by: Peter Korsgaard <[email protected]> +--- + Xi/sendexev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Xi/sendexev.c b/Xi/sendexev.c +index 11d82029f..1cf118ab6 100644 +--- a/Xi/sendexev.c ++++ b/Xi/sendexev.c +@@ -78,7 +78,7 @@ SProcXSendExtensionEvent(ClientPtr client) + { + CARD32 *p; + int i; +- xEvent eventT; ++ xEvent eventT = { .u.u.type = 0 }; + xEvent *eventP; + EventSwapPtr proc; + +-- +2.11.0 +
package/x11r7/xserver_xorg-server/1.17.4/0003-dix-Disallow-GenericEvent-in-SendEvent-request.patch new file +71 -0
71 lines not on this page · raw message
package/x11r7/xserver_xorg-server/1.17.4/0004-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch new file +50 -0
50 lines not on this page · raw message
package/x11r7/xserver_xorg-server/1.17.4/0005-Xi-Do-not-try-to-swap-GenericEvent.patch new file +45 -0
45 lines not on this page · raw message
package/x11r7/xserver_xorg-server/1.19.3/0004-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 05442de962d3dc624f79fc1a00eca3ffc5489ced Mon Sep 17 00:00:00 2001 +From: Michal Srb <[email protected]> +Date: Wed, 24 May 2017 15:54:39 +0300 +Subject: [PATCH] Xi: Zero target buffer in SProcXSendExtensionEvent. + +Make sure that the xEvent eventT is initialized with zeros, the same way as +in SProcSendEvent. + +Some event swapping functions do not overwrite all 32 bytes of xEvent +structure, for example XSecurityAuthorizationRevoked. Two cooperating +clients, one swapped and the other not, can send +XSecurityAuthorizationRevoked event to each other to retrieve old stack data +from X server. This can be potentialy misused to go around ASLR or +stack-protector. + +Signed-off-by: Michal Srb <[email protected]> +Reviewed-by: Peter Hutterer <[email protected]> +Signed-off-by: Peter Hutterer <[email protected]> +Signed-off-by: Peter Korsgaard <[email protected]> +--- + Xi/sendexev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Xi/sendexev.c b/Xi/sendexev.c +index 11d82029f..1cf118ab6 100644 +--- a/Xi/sendexev.c ++++ b/Xi/sendexev.c +@@ -78,7 +78,7 @@ SProcXSendExtensionEvent(ClientPtr client) + { + CARD32 *p; + int i; +- xEvent eventT; ++ xEvent eventT = { .u.u.type = 0 }; + xEvent *eventP; + EventSwapPtr proc; + +-- +2.11.0 +
package/x11r7/xserver_xorg-server/1.19.3/0005-dix-Disallow-GenericEvent-in-SendEvent-request.patch new file +71 -0
71 lines not on this page · raw message
package/x11r7/xserver_xorg-server/1.19.3/0006-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch new file +50 -0
50 lines not on this page · raw message
package/x11r7/xserver_xorg-server/1.19.3/0007-Xi-Do-not-try-to-swap-GenericEvent.patch new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 1/1 xserver_xorg-server: add upstream security fixes for CVE-2017-10971 / 10972
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Korsgaard <[email protected]> writes:
Add upstream patches fixing the following security issues:
CVE-2017-10971:
The endianess handling for X Events assumed a fixed size of X Event structures and had a specific 32 byte stack buffer for that.However "GenericEvents" can have any size, so if the events were sent in the wrong endianess, this stack buffer could be overflowed easily.
So authenticated X users could overflow the stack in the X Server and with the X server usually running as root gaining root prileveges.
CVE-2017-10972:
An information leak out of the X server due to an uninitialized stack area when swapping event endianess.
Quoted 5 lines
For more details, see the advisory:
http://www.openwall.com/lists/oss-security/2017/07/06/6
Signed-off-by Peter Korsgaard <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 xserver_xorg-server: add upstream security fixes for CVE-2017-10971 / 10972
In reply to Peter KorsgaardQuoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Korsgaard <[email protected]> writes:
Add upstream patches fixing the following security issues:
CVE-2017-10971:
The endianess handling for X Events assumed a fixed size of X Event structures and had a specific 32 byte stack buffer for that.However "GenericEvents" can have any size, so if the events were sent in the wrong endianess, this stack buffer could be overflowed easily.
So authenticated X users could overflow the stack in the X Server and with the X server usually running as root gaining root prileveges.
CVE-2017-10972:
An information leak out of the X server due to an uninitialized stack area when swapping event endianess.
Quoted 5 lines
For more details, see the advisory:
http://www.openwall.com/lists/oss-security/2017/07/06/6
Signed-off-by Peter Korsgaard <[email protected]>
Committed to 2017.02.x and 2017.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard