Apple Webkit WholeText Integer Overflow Remote Code Execution Vulnerability

2010-11-23T00:00:00
ID ZDI-10-257
Type zdi
Reporter J23 (http://twitter.com/HansJ23)
Modified 2010-11-09T00:00:00

Description

This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of Apple Webkit. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.

The specific flaw exists within the wholeText method of the Text element. When calculating the total size of all the text containing it, the application will wrap a 32-bit integer. The application will use this in an allocation and then later use a different value for populating the buffer. This can lead to code execution under the context of the application.