From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 D8E88C433ED for ; Thu, 20 May 2021 13:59:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8950613B0 for ; Thu, 20 May 2021 13:59:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236494AbhETOBM (ORCPT ); Thu, 20 May 2021 10:01:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:34446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243499AbhETN7t (ORCPT ); Thu, 20 May 2021 09:59:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C24D60FF3; Thu, 20 May 2021 13:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621519107; bh=9Z9KtTy2XJzfMy3Np+yfMnnpZx1rqHwlJ+eViM6aKGg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zzZKKHy8Rvb2U6+fIVhMVR4d5FQY3bliHouy3pSAQ81rdLSMQgPZMcZUsRyciMnB5 ZbBk+zb+O85Z8nqUfoyYz6XrYMRXjrvGIt6tKvhYx8g0KCsREhI4GBhbgxJ1HtDdSt fCZrWgZP/7jZ9IhI2OGk+7Au4bnWZ387ujj8o7iI= Date: Thu, 20 May 2021 15:58:25 +0200 From: Greg Kroah-Hartman To: Anirudh Rayabharam Cc: linux-kernel-mentees@lists.linuxfoundation.org, kernel test robot , stable , linux-nvidia@lists.surfsouth.com, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, igormtorrente@gmail.com, fero@drama.obuda.kando.hu Subject: Re: [PATCH] video: hgafb: correctly handle card detect failure during probe Message-ID: References: <20210516192714.25823-1-mail@anirudhrb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org On Thu, May 20, 2021 at 07:10:39PM +0530, Anirudh Rayabharam wrote: > On Mon, May 17, 2021 at 12:57:14AM +0530, Anirudh Rayabharam wrote: > > The return value of hga_card_detect() is not properly handled causing > > the probe to succeed even though hga_card_detect() failed. Since probe > > succeeds, hgafb_open() can be called which will end up operating on an > > unmapped hga_vram. This results in an out-of-bounds access as reported > > by kernel test robot [1]. > > > > To fix this, correctly detect failure of hga_card_detect() by checking > > for a non-zero error code. > > > > [1]: https://lore.kernel.org/lkml/20210516150019.GB25903@xsang-OptiPlex-9020/ > > > > Reported-by: kernel test robot > > Fixes: dc13cac4862c ("video: hgafb: fix potential NULL pointer dereference") > > Greg, this is one of the UMN fixes we did. So, do you want to take this > patch into your tree? Yes, will queue it up in a few days after Linus takes the current pull request I sent him for this. thanks, greg k-h