Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp510225ybl; Wed, 14 Aug 2019 01:24:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwISuNjgIvUFGxjMLSpBHGLOnGJ2Yjxp9L5nd32k8Vfw7gCG0ycLTJ+4P1eMVH4k6Ol6Kk5 X-Received: by 2002:a63:c009:: with SMTP id h9mr37884000pgg.166.1565771083438; Wed, 14 Aug 2019 01:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565771083; cv=none; d=google.com; s=arc-20160816; b=ZPjtdIYQ97J7Q54j+OTKC08losudPalNZzLpRIz7cQqkUUWvGCw6RfHTBtsmOy8+To gVQSxCZdnsW0VaTqQmqp88ZFfo1f8S3SkBdIqhkM6OKE73umGEqpiRlQHQR0HPGW1aLy T3F/HwXr3db7yZ004IQpjuH5yIGvWhgY2qyjFrf0YmHtVmXW9BF95/yP5zJX4lddhT+g HyvqBvbsNsqXUjudA1+Zq6+YATUcL+NpNHyqTy06haiPq5t8dFkdCBWP0vf1QolohQLF 829vgl1h+14Y+i6F5M6PLTkQu2rxW0QG6kBsyJuYau9x4K4Ar/IXOmqeJEKvFMznQ+KW etPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=N/tfewUGJW+kdXDG12argqkV3YvDI3GgDqLRVNx7AVk=; b=dKKorkfJl7TvCEwWdDo/Sk1Ax5jQbwwHADTEggatshE9i3+62FJ4HTjMsunOWrf2HR kWCoAM2ykCWTi4HstA0z4XdwC3vM3LvqGIEuFd0kFIfbaPdhoypFjZ8v7IZudXu3bfNA 2Yre/vIc5SkrQLjZj5sPMr8tygVZ6i94YO98GBr4Qc/J59dvnpIdPEVnIPbSysplRWra a2XJnzJ9bUi7eEhfFRo4yLS8Umz5wXyOh+WwN68YNwEBwqkyfs7DENdek8/0RihOzyNT E/kH8OsQpk754NRjo95lDbT4+XkayHYt4LR+UTTndL77kGoCSkdBqG6+ZT75qglBraoF TLOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y16si69808948pgj.169.2019.08.14.01.24.27; Wed, 14 Aug 2019 01:24:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727505AbfHNIVE (ORCPT + 99 others); Wed, 14 Aug 2019 04:21:04 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:47831 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbfHNIVE (ORCPT ); Wed, 14 Aug 2019 04:21:04 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 1CD148097D; Wed, 14 Aug 2019 10:20:49 +0200 (CEST) Date: Wed, 14 Aug 2019 10:21:01 +0200 From: Pavel Machek To: Yoshihiro Shimoda Cc: kishon@ti.com, pavel@denx.de, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role" Message-ID: <20190814082101.GA22422@amd> References: <1564563689-25863-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: <1564563689-25863-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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(). >=20 > Reported-by: Pavel Machek > Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap") > Cc: # v4.10+ > Signed-off-by: Yoshihiro Shimoda Acked-by: Pavel Machek --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl1TxGwACgkQMOfwapXb+vLE1gCgqglIGMRA+M9T0O8eyasQGzbO FRYAnijM5OY3RrH7HXlpsEtSTWj8gSs5 =FEge -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--