From: Markus Armbruster Subject: [PATCH] ioemu: Fix PVFB backend to limit frame buffer size Date: Thu, 15 May 2008 09:53:01 +0200 Message-ID: <8763tgatr6.fsf@pike.pond.sub.org> References: <877idyxq1i.fsf@pike.pond.sub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <877idyxq1i.fsf@pike.pond.sub.org> (Markus Armbruster's message of "Tue\, 13 May 2008 16\:00\:09 +0200") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org The recent fix to validate the frontend's frame buffer description neglected to limit the frame buffer size correctly. This lets a malicious frontend make the backend attempt to map an arbitrary amount of guest memory, which could be useful for a denial of service attack against dom0. Signed-off-by: Markus Armbruster diff -r 53195719f762 tools/ioemu/hw/xenfb.c --- a/tools/ioemu/hw/xenfb.c Tue May 13 15:08:17 2008 +0100 +++ b/tools/ioemu/hw/xenfb.c Thu May 15 09:37:18 2008 +0200 @@ -502,6 +502,7 @@ static int xenfb_configure_fb(struct xen fprintf(stderr, "FB: frontend fb size %zu limited to %zu\n", fb_len, fb_len_lim); + fb_len = fb_len_lim; } if (depth != 8 && depth != 16 && depth != 24 && depth != 32) { fprintf(stderr,