From: Greg KH <greg@kroah.com>
To: akpm@linux-foundation.org
Cc: linux-serial@vger.kernel.org, drosenberg@vsecurity.com,
alan@lxorguk.ukuu.org.uk, dan.j.rosenberg@gmail.com
Subject: Re: [patch 3/3] drivers/serial/serial_core.c: prevent reading uninitialized stack memory
Date: Wed, 6 Oct 2010 13:20:34 -0700 [thread overview]
Message-ID: <20101006202034.GD26397@kroah.com> (raw)
In-Reply-To: <201010012118.o91LI4lh021287@imap1.linux-foundation.org>
On Fri, Oct 01, 2010 at 02:18:04PM -0700, akpm@linux-foundation.org wrote:
> From: Dan Rosenberg <drosenberg@vsecurity.com>
>
> The TIOCGICOUNT device ioctl allows unprivileged users to read
> uninitialized stack memory, because the "reserved" member of the
> serial_icounter_struct struct declared on the stack is not altered or
> zeroed before being copied back to the user. This patch takes care of it.
>
> Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Cc: Greg KH <greg@kroah.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/serial/serial_core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff -puN drivers/serial/serial_core.c~drivers-serial-serial_corec-prevent-reading-uninitialized-stack-memory drivers/serial/serial_core.c
> --- a/drivers/serial/serial_core.c~drivers-serial-serial_corec-prevent-reading-uninitialized-stack-memory
> +++ a/drivers/serial/serial_core.c
> @@ -1081,6 +1081,8 @@ static int uart_get_icount(struct tty_st
> struct uart_icount cnow;
> struct uart_port *uport = state->uart_port;
>
> + memset(&icount, 0, sizeof(struct serial_icounter_struct));
This patch is no longer needed as Alan fixed it in the tty core.
thanks,
greg k-h
prev parent reply other threads:[~2010-10-06 20:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-01 21:18 [patch 3/3] drivers/serial/serial_core.c: prevent reading uninitialized stack memory akpm
2010-10-06 20:20 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101006202034.GD26397@kroah.com \
--to=greg@kroah.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dan.j.rosenberg@gmail.com \
--cc=drosenberg@vsecurity.com \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.