From: Manivannan Sadhasivam <mani@kernel.org>
To: Selvarasu Ganesan <selvarasu.g@samsung.com>
Cc: vkoul@kernel.org, neil.armstrong@linaro.org, mani@kernel.org,
krzk@kernel.org, peter.griffin@linaro.org,
alim.akhtar@samsung.com, pritam.sutar@samsung.com,
andre.draszik@linaro.org, kernel@lvkasz.us,
pengpeng@iscas.ac.cn, kishon@kernel.org,
linux-phy@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
jh0801.jung@samsung.com, h10.kim@samsung.com,
dh10.jung@samsung.com, akash.m5@samsung.com,
hongpooh.kim@samsung.com, eomji.oh@samsung.com,
shijie.cai@samsung.com, muhammed.ali@samsung.com,
thiagu.r@samsung.com, stable@vger.kernel.org
Subject: Re: [PATCH v3] phy: exynos5-usbdrd: Use dynamic phy_cfg size to prevent OOB access
Date: Sun, 01 Nov 2026 16:12:49 +0530 [thread overview]
Message-ID: <179352976902.2955.854677236716853573.b4-reply@b4> (raw)
In-Reply-To: <20261020063559.3530901-1-selvarasu.g@samsung.com>
On 2026-10-20 12:05 +0530, Selvarasu Ganesan wrote:
> The probe loop currently iterates using EXYNOS5_DRDPHYS_NUM (2),
> creating both UTMI and PIPE3 PHY instances regardless of the SoC
> capability. Several SoCs (Exynos2200, Exynos7870, Exynos850, Exynos990,
> and ExynosAutoV920) provide phy_cfg arrays containing only a single
> element.
>
> On these SoCs, when the loop reaches index 1, the driver reads past the
> end of the rodata array, populating the second PHY instance with garbage
> data. Since the configuration structure contains critical function
> pointers (phy_isol, phy_init, set_refclk), any subsequent access to this
> PHY instance via exynos5_usbdrd_phy_xlate could result in a kernel oops.
>
> Fix this by adding 'n_phy_cfg' to struct exynos5_usbdrd_phy_drvdata to
> store the actual size of the phy_cfg array for each SoC. Update the
> probe loop and the xlate function to bound their access against this
> value instead of the hardcoded EXYNOS5_DRDPHYS_NUM.
>
> Fixes: 59025887fb08 ("phy: Add new Exynos5 USB 3.0 PHY driver")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Selvarasu Ganesan <selvarasu.g@samsung.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
- Mani
next prev parent reply other threads:[~2026-11-01 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261020063617epcas5p4ba00854fcd38bf211c573629ee062621@epcas5p4.samsung.com>
2026-10-20 6:35 ` Selvarasu Ganesan
2026-11-01 10:42 ` Manivannan Sadhasivam [this message]
2026-11-12 11:26 ` Vinod Koul
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=179352976902.2955.854677236716853573.b4-reply@b4 \
--to=mani@kernel.org \
--cc=akash.m5@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=dh10.jung@samsung.com \
--cc=eomji.oh@samsung.com \
--cc=h10.kim@samsung.com \
--cc=hongpooh.kim@samsung.com \
--cc=jh0801.jung@samsung.com \
--cc=kernel@lvkasz.us \
--cc=kishon@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=muhammed.ali@samsung.com \
--cc=neil.armstrong@linaro.org \
--cc=pengpeng@iscas.ac.cn \
--cc=peter.griffin@linaro.org \
--cc=pritam.sutar@samsung.com \
--cc=selvarasu.g@samsung.com \
--cc=shijie.cai@samsung.com \
--cc=stable@vger.kernel.org \
--cc=thiagu.r@samsung.com \
--cc=vkoul@kernel.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
all inboxes | Powered by JetHome®