All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fatih Yildirim <yildirim.fatih@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>,
	Hassan Shahbazi <h.shahbazi.git@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: tty: vt: vt.c: fix NULL dereference crash
Date: Fri, 12 Mar 2021 12:07:01 +0300	[thread overview]
Message-ID: <14878df31817f11528c9326f2855819bcf782721.camel@gmail.com> (raw)
In-Reply-To: <YEsnYVwzRoEsbkie@kroah.com>

On Fri, 2021-03-12 at 09:33 +0100, Greg KH wrote:
> 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 <h.shahbazi.git@gmail.com>
> > ---
> >  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

Hi,

I've tested the patch on upstream using the .config and the C
reproducer reported by syzbot. It seems that the patch doesn't fix the
issue.

Maybe you can send a patch test request to syzbot to validate the
patch.

Thanks,
Fatih



  reply	other threads:[~2021-03-12  9:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 10:56 [PATCH] drivers: tty: vt: vt.c: fix NULL dereference crash Hassan Shahbazi
2021-03-12  8:33 ` Greg KH
2021-03-12  9:07   ` Fatih Yildirim [this message]
2021-03-12 15:43     ` Du Cheng
2021-03-13  9:12   ` Hassan Shahbazi
2021-03-12 15:05 ` Du Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14878df31817f11528c9326f2855819bcf782721.camel@gmail.com \
    --to=yildirim.fatih@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=h.shahbazi.git@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.