[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140311232005.GB23309@saruman.home>
Date: Tue, 11 Mar 2014 18:20:05 -0500
From: Felipe Balbi <balbi@...com>
To: Kees Cook <keescook@...omium.org>
CC: <linux-kernel@...r.kernel.org>, Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>
Subject: Re: [PATCH] usb: gadget: tcm_usb_gadget: stop format strings
On Tue, Mar 11, 2014 at 01:26:16PM -0700, Kees Cook wrote:
> This makes sure that the name coming out of configfs cannot be used
> accidentally as a format string.
>
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
> drivers/usb/gadget/tcm_usb_gadget.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c
> index 0f8aad78b54f..460c266b8e24 100644
> --- a/drivers/usb/gadget/tcm_usb_gadget.c
> +++ b/drivers/usb/gadget/tcm_usb_gadget.c
> @@ -1613,7 +1613,7 @@ static struct se_wwn *usbg_make_tport(
> return ERR_PTR(-ENOMEM);
> }
> tport->tport_wwpn = wwpn;
> - snprintf(tport->tport_name, sizeof(tport->tport_name), wnn_name);
> + snprintf(tport->tport_name, sizeof(tport->tport_name), "%s", wnn_name);
Can you resend with Cc: <stable@...r.kernel.org> ?
Looks like we need to backport this v3.4.
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists