drivers: video: fbcon: fix NULL dereference in fbcon_cursor()
Subsystems (3)
PATCH 1/1 drivers: video: fbcon: fix NULL dereference in fbcon_cursor()
add null-check on function pointer before dereference on ops->cursor
--- drivers/video/fbdev/core/fbcon.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/video/fbdev/core/fbcon.c +3 -0
@@ -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 )); }
Signature · 6 lines
2.27.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 25 lines · Du Cheng
add null-check on function pointer before dereference on
ops->cursorReported-by [email protected]Signed-off-by Du Cheng <[email protected]>--- drivers/video/fbdev/core/fbcon.c | 3 +++ 1 file changed, 3 insertions(+)drivers/video/fbdev/core/fbcon.c +3
-0@@ -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 )); }Signature · 1 line
2.27.0
Is this the same issue reported here:
https://lore.kernel.org/r/[email protected]
And has syzbot testing shown that this fix does solve the issue?
thanks,
greg k-h
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 28 lines · Greg Kroah-Hartman
Quoted 25 lines · Du Cheng
add null-check on function pointer before dereference on
ops->cursorReported-by [email protected]Signed-off-by Du Cheng <[email protected]>--- drivers/video/fbdev/core/fbcon.c | 3 +++ 1 file changed, 3 insertions(+)drivers/video/fbdev/core/fbcon.c +3
-0@@ -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 )); }Signature · 1 line
2.27.0Is this the same issue reported here:
Quoted 7 lines
https://lore.kernel.org/r/[email protected]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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 28 lines · Greg Kroah-Hartman
Quoted 25 lines · Du Cheng
add null-check on function pointer before dereference on
ops->cursorReported-by [email protected]Signed-off-by Du Cheng <[email protected]>--- drivers/video/fbdev/core/fbcon.c | 3 +++ 1 file changed, 3 insertions(+)drivers/video/fbdev/core/fbcon.c +3
-0@@ -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 )); }Signature · 1 line
2.27.0Is this the same issue reported here:
Quoted 7 lines
https://lore.kernel.org/r/[email protected]And has syzbot testing shown that this fix does solve the issue?
thanks,
greg k-h
Hi Greg,
After syzbot testing at
https://syzkaller.appspot.com/bug?id=26567b12e74b8791e1db50da6039ee1705e5a7ed
the results showed that shahbazi's patch did not solve this bug, but my patch passed the syzbot test.
Regards,
Du Cheng
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel