Commit cc6c84d
Add fix and tests for callback enumerate (#801)
This is a bug in PCRE2 10.45 and 10.46, not present in 10.44 and earlier.
The bug is that applications using pcre2_callout_enumerate() will crash badly on patterns with Unicode (ie non-ASCII) character classes. There is an out-of-bounds read of arbitrary length, including misinterpreting the bytes as offsets, allowing the read to jump forwards in memory to pretty much anywhere.
Applications which call pcre2_callout_enumerate should potentially downgrade to PCRE2 10.44 until we release an update of PCRE2 with the fix.
Since this function is (clearly!!) not used often by applications, I am not currently treating this as very high severity. There is no way for an attacker to make any application call this function, if it is not currently using it.
The root cause seems to be commit 24f9d8d (#540).
---------
Co-authored-by: Carlo Marcelo Arenas Belón <[email protected]>1 parent 4d3b779 commit cc6c84d
3 files changed
+24
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
294 | 293 | | |
295 | 294 | | |
296 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
562 | 561 | | |
563 | 562 | | |
564 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1258 | 1258 | | |
1259 | 1259 | | |
1260 | 1260 | | |
| 1261 | + | |
1261 | 1262 | | |
1262 | 1263 | | |
1263 | 1264 | | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
1264 | 1271 | | |
1265 | 1272 | | |
1266 | 1273 | | |
| |||
1586 | 1593 | | |
1587 | 1594 | | |
1588 | 1595 | | |
1589 | | - | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
1590 | 1602 | | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
1599 | | - | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
1600 | 1607 | | |
1601 | 1608 | | |
1602 | 1609 | | |
| |||
1763 | 1770 | | |
1764 | 1771 | | |
1765 | 1772 | | |
1766 | | - | |
1767 | | - | |
1768 | | - | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
1772 | | - | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
1773 | 1776 | | |
1774 | 1777 | | |
1775 | 1778 | | |
| |||
1979 | 1982 | | |
1980 | 1983 | | |
1981 | 1984 | | |
1982 | | - | |
| 1985 | + | |
1983 | 1986 | | |
1984 | 1987 | | |
1985 | 1988 | | |
| |||
2313 | 2316 | | |
2314 | 2317 | | |
2315 | 2318 | | |
2316 | | - | |
2317 | 2319 | | |
2318 | 2320 | | |
2319 | 2321 | | |
| |||
2523 | 2525 | | |
2524 | 2526 | | |
2525 | 2527 | | |
2526 | | - | |
2527 | 2528 | | |
2528 | 2529 | | |
2529 | 2530 | | |
| |||
2918 | 2919 | | |
2919 | 2920 | | |
2920 | 2921 | | |
2921 | | - | |
2922 | | - | |
2923 | | - | |
2924 | | - | |
2925 | | - | |
2926 | | - | |
2927 | | - | |
| 2922 | + | |
| 2923 | + | |
2928 | 2924 | | |
2929 | 2925 | | |
2930 | 2926 | | |
| |||
0 commit comments