Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

xcursor: fix CVE-2013-2003 #2908

Merged
merged 1 commit into from
May 2, 2021
Merged

xcursor: fix CVE-2013-2003 #2908

merged 1 commit into from
May 2, 2021

Conversation

stoeckmann
Copy link
Contributor

@stoeckmann stoeckmann commented May 2, 2021

The libXcursor fix for CVE-2013-2003 has never been imported into
wlroots, leaving it vulnerable to it.

Changing the argument type to an unsigned type is an effective merge of
Ilja Van Sprundel's commit in libXcursor.

Proof of Concept (compile with address sanitizer):

$ mkdir -p ~/.local/share/icons/poc/cursors
$ base64 -d <<< WGN1chAAAAAAAAAA/////w== >
~/.local/share/icons/poc/cursors/poc
$ echo "seat seat0 xcursor_theme poc 10" > ~/poc-config
$ sway -c ~/poc-config

The libXcursor fix for CVE-2013-2003 has never been imported into
wlroots, leaving it vulnerable to it.

Changing the argument type to an unsigned type is an effective merge of
Ilja Van Sprundel's commit in libXcursor.

Proof of Concept (compile with address sanitizer):

$ mkdir -p ~/.local/share/icons/poc/cursors
$ base64 -d <<< WGN1chAAAAAAAAAA/////w== > \
    ~/.local/share/icons/poc/cursors/poc
$ echo "seat seat0 xcursor_theme poc 10" > ~/poc-config
$ sway -c ~/poc-config
@stoeckmann stoeckmann changed the title xcursor: Fix CVE-2013-2003 xcursor: fix CVE-2013-2003 May 2, 2021
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@emersion emersion merged commit d0c1f0c into swaywm:master May 2, 2021
@zzag
Copy link

zzag commented May 2, 2021

Any chance of submitting this fix upstream (wayland)? This fixes the issue in wlroots, but basically any other application that uses wayland-cursor.h will remain vulnerable.

@stoeckmann
Copy link
Contributor Author

Thanks for pointing out @zzag. I didn't expect to find the code in wayland as well. I will prepare a pull request there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants