Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4a35ca3f1e129f50ea7eca5ca070432c7d29347a
      
https://github.com/WebKit/WebKit/commit/4a35ca3f1e129f50ea7eca5ca070432c7d29347a
  Author: Yusuke Suzuki <[email protected]>
  Date:   2022-12-20 (Tue, 20 Dec 2022)

  Changed paths:
    A JSTests/stress/resizable-array-buffer-last-index-of.js
    M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h

  Log Message:
  -----------
  [JSC] Fix ResizableArrayBuffer + lastIndexOf
https://bugs.webkit.org/show_bug.cgi?id=249676
rdar://103531814

Reviewed by Justin Michaud.

When evaluating the valueOf of the input, resizable arraybuffer can get 0 
length, thus,
we need to assume that length can become zero. This patch fixes this crash 
issue.
This is actually not a security issue because of how resizable arraybuffer is 
designed:
it reserves maximum size VM region and use mprotect to allow access based on 
the current
size. So, only possible outcome here is crash.

* JSTests/stress/resizable-array-buffer-last-index-of.js: Added.
(evil.valueOf):
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):

Canonical link: https://commits.webkit.org/258164@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to