From: Richard Alpe <hidden> Date: 2016-03-03 13:20:51
Prior to this patch enabling a IPv4 UDP bearer caused a null pointer
dereference in iptunnel_xmit_stats(), when it tried to dereference the
net device from the skb. To resolve this we now point the skb device
to the net device resolved from the routing table.
Fixes: 039f50629b7f (ip_tunnel: Move stats update to iptunnel_xmit())
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>
---
net/tipc/udp_media.c | 2 ++
1 file changed, 2 insertions(+)
From: Richard Alpe <hidden> Date: 2016-03-03 13:20:43
Make sure the user has provided a scope for multicast and link local
addresses used locally by a UDP bearer.
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>
---
net/tipc/udp_media.c | 5 +++++
1 file changed, 5 insertions(+)
--
2.1.4
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
From: Richard Alpe <hidden> Date: 2016-03-03 13:20:52
Make sure we have a link before checking if it has been reset or not.
Prior to this patch tipc_link_is_reset() could be called with a non
existing link, resulting in a null pointer dereference.
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>
---
net/tipc/node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Richard Alpe <hidden> Date: 2016-03-03 13:20:53
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 <redacted>
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>
---
net/tipc/udp_media.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
As I just saw, you had submitted the series to net-next. Anyway, this is a very good job!
Thanks,
Ying
-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of Richard Alpe
Sent: 2016年3月3日 21:21
To: netdev@vger.kernel.org
Cc: tipc-discussion@lists.sourceforge.net; Richard Alpe
Subject: [PATCH net-next v1 1/4] tipc: add net device to skb before UDP xmit
Prior to this patch enabling a IPv4 UDP bearer caused a null pointer dereference in iptunnel_xmit_stats(), when it tried to dereference the net device from the skb. To resolve this we now point the skb device to the net device resolved from the routing table.
Fixes: 039f50629b7f (ip_tunnel: Move stats update to iptunnel_xmit())
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>
---
net/tipc/udp_media.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index d63a911..f22a5bb1 100644--- a/net/tipc/udp_media.c+++ b/net/tipc/udp_media.c
@@ -181,6 +181,8 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,err=PTR_ERR(rt);gototx_error;}++skb->dev=rt->dst.dev;ttl=ip4_dst_hoplimit(&rt->dst);udp_tunnel_xmit_skb(rt,ub->ubsock->sk,skb,src->ipv4.s_addr,dst->ipv4.s_addr,0,ttl,0,src->udp_port,--
From: David Miller <davem@davemloft.net> Date: 2016-03-07 03:57:59
From: Richard Alpe <redacted>
Date: Thu, 3 Mar 2016 14:20:40 +0100
Prior to this patch enabling a IPv4 UDP bearer caused a null pointer
dereference in iptunnel_xmit_stats(), when it tried to dereference the
net device from the skb. To resolve this we now point the skb device
to the net device resolved from the routing table.
Fixes: 039f50629b7f (ip_tunnel: Move stats update to iptunnel_xmit())
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>
From: David Miller <davem@davemloft.net> Date: 2016-03-07 03:58:04
From: Richard Alpe <redacted>
Date: Thu, 3 Mar 2016 14:20:41 +0100
Make sure we have a link before checking if it has been reset or not.
Prior to this patch tipc_link_is_reset() could be called with a non
existing link, resulting in a null pointer dereference.
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>
From: David Miller <davem@davemloft.net> Date: 2016-03-07 03:58:09
From: Richard Alpe <redacted>
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 <redacted>
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>
From: David Miller <davem@davemloft.net> Date: 2016-03-07 03:58:15
From: Richard Alpe <redacted>
Date: Thu, 3 Mar 2016 14:20:43 +0100
Make sure the user has provided a scope for multicast and link local
addresses used locally by a UDP bearer.
Signed-off-by: Richard Alpe <redacted>
Acked-by: Jon Maloy <redacted>
Reviewed-by: Erik Hugne <redacted>