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]
Date:   Thu,  9 Feb 2017 13:01:18 +0000
From:   Colin King <colin.king@...onical.com>
To:     David Lin <dtwlin@...il.com>, Johan Hovold <johan@...nel.org>,
        Alex Elder <elder@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        greybus-dev@...ts.linaro.org, devel@...verdev.osuosl.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] staging: greybus: uart: fix uninitialized newline.flow_control

From: Colin Ian King <colin.king@...onical.com>

Currently newline.flow_control is uninitialized, so it can contain
any garbage from the stack.  I believe it should be initialized with
GB_SERIAL_AUTO_RTSCTS_EN enabled if the termios c_cflag is CRTSCTS
enabled.

Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 drivers/staging/greybus/uart.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index 248ad66..b542f67 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -506,6 +506,8 @@ static void gb_tty_set_termios(struct tty_struct *tty,
 	newline.parity = termios->c_cflag & PARENB ?
 				(termios->c_cflag & PARODD ? 1 : 2) +
 				(termios->c_cflag & CMSPAR ? 2 : 0) : 0;
+	newline.flow_control = termios->c_cflag & CRTSCTS ?
+				GB_SERIAL_AUTO_RTSCTS_EN : 0;
 
 	switch (termios->c_cflag & CSIZE) {
 	case CS5:
-- 
2.10.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