<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv4/ipip.c, branch v3.2.38</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/ipv4/ipip.c?h=v3.2.38</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/ipv4/ipip.c?h=v3.2.38'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-02-03T17:22:20Z</updated>
<entry>
<title>net: reintroduce missing rcu_assign_pointer() calls</title>
<updated>2012-02-03T17:22:20Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-12T04:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4704f3edfdd3cc5918932577373c0dc165d52959'/>
<id>urn:sha1:4704f3edfdd3cc5918932577373c0dc165d52959</id>
<content type='text'>
[ Upstream commit cf778b00e96df6d64f8e21b8395d1f8a859ecdc7 ]

commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to
RCU_INIT_POINTER) did a lot of incorrect changes, since it did a
complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x,
y).

We miss needed barriers, even on x86, when y is not NULL.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
CC: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.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>ipip, sit: copy parms.name after register_netdevice</title>
<updated>2011-12-12T23:50:51Z</updated>
<author>
<name>Ted Feng</name>
<email>artisdom@gmail.com</email>
</author>
<published>2011-12-08T00:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=72b36015ba43a3cca5303f5534d2c3e1899eae29'/>
<id>urn:sha1:72b36015ba43a3cca5303f5534d2c3e1899eae29</id>
<content type='text'>
Same fix as 731abb9cb2 for ipip and sit tunnel.
Commit 1c5cae815d removed an explicit call to dev_alloc_name in
ipip_tunnel_locate and ipip6_tunnel_locate, because register_netdevice
will now create a valid name, however the tunnel keeps a copy of the
name in the private parms structure. Fix this by copying the name back
after register_netdevice has successfully returned.

This shows up if you do a simple tunnel add, followed by a tunnel show:

$ sudo ip tunnel add mode ipip remote 10.2.20.211
$ ip tunnel
tunl0: ip/ip  remote any  local any  ttl inherit  nopmtudisc
tunl%d: ip/ip  remote 10.2.20.211  local any  ttl inherit
$ sudo ip tunnel add mode sit remote 10.2.20.212
$ ip tunnel
sit0: ipv6/ip  remote any  local any  ttl 64  nopmtudisc 6rd-prefix 2002::/16
sit%d: ioctl 89f8 failed: No such device
sit%d: ipv6/ip  remote 10.2.20.212  local any  ttl inherit

Cc: stable@vger.kernel.org
Signed-off-by: Ted Feng &lt;artisdom@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER</title>
<updated>2011-08-02T11:29:23Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2011-08-01T16:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a9b3cd7f323b2e57593e7215362a7b02fc933e3a'/>
<id>urn:sha1:a9b3cd7f323b2e57593e7215362a7b02fc933e3a</id>
<content type='text'>
When assigning a NULL value to an RCU protected pointer, no barrier
is needed. The rcu_assign_pointer, used to handle that but will soon
change to not handle the special case.

Convert all rcu_assign_pointer of NULL value.

//smpl
@@ expression P; @@

- rcu_assign_pointer(P, NULL)
+ RCU_INIT_POINTER(P, NULL)

// &lt;/smpl&gt;

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: call dev_alloc_name from register_netdevice</title>
<updated>2011-05-05T17:57:45Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jpirko@redhat.com</email>
</author>
<published>2011-04-30T01:21:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c5cae815d19ffe02bdfda1260949ef2b1806171'/>
<id>urn:sha1:1c5cae815d19ffe02bdfda1260949ef2b1806171</id>
<content type='text'>
Force dev_alloc_name() to be called from register_netdevice() by
dev_get_valid_name(). That allows to remove multiple explicit
dev_alloc_name() calls.

The possibility to call dev_alloc_name in advance remains.

This also fixes veth creation regresion caused by
84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743

