diff options
author | Emanuele Torre <torreemanuele6@gmail.com> | 2023-12-13 20:17:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 20:17:17 +0100 |
commit | c9a51565214eece8f1053089739aea73145bfd6b (patch) | |
tree | 41897506f258105a10ca9bcdb965cd925b7446b6 /tests/shtest | |
parent | c5fd64ba975ee35df17bb0c335efb00bffce4d91 (diff) |
Merge pull request from GHSA-7hmr-442f-qc8j
The unit allocated for decNumberCompare was accidentally removed by
commit 680baeffeb7983e7570b5e68db07fe47f94db8c7 (PR #2804)
This caused a stack overflow when comparing a nan with a payload of 1000
or more.
This bug was found by OSS-fuzz.
Ref: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64771
Fixes GHSA-7hmr-442f-qc8j
It also fixes 1e999999999 > 1e-1147483646 triggering UBSAN errors
Fixes #2968
Diffstat (limited to 'tests/shtest')
-rwxr-xr-x | tests/shtest | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/shtest b/tests/shtest index 469ea1d2..a426c79f 100755 --- a/tests/shtest +++ b/tests/shtest @@ -594,6 +594,11 @@ if ! x=$($JQ -n "1 # foo$cr + 2") || [ "$x" != 1 ]; then exit 1 fi +# CVE-2023-50268: No stack overflow comparing a nan with a large payload +$VALGRIND $Q $JQ '1 != .' <<\EOF >/dev/null +Nan4000 +EOF + # Allow passing the inline jq script before -- #2919 if ! r=$($JQ --args -rn -- '$ARGS.positional[0]' bar) || [ "$r" != bar ]; then echo "passing the inline script after -- didn't work" |