From: David Miller <davem@davemloft.net>
To: richard.alpe@ericsson.com
Cc: netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net
Subject: Re: [PATCH net-next v1 3/4] tipc: safely copy UDP netlink data from user
Date: Sun, 06 Mar 2016 22:58:08 -0500 (EST) [thread overview]
Message-ID: <20160306.225808.1376970866333167103.davem@davemloft.net> (raw)
In-Reply-To: <1457011243-23605-3-git-send-email-richard.alpe@ericsson.com>
From: Richard Alpe <richard.alpe@ericsson.com>
Date: Thu, 3 Mar 2016 14:20:42 +0100
> The netlink policy for TIPC_NLA_UDP_LOCAL and TIPC_NLA_UDP_REMOTE
> is of type binary with a defined length. This causes the policy
> framework to threat the defined length as maximum length.
>
> There is however no protection against a user sending a smaller
> amount of data. Prior to this patch this wasn't handled which could
> result in a partially incomplete sockaddr_storage struct containing
> uninitialized data.
>
> In this patch we use nla_memcpy() when copying the user data. This
> ensures a potential gap at the end is cleared out properly.
>
> This was found by Julia with Coccinelle tool.
>
> Reported-by: Daniel Borkmann <daniel@iogearbox.net>
> Reported-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
> Acked-by: Jon Maloy <jon.maloy@ericsson.com>
> Reviewed-by: Erik Hugne <erik.hugne@gmail.com>
Applied.
next prev parent reply other threads:[~2016-03-07 3:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 13:20 [PATCH net-next v1 1/4] tipc: add net device to skb before UDP xmit Richard Alpe
2016-03-03 13:20 ` [PATCH net-next v1 2/4] tipc: don't check link reset on non existing link Richard Alpe
2016-03-07 3:58 ` David Miller
2016-03-03 13:20 ` [PATCH net-next v1 3/4] tipc: safely copy UDP netlink data from user Richard Alpe
2016-03-07 3:58 ` David Miller [this message]
2016-03-03 13:20 ` [PATCH net-next v1 4/4] tipc: make sure required IPv6 addresses are scoped Richard Alpe
2016-03-07 3:58 ` David Miller
2016-03-03 13:27 ` [PATCH net-next v1 1/4] tipc: add net device to skb before UDP xmit Xue, Ying
2016-03-07 3:57 ` David Miller
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=20160306.225808.1376970866333167103.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=richard.alpe@ericsson.com \
--cc=tipc-discussion@lists.sourceforge.net \
/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).