Commit 720e9a9
[Backport] CVE-2025-12432: Race in V8
Manual backport of patch originally reviewed on
https://chromium-review.googlesource.com/c/v8/v8/+/7077055:
Parser: Early return if Expect() fails
Expect()/ExpectNext() used to simply set the cursor to the end of the
input if the expectation failed.
The issue is that a failed expectation can trigger a GC due to
allocation of the Exception object.
To avoid surprises, Expect() and ExpectNext() now return a bool value
indicating if the expectation failed. Checking of this value is enforced
and all current usages are replaced by a Macro that returns early if an
exception was thrown.
Drive-by: Also force checking the return value of Check().
(cherry picked from commit 50eba5e6c269c71d6e0e758b84fafe8d5c37d210)
Fixed: 452296415
Change-Id: I513955f1ea0eb44cd0a59eb2aa57caee8f3082fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7048404
Reviewed-by: Igor Sheludko <[email protected]>
Commit-Queue: Patrick Thier <[email protected]>
Cr-Original-Commit-Position: refs/heads/main@{#103167}
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7077055
Commit-Queue: Gyuyoung Kim (xWF) <[email protected]>
Reviewed-by: Patrick Thier <[email protected]>
Cr-Commit-Position: refs/branch-heads/13.8@{#76}
Cr-Branched-From: 61ddd471ece346840bbebbb308dceb4b4ce31b28-refs/heads/13.8.258@{#1}
Cr-Branched-From: fdb5de2c741658e94944f2ec1218530e98601c23-refs/heads/main@{#100480}
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/689572
Reviewed-by: Michal Klocek <[email protected]>1 parent d92dcbb commit 720e9a9
2 files changed
+49
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
| |||
1493 | 1502 | | |
1494 | 1503 | | |
1495 | 1504 | | |
1496 | | - | |
| 1505 | + | |
1497 | 1506 | | |
1498 | 1507 | | |
1499 | | - | |
| 1508 | + | |
| 1509 | + | |
1500 | 1510 | | |
1501 | | - | |
1502 | | - | |
| 1511 | + | |
| 1512 | + | |
1503 | 1513 | | |
1504 | 1514 | | |
1505 | 1515 | | |
1506 | 1516 | | |
1507 | 1517 | | |
1508 | 1518 | | |
1509 | | - | |
| 1519 | + | |
| 1520 | + | |
1510 | 1521 | | |
1511 | 1522 | | |
1512 | 1523 | | |
| |||
1552 | 1563 | | |
1553 | 1564 | | |
1554 | 1565 | | |
1555 | | - | |
1556 | | - | |
| 1566 | + | |
| 1567 | + | |
1557 | 1568 | | |
1558 | 1569 | | |
1559 | 1570 | | |
| |||
1621 | 1632 | | |
1622 | 1633 | | |
1623 | 1634 | | |
1624 | | - | |
| 1635 | + | |
1625 | 1636 | | |
1626 | 1637 | | |
1627 | 1638 | | |
| |||
1731 | 1742 | | |
1732 | 1743 | | |
1733 | 1744 | | |
1734 | | - | |
1735 | | - | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
1736 | 1749 | | |
1737 | 1750 | | |
1738 | 1751 | | |
1739 | 1752 | | |
1740 | 1753 | | |
1741 | | - | |
1742 | | - | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
1743 | 1758 | | |
1744 | 1759 | | |
1745 | 1760 | | |
| |||
1835 | 1850 | | |
1836 | 1851 | | |
1837 | 1852 | | |
1838 | | - | |
| 1853 | + | |
1839 | 1854 | | |
1840 | | - | |
| 1855 | + | |
| 1856 | + | |
1841 | 1857 | | |
1842 | 1858 | | |
1843 | 1859 | | |
1844 | 1860 | | |
1845 | 1861 | | |
1846 | | - | |
| 1862 | + | |
1847 | 1863 | | |
1848 | | - | |
| 1864 | + | |
| 1865 | + | |
1849 | 1866 | | |
1850 | 1867 | | |
1851 | 1868 | | |
| |||
1865 | 1882 | | |
1866 | 1883 | | |
1867 | 1884 | | |
1868 | | - | |
1869 | | - | |
| 1885 | + | |
| 1886 | + | |
1870 | 1887 | | |
1871 | 1888 | | |
1872 | 1889 | | |
| |||
1916 | 1933 | | |
1917 | 1934 | | |
1918 | 1935 | | |
1919 | | - | |
1920 | | - | |
| 1936 | + | |
| 1937 | + | |
1921 | 1938 | | |
1922 | 1939 | | |
1923 | 1940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | | - | |
246 | | - | |
247 | | - | |
| 246 | + | |
248 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
249 | 251 | | |
250 | 252 | | |
251 | | - | |
252 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
253 | 256 | | |
254 | | - | |
| 257 | + | |
255 | 258 | | |
256 | 259 | | |
257 | | - | |
| 260 | + | |
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
| |||
0 commit comments