Commit 7d388ce
[Backport] CVE-2021-21233: Heap buffer overflow in ANGLE
Manual cherry-pick of patch orignally reviewed on
https://chromium-review.googlesource.com/c/angle/angle/+/2836786:
D3D11: Skip blits if there is no intersection of dest areas
Blit11 would clip the destination rectangle with the destination size
but ignore the result. gl::ClipRectangle returns false when the
rectangles do not intersect at all, indicating the blit can be skipped.
This could lead to an out-of-bounds write to the GPU memory for the
destination texture.
Mark ClipRectangle as nodiscard to prevent future issues.
Bug: chromium:1199402
Change-Id: I260e82d0917b8aa7e7887f2c9f7ed4b1a03ba785
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
Also fixes Chromium bug 1182937.
Change-Id: I6cb64f2e888c605b0c205bb296f1d5143612796e
Reviewed-by: Allan Sandfeld Jensen <[email protected]>1 parent 364aa54 commit 7d388ce
File tree
5 files changed
+18
-6
lines changed- chromium/third_party/angle/src/libANGLE
- renderer
- d3d/d3d11
- gl
- metal
- vulkan
5 files changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1117 | 1117 | | |
1118 | 1118 | | |
1119 | 1119 | | |
1120 | | - | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1121 | 1124 | | |
1122 | 1125 | | |
1123 | 1126 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1362 | 1362 | | |
1363 | 1363 | | |
1364 | 1364 | | |
1365 | | - | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
1366 | 1369 | | |
1367 | 1370 | | |
1368 | 1371 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2824 | 2824 | | |
2825 | 2825 | | |
2826 | 2826 | | |
2827 | | - | |
2828 | | - | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
2829 | 2832 | | |
2830 | 2833 | | |
2831 | 2834 | | |
| |||
0 commit comments