Commit 951cdb3
[Backport] Security bug 1201340
Manual cherry-pick of patch originally reviewed on
https://chromium-review.googlesource.com/c/v8/v8/+/2875210:
Merged: [liftoff] Fix >=2GB memory accesses on 32-bit
We were inconsistent in handling offsets >= 2GB on 32-bit systems. The
code was still relying on this being detected as statically out of
bounds, but with the increase of {kV8MaxWasmMemoryPages} to support 4GB
memories, this is not the case any more.
This CL fixes this by again detecting such situations as statically OOB.
We do not expect to be able to allocate memories of size >2GB on such
systems. If this assumptions turns out to be wrong, we will erroneously
trap. If that happens, we will have to explicitly disallow memories of
such size on 32-bit systems.
Tbr: [email protected]
(cherry picked from commit 7ad5b961553d7d9bc30da1bb839726be2b92bb51)
Bug: v8:7881, chromium:1201340
Change-Id: I8a91dd067a1c63a6d1caacb874a27b44b0983774
No-Try: true
No-Presubmit: true
No-Tree-Checks: true
Reviewed-by: Clemens Backes <[email protected]>
Commit-Queue: Clemens Backes <[email protected]>
Cr-Commit-Position: refs/branch-heads/9.0@{#51}
Cr-Branched-From: bd0108b4c88e0d6f2350cb79b5f363fbd02f3eb7-refs/heads/9.0.257@{#1}
Cr-Branched-From: 349bcc6a075411f1a7ce2d866c3dfeefc2efa39d-refs/heads/master@{#73001}
Reviewed-by: Allan Sandfeld Jensen <[email protected]>1 parent 9827f0c commit 951cdb3
File tree
4 files changed
+12
-27
lines changed- chromium/v8/src/wasm
- baseline
- arm
- ia32
4 files changed
+12
-27
lines changedLines changed: 4 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
| 692 | + | |
| 693 | + | |
699 | 694 | | |
700 | 695 | | |
701 | 696 | | |
| |||
705 | 700 | | |
706 | 701 | | |
707 | 702 | | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
| 703 | + | |
| 704 | + | |
715 | 705 | | |
716 | 706 | | |
717 | 707 | | |
| |||
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
| 327 | + | |
| 328 | + | |
334 | 329 | | |
335 | 330 | | |
336 | 331 | | |
| |||
406 | 401 | | |
407 | 402 | | |
408 | 403 | | |
| 404 | + | |
409 | 405 | | |
410 | 406 | | |
411 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2100 | 2100 | | |
2101 | 2101 | | |
2102 | 2102 | | |
2103 | | - | |
2104 | | - | |
2105 | 2103 | | |
2106 | | - | |
2107 | 2104 | | |
2108 | 2105 | | |
2109 | 2106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
0 commit comments