<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/l2tp, branch v3.0.90</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/l2tp?h=v3.0.90</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/l2tp?h=v3.0.90'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-28T23:18:38Z</updated>
<entry>
<title>l2tp: add missing .owner to struct pppox_proto</title>
<updated>2013-07-28T23:18:38Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2013-07-02T01:02:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b482bb76dfd1389e4406c27c1005addf1dea08b'/>
<id>urn:sha1:3b482bb76dfd1389e4406c27c1005addf1dea08b</id>
<content type='text'>
[ Upstream commit e1558a93b61962710733dc8c11a2bc765607f1cd ]

Add missing .owner of struct pppox_proto. This prevents the
module from being removed from underneath its users.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&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 sendmsg() return value</title>
<updated>2013-06-27T17:34:33Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2013-06-12T14:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60ab7833a93b180b420a18e24e88e3a9528a7038'/>
<id>urn:sha1:60ab7833a93b180b420a18e24e88e3a9528a7038</id>
<content type='text'>
[ Upstream commit a6f79d0f26704214b5b702bbac525cb72997f984 ]

PPPoL2TP sockets should comply with the standard send*() return values
(i.e. return number of bytes sent instead of 0 upon success).

Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&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 PPP header erasure and memory leak</title>
<updated>2013-06-27T17:34:33Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2013-06-12T14:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6e092615d27d7036832c18f1c14b691c6c1cbb1d'/>
<id>urn:sha1:6e092615d27d7036832c18f1c14b691c6c1cbb1d</id>
<content type='text'>
[ Upstream commit 55b92b7a11690bc377b5d373872a6b650ae88e64 ]

Copy user data after PPP framing header. This prevents erasure of the
added PPP header and avoids leaking two bytes of uninitialised memory
at the end of skb's data buffer.

Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&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: Restore socket refcount when sendmsg succeeds</title>
<updated>2013-03-20T19:58:53Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2013-03-01T05:02:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a965143b0d56545cf931fb34fe9464df457d2188'/>
<id>urn:sha1:a965143b0d56545cf931fb34fe9464df457d2188</id>
<content type='text'>
[ Upstream commit 8b82547e33e85fc24d4d172a93c796de1fefa81a ]

The sendmsg() syscall handler for PPPoL2TP doesn't decrease the socket
reference counter after successful transmissions. Any successful
sendmsg() call from userspace will then increase the reference counter
forever, thus preventing the kernel's session and tunnel data from
being freed later on.

The problem only happens when writing directly on L2TP sockets.
PPP sockets attached to L2TP are unaffected as the PPP subsystem
uses pppol2tp_xmit() which symmetrically increase/decrease reference
counters.

This patch adds the missing call to sock_put() before returning from
pppol2tp_sendmsg().

Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&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_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>
</feed>
