Failing assertion: inconsistency in rightmost processing in turf-jsts
when calling turf.buffer
#2469
Labels
turf-jsts
when calling turf.buffer
#2469
Meta
"@turf/turf": "^6.5.0"
Report
Hi
turf
team,In an ongoing effort to secure the JS/TS ecosystem, we integrated
turf
into Google's OSS-Fuzz project recently with our JS/TS fuzzer Jazzer.js.We're frequently running into a failed assertion that blocks progress and potential discovery of deeper rooted bugs. I have prepared a simple reproducer below that can cause
turf.buffer()
to crash.Reproducer
Note: that the hard-coded values for
radius
,options
, andpoint
were originally randomly generated during the fuzzing campaign but are for simplicity hard-coded in the proof of concept!Note: We're currently testing the latest available release on npmjs as building locally seems rather difficult to pull off, and we ran into different issues there while also stumbling across:
Actual behavior
The PoC crashes with the following trace:
Expected behavior
I assume the assertion should not trigger and cause the NodeJS runtime to crash.
Impact
As
turf
is a widely popular library with 300k weekly downloads on npmjs and is used by roughly 16k projects as a dependency, this simple PoC can be considered a DoS scenario affecting any other project that usesturf.buffer()
on (semi-)untrusted input.PS: I'm happy to answer any questions regarding fuzzing or the crashing program :)!
The text was updated successfully, but these errors were encountered: