Skip to content

x/image/tiff: high CPU usage when encoding zero-width image #78773

@neild

Description

@neild

tiff.Encode will iterate over every row in an image under some circumstances, even when the image width is 0. This can cause high CPU usage when encoding an image where the width*height is 0.

This was reported to us as a potential vulnerability. While we consider excessive CPU usage in decoding a malicious input to be in-scope for vulnerabilities, we do not consider malicious inputs to Encode to be within our threat model.

x/image/tiff should probably just return an error when encountering a zero-size image on either encode or decode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions