On Wed 2019-07-31 18:01:29, Yoshihiro Shimoda wrote:
Since the role_store() uses strncmp(), it's possible to refer out-of-memory if the sysfs data size is smaller than strlen("host"). This patch fixes it by using sysfs_streq() instead of strncmp().
Reported-by: Pavel Machek pavel@denx.de Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda.uh@renesas.com
Acked-by: Pavel Machek pavel@denx.de