summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2017-10-21 23:47:52 +0200
committerMatthieu Herrb <matthieu@herrb.eu>2017-11-25 11:52:34 +0100
commit4794b5dd34688158fb51a2943032569d3780c4b8 (patch)
tree2797e870aa9b0d2fb29efc921fdcfa8c6086fcdd /Makefile.am
parent75b10c972d15c036a692ef4590a81a6c54d384f6 (diff)
Fix heap overflows when parsing malicious files. (CVE-2017-16612)
It is possible to trigger heap overflows due to an integer overflow while parsing images and a signedness issue while parsing comments. The integer overflow occurs because the chosen limit 0x10000 for dimensions is too large for 32 bit systems, because each pixel takes 4 bytes. Properly chosen values allow an overflow which in turn will lead to less allocated memory than needed for subsequent reads. The signedness bug is triggered by reading the length of a comment as unsigned int, but casting it to int when calling the function XcursorCommentCreate. Turning length into a negative value allows the check against XCURSOR_COMMENT_MAX_LEN to pass, and the following addition of sizeof (XcursorComment) + 1 makes it possible to allocate less memory than needed for subsequent reads. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Diffstat (limited to 'Makefile.am')
0 files changed, 0 insertions, 0 deletions