summary refs log tree commit diff stats
path: root/docs/qemu-option-trace.rst.inc
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2023-03-16 16:49:26 -0700
committerPeter Maydell <peter.maydell@linaro.org>2023-03-21 13:19:07 +0000
commit3202b2628b470a2e44f3cc7b9582c724fe654bd1 (patch)
tree9edd6864dcd2635c25606a2d92f2476a63b404d7 /docs/qemu-option-trace.rst.inc
parentd399d6b179f07b9904de0e76d06c77a3d0a66b51 (diff)
downloadfocaccia-qemu-3202b2628b470a2e44f3cc7b9582c724fe654bd1.tar.gz
focaccia-qemu-3202b2628b470a2e44f3cc7b9582c724fe654bd1.zip
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 'docs/qemu-option-trace.rst.inc')
0 files changed, 0 insertions, 0 deletions