diff options
author | Guenter Roeck <linux@roeck-us.net> | 2023-03-16 16:49:26 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-03-21 13:19:07 +0000 |
commit | 3202b2628b470a2e44f3cc7b9582c724fe654bd1 (patch) | |
tree | 9edd6864dcd2635c25606a2d92f2476a63b404d7 /version.rc | |
parent | d399d6b179f07b9904de0e76d06c77a3d0a66b51 (diff) | |
download | qemu-3202b2628b470a2e44f3cc7b9582c724fe654bd1.zip qemu-3202b2628b470a2e44f3cc7b9582c724fe654bd1.tar.gz qemu-3202b2628b470a2e44f3cc7b9582c724fe654bd1.tar.bz2 |
hw/usb/imx: Fix out of bounds access in imx_usbphy_read()
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
read-only registers.
Reported-by: Qiang Liu <cyruscyliu@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Qiang Liu <cyruscyliu@gmail.com>
Message-id: 20230316234926.208874-1-linux@roeck-us.net
Link: https://gitlab.com/qemu-project/qemu/-/issues/1408
Fixes: 0701a5efa015 ("hw/usb: Add basic i.MX USB Phy support")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'version.rc')
0 files changed, 0 insertions, 0 deletions