All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Du Cheng <ducheng2@gmail.com>
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 09:36:42 +0100	[thread overview]
Message-ID: <YEsoGqJypKUdPoR+@kroah.com> (raw)
In-Reply-To: <20210312081421.452405-1-ducheng2@gmail.com>

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-03-12  8:36 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 [this message]
2021-03-12  9:13   ` Du Cheng
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=YEsoGqJypKUdPoR+@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ducheng2@gmail.com \
    --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 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.