Received: from eggs.gnu.org ([2001:4830:134:3::10]:33208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brnFY-00018r-V6 for qemu-devel@nongnu.org; Wed, 05 Oct 2016 10:32:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brnFT-0003jF-V2 for qemu-devel@nongnu.org; Wed, 05 Oct 2016 10:32:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brnFT-0003jA-PF for qemu-devel@nongnu.org; Wed, 05 Oct 2016 10:32:43 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 51B4DA0E51 for ; Wed, 5 Oct 2016 14:32:43 +0000 (UTC) Message-ID: <1475677961.25728.19.camel@redhat.com> From: Gerd Hoffmann Date: Wed, 05 Oct 2016 16:32:41 +0200 In-Reply-To: <6d482c28-a93f-11af-fc83-1e8b17b3e0c2@redhat.com> References: <1475659998-22045-1-git-send-email-kraxel@redhat.com> <6d482c28-a93f-11af-fc83-1e8b17b3e0c2@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] usb: fix serial generator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org Hi, > > Problem is that usb_desc_create_serial didn't perform that check, so a > > loooong path string (can happen with deep pci-bridge nesting) results i= n > > the third snprintf call smashing the stack. >=20 > Is this exploitable enough to need a CVE? It isn't guest-triggerable. Also it needs a pretty unusual config to happen (pci-bridges nested so deep that lspci -t inside the guest crashes). So I'd rate it pretty low on the severity scale. > > Fix this by throwing out all the snpintf calls and use g_strdup_printf >=20 > s/snpintf/snprintf/ Fixed. cheers, Gerd