<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/l2tp, branch v3.0.61</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/l2tp?h=v3.0.61</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/l2tp?h=v3.0.61'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-11-17T21:14:25Z</updated>
<entry>
<title>l2tp: fix oops in l2tp_eth_create() error path</title>
<updated>2012-11-17T21:14:25Z</updated>
<author>
<name>Tom Parkin</name>
<email>tparkin@katalix.com</email>
</author>
<published>2012-10-29T23:41:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a3e425d67aab6b6f0b3bd3fb372b8044b8e981b'/>
<id>urn:sha1:5a3e425d67aab6b6f0b3bd3fb372b8044b8e981b</id>
<content type='text'>
[ Upstream commit 789336360e0a2aeb9750c16ab704a02cbe035e9e ]

When creating an L2TPv3 Ethernet session, if register_netdev() should fail for
any reason (for example, automatic naming for "l2tpeth%d" interfaces hits the
32k-interface limit), the netdev is freed in the error path.  However, the
l2tp_eth_sess structure's dev pointer is left uncleared, and this results in
l2tp_eth_delete() then attempting to unregister the same netdev later in the
session teardown.  This results in an oops.

To avoid this, clear the session dev pointer in the error path.

Signed-off-by: Tom Parkin &lt;tparkin@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>l2tp: fix a typo in l2tp_eth_dev_recv()</title>
<updated>2012-10-12T20:28:07Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-09-04T19:54:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60e6a188d4cb2ef0fb9865cd7b3d4fca7cf7213e'/>
<id>urn:sha1:60e6a188d4cb2ef0fb9865cd7b3d4fca7cf7213e</id>
<content type='text'>
[ Upstream commit c0cc88a7627c333de50b07b7c60b1d49d9d2e6cc ]

While investigating l2tp bug, I hit a bug in eth_type_trans(),
because not enough bytes were pulled in skb head.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>l2tp: avoid to use synchronize_rcu in tunnel free function</title>
<updated>2012-10-02T16:47:22Z</updated>
<author>
<name>xeb@mail.ru</name>
<email>xeb@mail.ru</email>
</author>
<published>2012-08-24T01:07:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=928863a39f0ee47af97e7e17b909334dcb06cf1e'/>
<id>urn:sha1:928863a39f0ee47af97e7e17b909334dcb06cf1e</id>
<content type='text'>
[ Upstream commit 99469c32f79a32d8481f87be0d3c66dad286f4ec ]

Avoid to use synchronize_rcu in l2tp_tunnel_free because context may be
atomic.

Signed-off-by: Dmitry Kozlov &lt;xeb@mail.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: l2tp_eth: fix kernel panic on rmmod l2tp_eth</title>
<updated>2012-07-16T15:47:36Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-07T00:07:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e99e096f4b388824e49ce5c6568eacf46c94438f'/>
<id>urn:sha1:e99e096f4b388824e49ce5c6568eacf46c94438f</id>
<content type='text'>
[ Upstream commit a06998b88b1651c5f71c0e35f528bf2057188ead ]

We must prevent module unloading if some devices are still attached to
l2tp_eth driver.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Tested-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>l2tp: fix oops in L2TP IP sockets for connect() AF_UNSPEC case</title>
<updated>2012-06-09T15:33:02Z</updated>
<author>
<name>James Chapman</name>
<email>jchapman@katalix.com</email>
</author>
<published>2012-05-29T23:13:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3dc6bc132f2afce8da98e0f047c4cc8ae569d6cb'/>
<id>urn:sha1:3dc6bc132f2afce8da98e0f047c4cc8ae569d6cb</id>
<content type='text'>
[ Upstream commit c51ce49735c183ef2592db70f918ee698716276b ]

An application may call connect() to disconnect a socket using an
address with family AF_UNSPEC. The L2TP IP sockets were not handling
this case when the socket is not bound and an attempt to connect()
using AF_UNSPEC in such cases would result in an oops. This patch
addresses the problem by protecting the sk_prot-&gt;disconnect() call
against trying to unhash the socket before it is bound.

