lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 06 Apr 2015 12:41:14 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	tom@...bertland.com
Cc:	netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
	pablo@...filter.org, hannes@...essinduktion.org, jiri@...nulli.us
Subject: Re: [PATCH 0/4] Prevent UDP tunnels from operating on garbage
 socket

From: Tom Herbert <tom@...bertland.com>
Date: Mon, 6 Apr 2015 06:59:21 -0700

> On Sun, Apr 5, 2015 at 7:18 PM, David Miller <davem@...emloft.net> wrote:
>>
>> So this should do the rest of the work such that when we encapsulate
>> into a UDP tunnel, the output path works on the UDP tunnel's socket
>> rather than skb->sk.
>>
> Doesn't this contradict "udp: Do not require sock in
> udp_tunnel_xmit_skb" patch?  How is the skbuf getting set with a
> garbage socket?

It's not a garbage socket, but it could be a socket for a completely
different address family than ipv4/ipv6.  The canonical example is
AF_PACKET transmitting over an encapsulating device.

Tom if you are saying that skb->sk should be reset to the tunnel
socket, that doesn't work and is completely broken.

You must retain the original skb->sk of the application so that socket
memory accounting does not break.  You can't just rewrite skb->sk
during tunnel encapsulation.

That's the whole point these changes.

If an AF_PACKET socket transmits over a UDP encapsulating tunnel device
we want skb->sk to be the AF_PACKET socket for socket memory accounting
purposes, and pass down explicitly the UDP tunnel socket through the
output path starting at the point of UDP encapsulation.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists