On Wed, Jul 31, 2019 at 1:17 PM Yoshihiro Shimoda yoshihiro.shimoda.uh@renesas.com 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().
Fixes: cc995c9ec118 ("usb: gadget: udc: renesas_usb3: add support for usb role swap") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda.uh@renesas.com
Reviewed-by: Geert Uytterhoeven geert+renesas@glider.be
Gr{oetje,eeting}s,
Geert