From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752422AbdCQBkc (ORCPT ); Thu, 16 Mar 2017 21:40:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58214 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbdCQBkb (ORCPT ); Thu, 16 Mar 2017 21:40:31 -0400 Date: Fri, 17 Mar 2017 10:37:48 +0900 From: Greg Kroah-Hartman To: Shuah Khan Cc: Jonathan Dieter , linux-kernel@vger.kernel.org, Krzysztof Opasiak , Valentina Manea , Peter Senna Tschudin , "open list:USB OVER IP DRIVER" Subject: Re: [PATCH v4 1/2] usbip: Fix-format-overflow Message-ID: <20170317013748.GC10905@kroah.com> References: <20170222181803.16373-1-jdieter@lesbg.com> <20170227083108.16391-1-jdieter@lesbg.com> <0dd8ccff-37c7-c7fd-0e33-84e6f69ff4d7@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0dd8ccff-37c7-c7fd-0e33-84e6f69ff4d7@kernel.org> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 16, 2017 at 09:04:54AM -0600, Shuah Khan wrote: > On 02/27/2017 01:31 AM, Jonathan Dieter wrote: > > The usbip userspace tools call sprintf()/snprintf() and don't check for > > the return value which can lead the paths to overflow, truncating the > > final file in the path. > > > > More urgently, GCC 7 now warns that these aren't checked with > > -Wformat-overflow, and with -Werror enabled in configure.ac, that makes > > these tools unbuildable. > > > > This patch fixes these problems by replacing sprintf() with snprintf() in > > one place and adding checks for the return value of snprintf(). > > > > Reviewed-by: Peter Senna Tschudin > > Signed-off-by: Jonathan Dieter > > Greg, > > Please pick this up. > > Acked-by: Shuah Khan Thanks, still digging through USB patches...