-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: BSON
What problem are you facing?
Fuzzing deserialize using jazzer.js results in Uncaught RangeError exception at
What driver and relevant dependency versions are you using?
Tested against HEAD https://github.com/mongodb/js-bson/commit/77fac2a369c9009e88604a9dce0c688778826973
❯ git describe --tags
v6.2.0
Steps to reproduce?
// code placeholder > const BSON = require('bson'); undefined > const d = Buffer.from('0e00000001060000ff40000e0000', 'hex'); undefined > BSON.deserialize(d); Uncaught RangeError: Offset is outside the bounds of the DataView at DataView.getFloat64 (<anonymous>) at deserializeObject (/home/maxx/dev/security/oss-fuzz-projects/js-bson/lib/bson.cjs:2685:30) at internalDeserialize (/home/maxx/dev/security/oss-fuzz-projects/js-bson/lib/bson.cjs:2571:12) at Object.deserialize (/home/maxx/dev/security/oss-fuzz-projects/js-bson/lib/bson.cjs:4050:12)