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
| ||
|
Date: Sat, 30 Mar 2013 15:58:43 +0800 From: Frankie Lin <frankiefrankie.lin@...il.com> To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jiri Slaby <jslaby@...e.cz> Cc: open <linux-kernel@...r.kernel.org>, Frankie Lin <frankiefrankie.lin@...il.com> Subject: [PATCH 1/1] TTY Fix NULL pointer error in tty_wakeup When calling tty_wakeup and the parameter is NULL,the oops will happen. The virtual address &tty->flags can not be handled in the kernel space, while PC goto test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags). Tested on ARM Machine msm8625. Signed-off-by: Frankie Lin <frankiefrankie.lin@...il.com> --- drivers/tty/tty_io.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 05400ac..9c4fb2e 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -519,6 +519,11 @@ void tty_wakeup(struct tty_struct *tty) { struct tty_ldisc *ld; + if (!tty) { + pr_err("tty is null in function: %s.\n", __func__); + return; + } + if (test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) { ld = tty_ldisc_ref(tty); if (ld) { -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists