<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netlink, branch v3.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-12-18T04:50:51Z</updated>
<entry>
<title>netlink: validate addr_len on bind</title>
<updated>2012-12-18T04:50:51Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2012-12-15T15:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e4b53768f1ddce38b7f6edcad3a063020ef0024'/>
<id>urn:sha1:4e4b53768f1ddce38b7f6edcad3a063020ef0024</id>
<content type='text'>
Otherwise an out of bounds read could happen.

Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlink: change presentation of portid in procfs to unsigned</title>
<updated>2012-12-18T04:50:51Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2012-12-15T15:09:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f1e0ad0ad3e19fce3df864502e9f419204397d7'/>
<id>urn:sha1:9f1e0ad0ad3e19fce3df864502e9f419204397d7</id>
<content type='text'>
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Allow userns root to control llc, netfilter, netlink, packet, and xfrm</title>
<updated>2012-11-19T01:32:45Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-11-16T03:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df008c91f83583e662ac54aee00004afc3f1894d'/>
<id>urn:sha1:df008c91f83583e662ac54aee00004afc3f1894d</id>
<content type='text'>
Allow an unpriviled user who has created a user namespace, and then
created a network namespace to effectively use the new network
namespace, by reducing capable(CAP_NET_ADMIN) and
capable(CAP_NET_RAW) calls to be ns_capable(net-&gt;user_ns,
CAP_NET_ADMIN), or capable(net-&gt;user_ns, CAP_NET_RAW) calls.

Allow creation of af_key sockets.
Allow creation of llc sockets.
Allow creation of af_packet sockets.

Allow sending xfrm netlink control messages.

Allow binding to netlink multicast groups.
Allow sending to netlink multicast groups.
Allow adding and dropping netlink multicast groups.
Allow sending to all netlink multicast groups and port ids.

Allow reading the netfilter SO_IP_SET socket option.
Allow sending netfilter netlink messages.
Allow setting and getting ip_vs netfilter socket options.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlink: use kfree_rcu() in netlink_release()</title>
<updated>2012-10-18T19:34:30Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-10-18T03:21:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6d772ac5578f711d1ce7b03535d1c95bffb21dff'/>
<id>urn:sha1:6d772ac5578f711d1ce7b03535d1c95bffb21dff</id>
<content type='text'>
On some suspend/resume operations involving wimax device, we have
noticed some intermittent memory corruptions in netlink code.

Stéphane Marchesin tracked this corruption in netlink_update_listeners()
and suggested a patch.

It appears netlink_release() should use kfree_rcu() instead of kfree()
for the listeners structure as it may be used by other cpus using RCU
protection.

netlink_release() must set to NULL the listeners pointer when
it is about to be freed.

Also have to protect netlink_update_listeners() and
netlink_has_listeners() if listeners is NULL.

Add a nl_deref_protected() lockdep helper to properly document which
locks protects us.

Reported-by: Jonathan Kliegman &lt;kliegs@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Stéphane Marchesin &lt;marcheu@google.com&gt;
Cc: Sam Leffler &lt;sleffler@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlink: add reference of module in netlink_dump_start</title>
<updated>2012-10-07T04:30:56Z</updated>
<author>
<name>Gao feng</name>
<email>gaofeng@cn.fujitsu.com</email>
</author>
<published>2012-10-04T20:15:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6dc878a8ca39e93f70c42f3dd7260bde10c1e0f1'/>
<id>urn:sha1:6dc878a8ca39e93f70c42f3dd7260bde10c1e0f1</id>
<content type='text'>
I get a panic when I use ss -a and rmmod inet_diag at the
same time.

It's because netlink_dump uses inet_diag_dump which belongs to module
inet_diag.

I search the codes and find many modules have the same problem.  We
need to add a reference to the module which the cb-&gt;dump belongs to.

Thanks for all help from Stephen,Jan,Eric,Steffen and Pablo.

Change From v3:
change netlink_dump_start to inline,suggestion from Pablo and
Eric.

Change From v2:
delete netlink_dump_done,and call module_put in netlink_dump
and netlink_sock_destruct.

Signed-off-by: Gao feng &lt;gaofeng@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlink: Rename pid to portid to avoid confusion</title>
<updated>2012-09-10T19:30:41Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-09-07T20:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15e473046cb6e5d18a4d0057e61d76315230382b'/>
<id>urn:sha1:15e473046cb6e5d18a4d0057e61d76315230382b</id>
<content type='text'>
It is a frequent mistake to confuse the netlink port identifier with a
process identifier.  Try to reduce this confusion by renaming fields
that hold port identifiers portid instead of pid.

I have carefully avoided changing the structures exported to
userspace to avoid changing the userspace API.

I have successfully built an allyesconfig kernel with this change.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlink: hide struct module parameter in netlink_kernel_create</title>
<updated>2012-09-08T22:46:30Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2012-09-08T02:53:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e'/>
<id>urn:sha1:9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e</id>
<content type='text'>
This patch defines netlink_kernel_create as a wrapper function of
__netlink_kernel_create to hide the struct module *me parameter
(which seems to be THIS_MODULE in all existing netlink subsystems).

Suggested by David S. Miller.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlink: kill netlink_set_nonroot</title>
<updated>2012-09-08T22:45:27Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2012-09-08T02:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9785e10aedfa0fad5c1aac709dce5ada1b123783'/>
<id>urn:sha1:9785e10aedfa0fad5c1aac709dce5ada1b123783</id>
<content type='text'>
Replace netlink_set_nonroot by one new field `flags' in
struct netlink_kernel_cfg that is passed to netlink_kernel_create.

This patch also renames NL_NONROOT_* to NL_CFG_F_NONROOT_* since
now the flags field in nl_table is generic (so we can add more
flags if needed in the future).

Also adjust all callers in the net-next tree to use these flags
instead of netlink_set_nonroot.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>scm: Don't use struct ucred in NETLINK_CB and struct scm_cookie.</title>
<updated>2012-09-07T18:42:05Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-09-06T18:20:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbe9a4173ea53b72b2c35d19f676a85b69f1c9fe'/>
<id>urn:sha1:dbe9a4173ea53b72b2c35d19f676a85b69f1c9fe</id>
<content type='text'>
Passing uids and gids on NETLINK_CB from a process in one user
namespace to a process in another user namespace can result in the
wrong uid or gid being presented to userspace.  Avoid that problem by
passing kuids and kgids instead.

- define struct scm_creds for use in scm_cookie and netlink_skb_parms
  that holds uid and gid information in kuid_t and kgid_t.

- Modify scm_set_cred to fill out scm_creds by heand instead of using
  cred_to_ucred to fill out struct ucred.  This conversion ensures
  userspace does not get incorrect uid or gid values to look at.

- Modify scm_recv to convert from struct scm_creds to struct ucred
  before copying credential values to userspace.

- Modify __scm_send to populate struct scm_creds on in the scm_cookie,
  instead of just copying struct ucred from userspace.

- Modify netlink_sendmsg to copy scm_creds instead of struct ucred
  into the NETLINK_CB.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-08-31T19:14:18Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-08-31T19:14:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c32f38619af6302da58835fb292b159bdd96d11f'/>
<id>urn:sha1:c32f38619af6302da58835fb292b159bdd96d11f</id>
<content type='text'>
Merge the 'net' tree to get the recent set of netfilter bug fixes in
order to assist with some merge hassles Pablo is going to have to deal
with for upcoming changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
