This is a note to let you know that I've just added the patch titled
TTY: ttyprintk, don't touch behind tty->write_buf
to the 3.6-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:
tty-ttyprintk-don-t-touch-behind-tty-write_buf.patch
and it can be found in the queue-3.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From ee8b593affdf893012e57f4c54a21984d1b0d92e Mon Sep 17 00:00:00 2001
From: Jiri Slaby <[email protected]>
Date: Tue, 7 Aug 2012 21:47:39 +0200
Subject: TTY: ttyprintk, don't touch behind tty->write_buf
From: Jiri Slaby <[email protected]>
commit ee8b593affdf893012e57f4c54a21984d1b0d92e upstream.
If a user provides a buffer larger than a tty->write_buf chunk and
passes '\r' at the end of the buffer, we touch an out-of-bound memory.
Add a check there to prevent this.
Signed-off-by: Jiri Slaby <[email protected]>
Cc: Samo Pogacnik <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/char/ttyprintk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/char/ttyprintk.c
+++ b/drivers/char/ttyprintk.c
@@ -67,7 +67,7 @@ static int tpk_printk(const unsigned cha
tmp[tpk_curr + 1] = '\0';
printk(KERN_INFO "%s%s", tpk_tag, tmp);
tpk_curr = 0;
- if (buf[i + 1] == '\n')
+ if ((i + 1) < count && buf[i + 1] == '\n')
i++;
break;
case '\n':
Patches currently in stable-queue which might be from [email protected] are
queue-3.6/tty-ttyprintk-don-t-touch-behind-tty-write_buf.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