[Webkit-unassigned] [Bug 260069] New: OSAllocatorWin protect frees page when setting readable and writeable to false

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 11 06:39:36 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=260069

            Bug ID: 260069
           Summary: OSAllocatorWin protect frees page when setting
                    readable and writeable to false
           Product: WebKit
           Version: WebKit Local Build
          Hardware: PC
                OS: Windows 10
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit API
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ian.grunert at gmail.com

In OSAllocatorWin, if you call OSAllocator::protect with readable false and writeable false, it’ll free the page + decommit. To the caller, this looks like it does the right thing - attempting to access the freed page will throw an access violation. However freeing the page there’s a risk that we re-allocate that page.

For WasmMemory we want the pages to remain reserved in the virtual address space, so if someone tries to access memory in a “red zone” page it’ll throw an access violation. If that page is re-allocated, we could overflow WasmMemory and read / write that page.

OSAllocatorPOSIX always calls mprotect so does not have the same problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230811/89591ac6/attachment-0001.htm>


More information about the webkit-unassigned mailing list