This is a note to let you know that I've just added the patch titled
n_tty: Fix echo overrun tail computation
to the 3.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
n_tty-fix-echo-overrun-tail-computation.patch
and it can be found in the queue-3.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 6f2225363c205e186c1465c2c7c84f17c1635504 Mon Sep 17 00:00:00 2001
From: Peter Hurley <[email protected]>
Date: Fri, 8 Nov 2013 09:42:18 -0500
Subject: n_tty: Fix echo overrun tail computation
From: Peter Hurley <[email protected]>
commit 6f2225363c205e186c1465c2c7c84f17c1635504 upstream.
Commit cbfd0340ae1993378fd47179db949e050e16e697,
'n_tty: Process echoes in blocks', introduced an error when
consuming the echo buffer tail to prevent buffer overrun, where
the incorrect operation code byte is checked to determine how
far to advance the tail to the next echo byte.
Check the correct byte for the echo operation code byte.
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/tty/n_tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -768,7 +768,7 @@ static size_t __process_echoes(struct tt
* data at the tail to prevent a subsequent overrun */
while (ldata->echo_commit - tail >= ECHO_DISCARD_WATERMARK) {
if (echo_buf(ldata, tail) == ECHO_OP_START) {
- if (echo_buf(ldata, tail) == ECHO_OP_ERASE_TAB)
+ if (echo_buf(ldata, tail + 1) == ECHO_OP_ERASE_TAB)
tail += 3;
else
tail += 2;
Patches currently in stable-queue which might be from [email protected]
are
queue-3.12/n_tty-fix-4096-byte-canonical-reads.patch
queue-3.12/tty-incorrect-test-of-echo_buf-result-for-echo_op_start.patch
queue-3.12/n_tty-ensure-reader-restarts-worker-for-next-reader.patch
queue-3.12/tty-reset-hupped-state-on-open.patch
queue-3.12/n_tty-fix-echo-overrun-tail-computation.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html