[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20260207192708.44188-1-officialsohamkute@gmail.com>
Date: Sun, 8 Feb 2026 00:57:08 +0530
From: Soham Kute <officialsohamkute@...il.com>
To: gregkh@...uxfoundation.org,
jirislaby@...nel.org
Cc: linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org,
Soham Kute <officialsohamkute@...il.com>,
syzbot+03f79366754268a0f20c@...kaller.appspotmail.com
Subject: [PATCH] tty: vt: keyboard: fix general protection fault in k_meta
syzbot reported a general protection fault in k_meta() caused by
dereferencing an invalid keyboard pointer when checking META mode.
Add a defensive check to ensure the keyboard pointer is valid before
calling vc_kbd_mode().
Reported-by: syzbot+03f79366754268a0f20c@...kaller.appspotmail.com
Signed-off-by: Soham Kute <officialsohamkute@...il.com>
---
drivers/tty/vt/keyboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index d65fc60dd..b535d7a42 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -880,7 +880,7 @@ static void k_meta(struct vc_data *vc, unsigned char value, char up_flag)
if (up_flag)
return;
- if (vc_kbd_mode(kbd, VC_META)) {
+ if (kbd && vc_kbd_mode(kbd, VC_META)) {
put_queue(vc, '\033');
put_queue(vc, value);
} else
--
2.34.1
Powered by blists - more mailing lists