From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: netdev@vger.kernel.org, Pekka Enberg <penberg@cs.helsinki.fi>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: kmemcheck detected possible information leak to userspace?
Date: Tue, 1 Jul 2008 14:25:00 +0400 [thread overview]
Message-ID: <20080701102459.GB30248@2ka.mipt.ru> (raw)
In-Reply-To: <19f34abd0807010216k11a60382xf7a27b4b27f0819@mail.gmail.com>
On Tue, Jul 01, 2008 at 11:16:15AM +0200, Vegard Nossum (vegard.nossum@gmail.com) wrote:
> Hi,
>
> Running kmemcheck on -tip gives me the following warning:
>
> kmemcheck: Caught 32-bit read from uninitialized memory (c72daa2e)
> iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiuuuuiiiiuuuuuuuuuu
> ^
...
> ..which is a bit worrying, because it means that we are copying
> uninitialized data into userspace, i.e. this could be a data leak.
> Most likely it's not very critical, but it would be nice to fix
> anyway.
>
> Relevant source lines are:
>
> $ addr2line -e vmlinux -i c04ade71 # memcpy_toiovec
> net/core/iovec.c:87
>
> $ addr2line -e vmlinux -i c04ae461 # skb_copy_datagram_iovec
> net/core/datagram.c:277
>
> $ addr2line -e vmlinux -i c05325c7 # packet_recvmsg
> net/packet/af_packet.c:1093
This gives:
copied = skb->len;
if (copied > len)
{
copied=len;
msg->msg_flags|=MSG_TRUNC;
}
err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
So everything looks ok, but driver could setup skb->len and/or
skb->data_len to be slightly more than it placed data. Does
above 'uuuu' bytes are at the end of the skb->data?
--
Evgeniy Polyakov
next prev parent reply other threads:[~2008-07-01 10:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 9:16 kmemcheck detected possible information leak to userspace? Vegard Nossum
2008-07-01 10:25 ` Evgeniy Polyakov [this message]
2008-07-01 10:52 ` Vegard Nossum
2008-07-01 11:21 ` Evgeniy Polyakov
2008-07-01 11:47 ` Andi Kleen
2008-07-01 12:08 ` Pekka Enberg
2008-07-01 12:17 ` Vegard Nossum
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=20080701102459.GB30248@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=vegard.nossum@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).