Description
A buffer overflow occurs in pytorch v2.7.0 when a PyTorch model consists of torch.nn.Conv2d, torch.nn.functional.hardshrink, and torch.Tensor.view-torch.mv() and is compiled by Inductor, leading to a Denial of Service (DoS).
References
github.com/pytorch/pytorch/issues/151523
github.com/pytorch/pytorch/pull/151887
gist.github.com/shaoyuyoung/0e7d2a586297ae9c8ed14d8706749efc