Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix VTableCallHolder writeable mapping size with W^X (#70093)
The size of this holder is dynamic, but when we are creating the writeable mapping of this holder to initialize its code, we don't take that into account. So in case the holder is located at the end of a memory page and crosses its boundary, the writeable mapping covers only the beginning of the holder and so we either crash during the initialization if the following memory page is not mapped or read only, or we corrupt a completely unrelated memory page in case it is mapped and writeable. The fix is to use the real size of the holder instead of sizeof(...).
- Loading branch information