From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXgic-0004TB-4D for qemu-devel@nongnu.org; Tue, 26 Jun 2018 01:40:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXgiZ-0007NP-1l for qemu-devel@nongnu.org; Tue, 26 Jun 2018 01:40:46 -0400 References: <20180622194736.GA5794@roeck-us.net> <126ac556-0602-b927-58f5-cb5f65a5e0ec@de.ibm.com> <88d9afed-f91d-c320-13c8-9a93fc52b700@de.ibm.com> <20180626053246.6kyvrj7jbuhgdkgv@sivokote.iziade.m$> From: Thomas Huth Message-ID: Date: Tue, 26 Jun 2018 07:40:36 +0200 MIME-Version: 1.0 In-Reply-To: <20180626053246.6kyvrj7jbuhgdkgv@sivokote.iziade.m$> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] s390 qemu boot failure in -next List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Georgi Guninski , Christian Borntraeger Cc: Guenter Roeck , Martin Schwidefsky , Vasily Gorbik , Heiko Carstens , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, qemu-s390x , qemu-devel , Cornelia Huck On 26.06.2018 07:32, Georgi Guninski wrote: > On Mon, Jun 25, 2018 at 09:27:59AM +0200, Christian Borntraeger wrote: >> - /* Overwrite parameters in the kernel image, which are "rom" */ >> - strcpy(rom_ptr(KERN_PARM_AREA), ipl->cmdline); > >> + strcpy(rom_ptr(KERN_PARM_AREA), ipl->cmdline); > > Why not replace strcpy() with strncpy() or snprintf()? > strcpy() may overflow. This will be fixed by https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg04227.html by adding a check for a valid size. Thomas