diff options
author | Karl Tomlinson <xmail@karlt.net> | 2015-04-15 10:16:18 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-10 22:58:33 +0200 |
commit | 01865335b4a10e01441d7cc454bdcfbaa71aef51 (patch) | |
tree | 52a0a3658603cdc020b6f8dbed7260fa80b27590 /nx-X11/lib/X11/GetStCmap.c | |
parent | 670b8ef648e4bce8369fbf2dfbf4370e4e2d36be (diff) | |
download | nx-libs-01865335b4a10e01441d7cc454bdcfbaa71aef51.tar.gz nx-libs-01865335b4a10e01441d7cc454bdcfbaa71aef51.tar.bz2 nx-libs-01865335b4a10e01441d7cc454bdcfbaa71aef51.zip |
MakeBigReq: don't move the last word, already handled by Data32 (X.Org CVE-2013-7439).
MakeBigReq inserts a length field after the first 4 bytes of the request
(after req->length), pushing everything else back by 4 bytes.
The current memmove moves everything but the first 4 bytes back. If a
request aligns to the end of the buffer pointer when MakeBigReq is
invoked for that request, this runs over the buffer. Instead, we need to
memmove minus the first 4 bytes (which aren't moved), minus the last 4
bytes (so we still align to the previous tail).
The 4 bytes that fell out are already handled with Data32, which will
handle the buffermax correctly.
The case where req->length = 1 was already not functional.
Reported by Abhishek Arya <inferno@chromium.org> (against X.Org BTS).
https://bugzilla.mozilla.org/show_bug.cgi?id=803762
Reviewed-by: Jeff Muizelaar <jmuizelaar@mozilla.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Rebased-for-NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Re-applied after upgrade to libX11 1.3.4: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/GetStCmap.c')
0 files changed, 0 insertions, 0 deletions