Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1065001pxf; Fri, 12 Mar 2021 00:37:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXkKFfJv/hkWEXnPhh9eYM9TU9zIXq+MyRtkKAc1NoVQUhsPBOie0AZsynqcun0lRSmuAC X-Received: by 2002:a17:906:2692:: with SMTP id t18mr7179031ejc.16.1615538221139; Fri, 12 Mar 2021 00:37:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615538221; cv=none; d=google.com; s=arc-20160816; b=x1KBIqjNvK8IfWxg7n0DjYir1lVRhNAh7P6QRx6TRs1M8jl75IPyAtcsoxWrvUsmkP twQAugPI/cTw8WRpggG9AKvrrytrZQKx8CuYfi8ZKBBwSsLw3/9PGDjVm9sQU2Mn9Rg6 oOGs1+RH5IQo+IC0MJwpA/B/UEMKkw4FiSNHGlICF0uxVJKG3ITgyoZJFwzd7tFOkLO6 UKTiWOsf4Ww4Rh1rLWZ4i2JLJaDsmRAw40h5SmGtSYTHvO+bTF3b3AZ0Zq0W17ESO26E zVWOe0WryD9aiQV8LqoC3IqYj917S3hUp3vnfUak6sXizwFF9QiNKIFWzhVbOpUU9eH5 zlHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jldZH2Q5c3IOIWYQDeLPc1siIJA2AOcO8fLGNyTAGzw=; b=g5uD8ErLOhPpTrjbzqnfL2LE6QbldpxVwxk0a0dZbqiedGVPpSfnXUTo69w+UwqRoe IhOOIwYLIvUX+Jet36dVLTuyXHjYPC0by6T078wfG49VMxG+93sV4MzwWtnU9dg8RpQw UVk4mg5/3w4jCZCKTilBPPzQw4pt+n8mIETuWi6qQ33DkbZQswAFO4k7inBaVzSExu1d EcA8Zva5Ofmo8DS0gwwzndLNWH/2HwpMoKbajxYqLRdpICe3WBoJ+j3EzohbFxBB/m1d c6BjrU/PmBXUnj/mESXbtskebSQVvV2ToHsbz3rPoki7SOqv+sOZE64I6KnVUmZ6/wZh t2ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="acZw/M1w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk14si3503910edb.548.2021.03.12.00.36.38; Fri, 12 Mar 2021 00:37:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="acZw/M1w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232330AbhCLIeP (ORCPT + 99 others); Fri, 12 Mar 2021 03:34:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:37016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232237AbhCLIdk (ORCPT ); Fri, 12 Mar 2021 03:33:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CF64E64F6D; Fri, 12 Mar 2021 08:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615538020; bh=2QmrWLt/8fKtwKSmY7oZM80CYQiHKdcJGLksaKtWM9g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=acZw/M1wQvuLRBy6HgW7nmBDG56NR2+itE8bh9qxCpjUZgsHA1++xm8jpYbBWtkQA mNPHBwv8snQgLX0icCNWqmAzhgXua00fv4bqHtP1Vy1UpsOhT9e9t7U0GSrW5M5LDI 4+oDZ96turxEfMsZtMdHmOSGDEfLmlZDj2Gt5qio= Date: Fri, 12 Mar 2021 09:33:37 +0100 From: Greg KH To: Hassan Shahbazi Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers: tty: vt: vt.c: fix NULL dereference crash Message-ID: References: <20210307105642.112572-1-h.shahbazi.git@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210307105642.112572-1-h.shahbazi.git@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 07, 2021 at 12:56:43PM +0200, Hassan Shahbazi wrote: > Fix a NULL deference crash on hiding the cursor. > > Reported by: syzbot > https://syzkaller.appspot.com/bug?id=defb47bf56e1c14d5687280c7bb91ce7b608b94b > > Signed-off-by: Hassan Shahbazi > --- > drivers/tty/vt/vt.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c > index 284b07224c55..8c3e83c81341 100644 > --- a/drivers/tty/vt/vt.c > +++ b/drivers/tty/vt/vt.c > @@ -904,7 +904,9 @@ static void hide_cursor(struct vc_data *vc) > if (vc_is_sel(vc)) > clear_selection(); > > - vc->vc_sw->con_cursor(vc, CM_ERASE); > + if (vc->vc_sw) > + vc->vc_sw->con_cursor(vc, CM_ERASE); > + > hide_softcursor(vc); > } > > -- > 2.26.2 > Are you sure this actually fixes the problem? How did you test it? Did syzbot test this? I had a few reports of this patch _not_ solving the problem, so getting confirmation of this would be good. thanks, greg k-h