From: Du Cheng <ducheng2@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
syzbot+b67aaae8d3a927f68d20@syzkaller.appspotmail.com,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drivers: video: fbcon: fix NULL dereference in fbcon_cursor()
Date: Fri, 12 Mar 2021 17:13:02 +0800 [thread overview]
Message-ID: <20210312091302.GA454062@ThinkCentre-M83> (raw)
In-Reply-To: <YEsoGqJypKUdPoR+@kroah.com>
On Fri, Mar 12, 2021 at 09:36:42AM +0100, Greg Kroah-Hartman wrote:
> On Fri, Mar 12, 2021 at 04:14:21PM +0800, Du Cheng wrote:
> > add null-check on function pointer before dereference on ops->cursor
> >
> > Reported-by: syzbot+b67aaae8d3a927f68d20@syzkaller.appspotmail.com
> > Signed-off-by: Du Cheng <ducheng2@gmail.com>
> > ---
> > drivers/video/fbdev/core/fbcon.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> > index 44a5cd2f54cc..3406067985b1 100644
> > --- a/drivers/video/fbdev/core/fbcon.c
> > +++ b/drivers/video/fbdev/core/fbcon.c
> > @@ -1333,6 +1333,9 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
> >
> > ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;
> >
> > + if (!ops->cursor)
> > + return;
> > +
> > ops->cursor(vc, info, mode, get_color(vc, info, c, 1),
> > get_color(vc, info, c, 0));
> > }
> > --
> > 2.27.0
> >
>
> Is this the same issue reported here:
> https://lore.kernel.org/r/20210307105642.112572-1-h.shahbazi.git@gmail.com
>
> And has syzbot testing shown that this fix does solve the issue?
>
> thanks,
>
> greg k-h
Hi Greg,
I sent both my patch and that of shahbazi to syzbot to see if they resolve the
bug by the id b67aaae8d3a927f68d20.
I will keep you posted of the outcomes.
Regards,
Du Cheng
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-03-12 9:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 8:14 [PATCH] drivers: video: fbcon: fix NULL dereference in fbcon_cursor() Du Cheng
2021-03-12 8:36 ` Greg Kroah-Hartman
2021-03-12 9:13 ` Du Cheng [this message]
2021-03-13 0:23 ` 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=20210312091302.GA454062@ThinkCentre-M83 \
--to=ducheng2@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=syzbot+b67aaae8d3a927f68d20@syzkaller.appspotmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox