Re: [PATCH] drivers: video: fbcon: fix NULL dereference in fbcon_cursor()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Du Cheng <ducheng2@xxxxxxxxx>
> ---
>  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@xxxxxxxxx

And has syzbot testing shown that this fix does solve the issue?

thanks,

greg k-h
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux