From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: mathieu.lacage@sophia.inria.fr, netdev@vger.kernel.org
Subject: Re: PATCH: uninitialized memory access in tcp_parse_options
Date: Mon, 28 Jun 2010 21:22:41 -0700 (PDT) [thread overview]
Message-ID: <20100628.212241.245398923.davem@davemloft.net> (raw)
In-Reply-To: <1277531884.2481.22.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 26 Jun 2010 07:58:04 +0200
> If you want to avoid valgrind false positive at this point, without
> introducing bug for other tcp_parse_options() callers, a better fix
> would be following patch.
>
> Thanks
>
> diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
> index 794c2e1..4e758ac 100644
> --- a/net/ipv4/tcp_minisocks.c
> +++ b/net/ipv4/tcp_minisocks.c
> @@ -520,14 +520,13 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
> struct request_sock *req,
> struct request_sock **prev)
> {
> - struct tcp_options_received tmp_opt;
> + struct tcp_options_received tmp_opt = {0};
> u8 *hash_location;
> struct sock *child;
That's a 28 byte memset() in the connect fast-path. We shouldn't eat this
just to placate a valgrind miscue. :-)
prev parent reply other threads:[~2010-06-29 4:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 13:34 PATCH: uninitialized memory access in tcp_parse_options Mathieu Lacage
2010-06-21 18:02 ` Mitchell Erblich
2010-06-21 19:10 ` Mathieu Lacage
2010-06-26 5:58 ` Eric Dumazet
2010-06-29 4:22 ` David Miller [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=20100628.212241.245398923.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=mathieu.lacage@sophia.inria.fr \
--cc=netdev@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 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).