Message ID | 20241025132720.2838693-3-koichiro.den@canonical.com |
---|---|
State | New |
Headers | show |
Series | CVE-2021-47101 | expand |
diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c index 12ce52600eaf..11554bce19b0 100644 --- a/drivers/net/usb/asix_common.c +++ b/drivers/net/usb/asix_common.c @@ -77,7 +77,7 @@ static int asix_check_host_enable(struct usbnet *dev, int in_pm) 0, 0, 1, &smsr, in_pm); if (ret == -ENODEV) break; - else if (ret < 0) + else if (ret < sizeof(smsr)) continue; else if (smsr & AX_HOST_EN) break;