Message ID | 20200310123614.912840674@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=QSPG=43=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C931C18E5A for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 12:43:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5164A24691 for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 12:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844218; bh=tI5Cf/9BQhu3bM0yslg1rfjjrkLMj5K6gxj4++CS5/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gNX9vPC1PD0HF6chuzVND/TOBBPIE1POpkcWy8U+JsZEznNmiWn4iBScqdqo+NiyA ptvjE8DG38u+mAgW0Xz4fCoiG6Z99UhJL0ToP2LxQ2eyvYK94AuPslNQo8kLNHEMHI DB8e0HhPHozjguArgpenCTuajNCKv4wstbZJqUqM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726799AbgCJMnh (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 10 Mar 2020 08:43:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:43982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727609AbgCJMng (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 10 Mar 2020 08:43:36 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3C1824693; Tue, 10 Mar 2020 12:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844215; bh=tI5Cf/9BQhu3bM0yslg1rfjjrkLMj5K6gxj4++CS5/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NwewYP0LBPIxTUEv6MHxmymE+VjZG7jiIADhABhMMjs/s9jF/kfC/9jy0u/MTHD1W wtxXqLgR3YgJKTfMGziVoiFUW+X95NxdAFXpZG7PHPcFUNNYrReTVNVwHsf/b2Jnuz U7ki3/6i7ybaKAATmaEWK+Uch01ER5Gna3IZBbVg= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Hulk Robot <hulkci@huawei.com>, Zhang Xiaoxu <zhangxiaoxu5@huawei.com>, Daniel Vetter <daniel.vetter@ffwll.ch> Subject: [PATCH 4.4 55/72] vgacon: Fix a UAF in vgacon_invert_region Date: Tue, 10 Mar 2020 13:39:08 +0100 Message-Id: <20200310123614.912840674@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310123601.053680753@linuxfoundation.org> References: <20200310123601.053680753@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1330,6 +1330,9 @@ static int vgacon_font_get(struct vc_dat static int vgacon_resize(struct vc_data *c, unsigned int width, unsigned int height, unsigned int user) { + if ((width << 1) * height > vga_vram_size) + return -EINVAL; + if (width % 2 || width > screen_info.orig_video_cols || height > (screen_info.orig_video_lines * vga_default_font_height)/ c->vc_font.height)