The patch also adds more checks that the sockaddr supplied to bind()
and connect() calls is valid.

 RIP: 0010:[&lt;ffffffff82e133b0&gt;]  [&lt;ffffffff82e133b0&gt;] inet_unhash+0x50/0xd0
 RSP: 0018:ffff88001989be28  EFLAGS: 00010293
 Stack:
  ffff8800407a8000 0000000000000000 ffff88001989be78 ffffffff82e3a249
  ffffffff82e3a050 ffff88001989bec8 ffff88001989be88 ffff8800407a8000
  0000000000000010 ffff88001989bec8 ffff88001989bea8 ffffffff82e42639
 Call Trace:
 [&lt;ffffffff82e3a249&gt;] udp_disconnect+0x1f9/0x290
 [&lt;ffffffff82e42639&gt;] inet_dgram_connect+0x29/0x80
 [&lt;ffffffff82d012fc&gt;] sys_connect+0x9c/0x100

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: l2tp: unlock socket lock before returning from l2tp_ip_sendmsg</title>
<updated>2012-05-21T16:39:59Z</updated>
<author>
<name>Sasha Levin</name>
<email>levinsasha928@gmail.com</email>
</author>
<published>2012-05-02T03:58:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff422223cc56542d31575afd05b02bd1493abf4b'/>
<id>urn:sha1:ff422223cc56542d31575afd05b02bd1493abf4b</id>
<content type='text'>
[ Upstream commit 84768edbb2721637620b2d84501bb0d5aed603f1 ]

l2tp_ip_sendmsg could return without releasing socket lock, making it all the
way to userspace, and generating the following warning:

[  130.891594] ================================================
[  130.894569] [ BUG: lock held when returning to user space! ]
[  130.897257] 3.4.0-rc5-next-20120501-sasha #104 Tainted: G        W
[  130.900336] ------------------------------------------------
[  130.902996] trinity/8384 is leaving the kernel with locks still held!
[  130.906106] 1 lock held by trinity/8384:
[  130.907924]  #0:  (sk_lock-AF_INET){+.+.+.}, at: [&lt;ffffffff82b9503f&gt;] l2tp_ip_sendmsg+0x2f/0x550

Introduced by commit 2f16270 ("l2tp: Fix locking in l2tp_ip.c").

Signed-off-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Fix pppol2tp getsockname()</title>
<updated>2012-04-02T16:27:20Z</updated>
<author>
<name>Benjamin LaHaise</name>
<email>bcrl@kvack.org</email>
</author>
<published>2012-03-20T03:57:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a26d49c67b852cfd9144f86f628f57c8ca00977'/>
<id>urn:sha1:6a26d49c67b852cfd9144f86f628f57c8ca00977</id>
<content type='text'>
[ Upstream commit bbdb32cb5b73597386913d052165423b9d736145 ]

While testing L2TP functionality, I came across a bug in getsockname().  The
IP address returned within the pppol2tp_addr's addr memember was not being
set to the IP  address in use.  This bug is caused by using inet_sk() on the
wrong socket (the L2TP socket rather than the underlying UDP socket), and was
likely introduced during the addition of L2TPv3 support.

Signed-off-by: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
Signed-off-by: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>l2tp: l2tp_ip - fix possible oops on packet receive</title>
<updated>2012-02-03T17:19:04Z</updated>
<author>
<name>James Chapman</name>
<email>jchapman@katalix.com</email>
</author>
<published>2012-01-25T02:39:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1334533665277ccc5568c5104cd2358788a02e02'/>
<id>urn:sha1:1334533665277ccc5568c5104cd2358788a02e02</id>
<content type='text'>
[ Upstream commit 68315801dbf3ab2001679fd2074c9dc5dcf87dfa ]

When a packet is received on an L2TP IP socket (L2TPv3 IP link
encapsulation), the l2tpip socket's backlog_rcv function calls
xfrm4_policy_check(). This is not necessary, since it was called
before the skb was added to the backlog. With CONFIG_NET_NS enabled,
xfrm4_policy_check() will oops if skb-&gt;dev is null, so this trivial
patch removes the call.