Signed-off-by: Jiri Pirko &lt;jpirko@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Use flowi4-&gt;{daddr,saddr} in ipip_tunnel_xmit().</title>
<updated>2011-05-04T18:10:28Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-04T18:10:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=69458cb194e82972347a004054e0baed719ed008'/>
<id>urn:sha1:69458cb194e82972347a004054e0baed719ed008</id>
<content type='text'>
Instead of rt-&gt;rt_{dst,src}

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Make caller provide on-stack flow key to ip_route_output_ports().</title>
<updated>2011-05-04T03:25:42Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-04T03:25:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=31e4543db29fb85496a122b965d6482c8d1a2bfe'/>
<id>urn:sha1:31e4543db29fb85496a122b965d6482c8d1a2bfe</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>inet: constify ip headers and in6_addr</title>
<updated>2011-04-22T18:04:14Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-04-22T04:53:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b71d1d426d263b0b6cb5760322efebbfc89d4463'/>
<id>urn:sha1:b71d1d426d263b0b6cb5760322efebbfc89d4463</id>
<content type='text'>
Add const qualifiers to structs iphdr, ipv6hdr and in6_addr pointers
where possible, to make code intention more obvious.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Create and use route lookup helpers.</title>
<updated>2011-03-12T23:08:42Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-03-12T05:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=78fbfd8a653ca972afe479517a40661bfff6d8c3'/>
<id>urn:sha1:78fbfd8a653ca972afe479517a40661bfff6d8c3</id>
<content type='text'>
The idea here is this minimizes the number of places one has to edit
in order to make changes to how flows are defined and used.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-03-10T22:26:00Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-03-10T22:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=33175d84ee3fa29991adb80513683e010769e807'/>
<id>urn:sha1:33175d84ee3fa29991adb80513683e010769e807</id>
<content type='text'>
Conflicts:
	drivers/net/bnx2x/bnx2x_cmn.c
</content>
</entry>
<entry>
<title>net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules</title>
<updated>2011-03-09T23:25:19Z</updated>
<author>
<name>Vasiliy Kulikov</name>
<email>segoon@openwall.com</email>
</author>
<published>2011-03-01T21:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8909c9ad8ff03611c9c96c9a92656213e4bb495b'/>
<id>urn:sha1:8909c9ad8ff03611c9c96c9a92656213e4bb495b</id>
<content type='text'>
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/.  This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**.  However, CAP_NET_ADMIN capability shouldn't
allow anybody load any module not related to networking.

This patch restricts an ability of autoloading modules to netdev modules
with explicit aliases.  This fixes CVE-2011-1019.

Arnd Bergmann suggested to leave untouched the old pre-v2.6.32 behavior
of loading netdev modules by name (without any prefix) for processes
with CAP_SYS_MODULE to maintain the compatibility with network scripts
that use autoloading netdev modules by aliases like "eth0", "wlan0".

Currently there are only three users of the feature in the upstream
kernel: ipip, ip_gre and sit.

    root@albatros:~# capsh --drop=$(seq -s, 0 11),$(seq -s, 13 34) --
    root@albatros:~# grep Cap /proc/$$/status
    CapInh:	0000000000000000
    CapPrm:	fffffff800001000
    CapEff:	fffffff800001000
    CapBnd:	fffffff800001000
    root@albatros:~# modprobe xfs
    FATAL: Error inserting xfs
    (/lib/modules/2.6.38-rc6-00001-g2bf4ca3/kernel/fs/xfs/xfs.ko): Operation not permitted
    root@albatros:~# lsmod | grep xfs
    root@albatros:~# ifconfig xfs
    xfs: error fetching interface information: Device not found
    root@albatros:~# lsmod | grep xfs
    root@albatros:~# lsmod | grep sit
    root@albatros:~# ifconfig sit
    sit: error fetching interface information: Device not found
    root@albatros:~# lsmod | grep sit
    root@albatros:~# ifconfig sit0
    sit0      Link encap:IPv6-in-IPv4
	      NOARP  MTU:1480  Metric:1

    root@albatros:~# lsmod | grep sit
    sit                    10457  0
    tunnel4                 2957  1 sit

For CAP_SYS_MODULE module loading is still relaxed:

    root@albatros:~# grep Cap /proc/$$/status
    CapInh:	0000000000000000
    CapPrm:	ffffffffffffffff
    CapEff:	ffffffffffffffff
    CapBnd:	ffffffffffffffff
    root@albatros:~# ifconfig xfs
    xfs: error fetching interface information: Device not found
    root@albatros:~# lsmod | grep xfs
    xfs                   745319  0

Reference: https://lkml.org/lkml/2011/2/24/203

Signed-off-by: Vasiliy Kulikov &lt;segoon@openwall.com&gt;
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Kees Cook &lt;kees.cook@canonical.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
