From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Guenter Roeck <linux@roeck-us.net>,
Peter Maydell <peter.maydell@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Jean-Christophe Dubois <jcd@tribudubois.net>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org,
Qiang Liu <cyruscyliu@gmail.com>
Subject: Re: [PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read()
Date: Fri, 17 Mar 2023 22:50:32 +0100 [thread overview]
Message-ID: <bb8827a3-78af-3c0f-1ae2-7278204c2b7e@linaro.org> (raw)
In-Reply-To: <20230316234926.208874-1-linux@roeck-us.net>
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 log attempted writes to non-existing or
> read-only registers.
>
> Reported-by: Qiang Liu <cyruscyliu@gmail.com>
> 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>
> ---
> hw/usb/imx-usb-phy.c | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
prev parent reply other threads:[~2023-03-17 21:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 23:49 [PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read() Guenter Roeck
2023-03-17 9:52 ` Qiang Liu
2023-03-17 13:46 ` Peter Maydell
2023-03-17 21:50 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb8827a3-78af-3c0f-1ae2-7278204c2b7e@linaro.org \
--to=philmd@linaro.org \
--cc=cyruscyliu@gmail.com \
--cc=jcd@tribudubois.net \
--cc=kraxel@redhat.com \
--cc=linux@roeck-us.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).