Skip to content

NumberFormatException from SnakeYAML due to int overflow for corrupt YAML version #406

@cowtowncoder

Description

@cowtowncoder

(note: found by OSS-Fuzz -> https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56902)

Looks like SnakeYAML's YAML directive handling assumes (not unreasonably) that the YAML version should be (or consist of) regular ints. But if input is crafted to have number bigger than 32-bit int, there's a NumberFormatException.
Input OSS-Fuzz generated is:

%YAML 1.9224775801

Metadata

Metadata

Assignees

No one assigned

    Labels

    oss-fuzzIssue uncovered by oss-fuzz fuzzeryamlIssue related to YAML format backend

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions