Skip to content

Consider specify lower limit for conv2d/pool2d kernel sizes, dilations, strides #928

@philloooo

Description

@philloooo

During our testing with chromium implementation, we found more edge cases in complex ops like pool2d and conv2d, where when specifying some unreasonably large sizes of these parameters trigger integer overflows in some of the backends.

In reality, these parameters never have too large values.
If we limit them to smaller and realistic upper bounds that are reasonable for all use cases, it can reduce our attack surface and also make our fuzz testing much more efficient.

WDYT?

We should also go over other complex ops to see where we can harden the limits.

Initial thoughts on size limit:
kernel size: 1024
strides & dilations: 256

@fdwr @huningxin ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    security-trackerGroup bringing to attention of security, or tracked by the security Group but not needing response.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions