Commit 6b3bed1
authored
Fix stack overflow in CVE-2023-31922 (#157)
isArray and proxy isArray can call each other indefinitely in a mutually
recursive loop.
Add a stack overflow check in the js_proxy_isArray function before calling
`JS_isArray(ctx, s->target)`.
Original issue: bellard/quickjs#178
CVE: https://nvd.nist.gov/vuln/detail/CVE-2023-319221 parent bf1faca commit 6b3bed1
2 files changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43612 | 43612 | | |
43613 | 43613 | | |
43614 | 43614 | | |
| 43615 | + | |
| 43616 | + | |
| 43617 | + | |
| 43618 | + | |
| 43619 | + | |
| 43620 | + | |
43615 | 43621 | | |
43616 | 43622 | | |
43617 | 43623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
710 | 729 | | |
711 | 730 | | |
712 | 731 | | |
| |||
724 | 743 | | |
725 | 744 | | |
726 | 745 | | |
| 746 | + | |
0 commit comments