Re: [PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read()

2023-03-17 Thread Philippe Mathieu-Daudé
On 17/3/23 00:49, Guenter Roeck wrote: The i.MX USB Phy driver does not check register ranges, resulting in out of bounds accesses if an attempt is made to access non-existing PHY registers. Add range check and conditionally report bad accesses to fix the problem. While at it, also conditionally

Re: [PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read()

2023-03-17 Thread Peter Maydell
On Thu, 16 Mar 2023 at 23:49, Guenter Roeck wrote: > > The i.MX USB Phy driver does not check register ranges, resulting in out of > bounds accesses if an attempt is made to access non-existing PHY registers. > Add range check and conditionally report bad accesses to fix the problem. > > While at

Re: [PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read()

2023-03-17 Thread Qiang Liu
On 3/17/23 12:49 AM, Guenter Roeck wrote: The i.MX USB Phy driver does not check register ranges, resulting in out of bounds accesses if an attempt is made to access non-existing PHY registers. Add range check and conditionally report bad accesses to fix the problem. While at it, also conditiona

[PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read()

2023-03-16 Thread Guenter Roeck
The i.MX USB Phy driver does not check register ranges, resulting in out of bounds accesses if an attempt is made to access non-existing PHY registers. Add range check and conditionally report bad accesses to fix the problem. While at it, also conditionally log attempted writes to non-existing or