lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210331163425.8092-1-h.shahbazi.git@gmail.com>
Date:   Wed, 31 Mar 2021 19:34:29 +0300
From:   Hassan Shahbazi <h.shahbazi.git@...il.com>
To:     gregkh@...uxfoundation.org, daniel.vetter@...ll.ch,
        jirislaby@...nel.org, yepeilin.cs@...il.com
Cc:     linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org,
        Hassan Shahbazi <h.shahbazi.git@...il.com>
Subject: [PATCH] fix NULL pointer deference crash

The patch has fixed a NULL pointer deference crash in hiding the cursor. It 
is verified by syzbot patch tester.

Reported by: syzbot
https://syzkaller.appspot.com/bug?id=defb47bf56e1c14d5687280c7bb91ce7b608b94b

Signed-off-by: Hassan Shahbazi <h.shahbazi.git@...il.com>
---
 drivers/video/fbdev/core/fbcon.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 44a5cd2f54cc..ee252d1c43c6 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1333,8 +1333,9 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
 
 	ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;
 
-	ops->cursor(vc, info, mode, get_color(vc, info, c, 1),
-		    get_color(vc, info, c, 0));
+	if (ops && ops->cursor)
+		ops->cursor(vc, info, mode, get_color(vc, info, c, 1),
+				get_color(vc, info, c, 0));
 }
 
 static int scrollback_phys_max = 0;
-- 
2.26.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