This bug has always been present, but only when CONFIG_NET_NS is
enabled does it cause problems. Most users are probably using UDP
encapsulation for L2TP, hence the problem has only recently
surfaced.

EIP: 0060:[&lt;c12bb62b&gt;] EFLAGS: 00210246 CPU: 0
EIP is at l2tp_ip_recvmsg+0xd4/0x2a7
EAX: 00000001 EBX: d77b5180 ECX: 00000000 EDX: 00200246
ESI: 00000000 EDI: d63cbd30 EBP: d63cbd18 ESP: d63cbcf4
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Call Trace:
 [&lt;c1218568&gt;] sock_common_recvmsg+0x31/0x46
 [&lt;c1215c92&gt;] __sock_recvmsg_nosec+0x45/0x4d
 [&lt;c12163a1&gt;] __sock_recvmsg+0x31/0x3b
 [&lt;c1216828&gt;] sock_recvmsg+0x96/0xab
 [&lt;c10b2693&gt;] ? might_fault+0x47/0x81
 [&lt;c10b2693&gt;] ? might_fault+0x47/0x81
 [&lt;c1167fd0&gt;] ? _copy_from_user+0x31/0x115
 [&lt;c121e8c8&gt;] ? copy_from_user+0x8/0xa
 [&lt;c121ebd6&gt;] ? verify_iovec+0x3e/0x78
 [&lt;c1216604&gt;] __sys_recvmsg+0x10a/0x1aa
 [&lt;c1216792&gt;] ? sock_recvmsg+0x0/0xab
 [&lt;c105a99b&gt;] ? __lock_acquire+0xbdf/0xbee
 [&lt;c12d5a99&gt;] ? do_page_fault+0x193/0x375
 [&lt;c10d1200&gt;] ? fcheck_files+0x9b/0xca
 [&lt;c10d1259&gt;] ? fget_light+0x2a/0x9c
 [&lt;c1216bbb&gt;] sys_recvmsg+0x2b/0x43
 [&lt;c1218145&gt;] sys_socketcall+0x16d/0x1a5
 [&lt;c11679f0&gt;] ? trace_hardirqs_on_thunk+0xc/0x10
 [&lt;c100305f&gt;] sysenter_do_call+0x12/0x38
Code: c6 05 8c ea a8 c1 01 e8 0c d4 d9 ff 85 f6 74 07 3e ff 86 80 00 00 00 b9 17 b6 2b c1 ba 01 00 00 00 b8 78 ed 48 c1 e8 23 f6 d9 ff &lt;ff&gt; 76 0c 68 28 e3 30 c1 68 2d 44 41 c1 e8 89 57 01 00 83 c4 0c

Signed-off-by: James Chapman &lt;jchapman@katalix.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>l2tp: fix a potential skb leak in l2tp_xmit_skb()</title>
<updated>2011-11-11T17:36:26Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-10-07T05:35:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c11deb8d898318a2fea9a291b16a7a2b2507cc94'/>
<id>urn:sha1:c11deb8d898318a2fea9a291b16a7a2b2507cc94</id>
<content type='text'>
[ Upstream commit 835acf5da239b91edb9f7ebe36516999e156e6ee ]

l2tp_xmit_skb() can leak one skb if skb_cow_head() returns an error.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared</title>
<updated>2011-08-16T01:31:38Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-07-26T06:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9cf81e790a0d8709cbadbaff73ee40aa944e2ea1'/>
<id>urn:sha1:9cf81e790a0d8709cbadbaff73ee40aa944e2ea1</id>
<content type='text'>
[ Upstream commit 550fd08c2cebad61c548def135f67aba284c6162 ]

After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs.  There are a handful of drivers that violate this assumption of
course, and need to be fixed up.  This patch identifies those drivers, and marks
them as not being able to support the safe transmission of skbs by clearning the
IFF_TX_SKB_SHARING flag in priv_flags

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Karsten Keil &lt;isdn@linux-pingi.de&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Krzysztof Halasa &lt;khc@pm.waw.pl&gt;
CC: "John W. Linville" &lt;linville@tuxdriver.com&gt;
CC: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
CC: Marcel Holtmann &lt;marcel@holtmann.org&gt;
CC: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
