From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ea5Im-00082P-Ui for qemu-devel@nongnu.org; Fri, 12 Jan 2018 14:47:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ea5Ii-0002C2-3v for qemu-devel@nongnu.org; Fri, 12 Jan 2018 14:47:45 -0500 Date: Fri, 12 Jan 2018 17:47:30 -0200 From: Eduardo Habkost Message-ID: <20180112194730.GQ18022@localhost.localdomain> References: <20180108215007.46471-1-marcel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180108215007.46471-1-marcel@redhat.com> Subject: Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: qemu-devel@nongnu.org, mst@redhat.com, qemu-stable@nongnu.org, kraxel@redhat.com, lersek@redhat.com On Mon, Jan 08, 2018 at 11:50:07PM +0200, Marcel Apfelbaum wrote: > When all the fw_cfg slots are used, a write is made outside the > bounds of the fw_cfg files array as part of the sort algorithm. > > Fix it by avoiding an unnecessary array element move. > Fix also an assert while at it. > > Signed-off-by: Marcel Apfelbaum Queued on machine-next, thanks! -- Eduardo