<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netlabel, branch v5.10</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=v5.10</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.10'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-11-14T20:07:57Z</updated>
<entry>
<title>netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist()</title>
<updated>2020-11-14T20:07:57Z</updated>
<author>
<name>Paul Moore</name>
<email>paul@paul-moore.com</email>
</author>
<published>2020-11-13T21:30:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ba86d4366e023d96df3dbe415eea7f1dc08c303'/>
<id>urn:sha1:1ba86d4366e023d96df3dbe415eea7f1dc08c303</id>
<content type='text'>
Static checking revealed that a previous fix to
netlbl_unlabel_staticlist() leaves a stack variable uninitialized,
this patches fixes that.

Fixes: 866358ec331f ("netlabel: fix our progress tracking in netlbl_unlabel_staticlist()")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Reviewed-by: James Morris &lt;jamorris@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/160530304068.15651.18355773009751195447.stgit@sifl
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netlabel: fix our progress tracking in netlbl_unlabel_staticlist()</title>
<updated>2020-11-10T23:31:46Z</updated>
<author>
<name>Paul Moore</name>
<email>paul@paul-moore.com</email>
</author>
<published>2020-11-08T14:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=866358ec331f8faa394995fb4b511af1db0247c8'/>
<id>urn:sha1:866358ec331f8faa394995fb4b511af1db0247c8</id>
<content type='text'>
The current NetLabel code doesn't correctly keep track of the netlink
dump state in some cases, in particular when multiple interfaces with
large configurations are loaded.  The problem manifests itself by not
reporting the full configuration to userspace, even though it is
loaded and active in the kernel.  This patch fixes this by ensuring
that the dump state is properly reset when necessary inside the
netlbl_unlabel_staticlist() function.

Fixes: 8cc44579d1bd ("NetLabel: Introduce static network labels for unlabeled connections")
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Link: https://lore.kernel.org/r/160484450633.3752.16512718263560813473.stgit@sifl
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>genetlink: move to smaller ops wherever possible</title>
<updated>2020-10-03T02:11:11Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-10-02T21:49:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=66a9b9287d2447a91cef2fafc648dee32186f708'/>
<id>urn:sha1:66a9b9287d2447a91cef2fafc648dee32186f708</id>
<content type='text'>
Bulk of the genetlink users can use smaller ops, move them.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlabel: Fix some kernel-doc warnings</title>
<updated>2020-09-09T03:04:27Z</updated>
<author>
<name>Wang Hai</name>
<email>wanghai38@huawei.com</email>
</author>
<published>2020-09-08T14:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c70b2681766ebc0fa4ffa6eb47bd9c858adfef1'/>
<id>urn:sha1:8c70b2681766ebc0fa4ffa6eb47bd9c858adfef1</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

net/netlabel/netlabel_calipso.c:438: warning: Excess function parameter 'audit_secid' description in 'calipso_doi_remove'
net/netlabel/netlabel_calipso.c:605: warning: Excess function parameter 'reg' description in 'calipso_req_delattr'

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Wang Hai &lt;wanghai38@huawei.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.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/netdev/net</title>
<updated>2020-09-05T04:28:59Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-09-05T04:18:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=44a8c4f33c0073ca614db79f22e023811bdd0f3c'/>
<id>urn:sha1:44a8c4f33c0073ca614db79f22e023811bdd0f3c</id>
<content type='text'>
We got slightly different patches removing a double word
in a comment in net/ipv4/raw.c - picked the version from net.

Simple conflict in drivers/net/ethernet/ibm/ibmvnic.c. Use cached
values instead of VNIC login response buffer (following what
commit 507ebe6444a4 ("ibmvnic: Fix use-after-free of VNIC login
response buffer") did).

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netlabel: remove unused param from audit_log_format()</title>
<updated>2020-08-28T16:08:51Z</updated>
<author>
<name>Alex Dewar</name>
<email>alex.dewar90@gmail.com</email>
</author>
<published>2020-08-28T13:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f091e43310f5c292b7094f9f115e651358e8053'/>
<id>urn:sha1:0f091e43310f5c292b7094f9f115e651358e8053</id>
<content type='text'>
Commit d3b990b7f327 ("netlabel: fix problems with mapping removal")
added a check to return an error if ret_val != 0, before ret_val is
later used in a log message. Now it will unconditionally print "...
res=1". So just drop the check.

Addresses-Coverity: ("Dead code")
Fixes: d3b990b7f327 ("netlabel: fix problems with mapping removal")
Signed-off-by: Alex Dewar &lt;alex.dewar90@gmail.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlabel: fix problems with mapping removal</title>
<updated>2020-08-24T23:08:00Z</updated>
<author>
<name>Paul Moore</name>
<email>paul@paul-moore.com</email>
</author>
<published>2020-08-21T20:34:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3b990b7f327e2afa98006e7666fb8ada8ed8683'/>
<id>urn:sha1:d3b990b7f327e2afa98006e7666fb8ada8ed8683</id>
<content type='text'>
This patch fixes two main problems seen when removing NetLabel
mappings: memory leaks and potentially extra audit noise.

The memory leaks are caused by not properly free'ing the mapping's
address selector struct when free'ing the entire entry as well as
not properly cleaning up a temporary mapping entry when adding new
address selectors to an existing entry.  This patch fixes both these
problems such that kmemleak reports no NetLabel associated leaks
after running the SELinux test suite.

The potentially extra audit noise was caused by the auditing code in
netlbl_domhsh_remove_entry() being called regardless of the entry's
validity.  If another thread had already marked the entry as invalid,
but not removed/free'd it from the list of mappings, then it was
possible that an additional mapping removal audit record would be
generated.  This patch fixes this by returning early from the removal
function when the entry was previously marked invalid.  This change
also had the side benefit of improving the code by decreasing the
indentation level of large chunk of code by one (accounting for most
of the diffstat).

Fixes: 63c416887437 ("netlabel: Add network address selectors to the NetLabel/LSM domain mapping")
Reported-by: Stephen Smalley &lt;stephen.smalley.work@gmail.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: netlabel: kerneldoc fixes</title>
<updated>2020-07-14T00:20:40Z</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2020-07-12T23:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=26c3baaa0956ffabc1e3ede7f6933bd0dc9cb373'/>
<id>urn:sha1:26c3baaa0956ffabc1e3ede7f6933bd0dc9cb373</id>
<content type='text'>
Simple fixes which require no deep knowledge of the code.

Cc: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>treewide: replace '---help---' in Kconfig files with 'help'</title>
<updated>2020-06-13T16:57:21Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-06-13T16:50:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7f7f6248d9740d710fd6bd190293fe5e16410ac'/>
<id>urn:sha1:a7f7f6248d9740d710fd6bd190293fe5e16410ac</id>
<content type='text'>
Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
'---help---'"), the number of '---help---' has been gradually
decreasing, but there are still more than 2400 instances.

This commit finishes the conversion. While I touched the lines,
I also fixed the indentation.

There are a variety of indentation styles found.

  a) 4 spaces + '---help---'
  b) 7 spaces + '---help---'
  c) 8 spaces + '---help---'
  d) 1 space + 1 tab + '---help---'
  e) 1 tab + '---help---'    (correct indentation)
  f) 1 tab + 1 space + '---help---'
  g) 1 tab + 2 spaces + '---help---'

In order to convert all of them to 1 tab + 'help', I ran the
following commend:

  $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>netlabel: cope with NULL catmap</title>
<updated>2020-05-13T01:12:40Z</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2020-05-12T12:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eead1c2ea2509fd754c6da893a94f0e69e83ebe4'/>
<id>urn:sha1:eead1c2ea2509fd754c6da893a94f0e69e83ebe4</id>
<content type='text'>
The cipso and calipso code can set the MLS_CAT attribute on
successful parsing, even if the corresponding catmap has
not been allocated, as per current configuration and external
input.

Later, selinux code tries to access the catmap if the MLS_CAT flag
is present via netlbl_catmap_getlong(). That may cause null ptr
dereference while processing incoming network traffic.

Address the issue setting the MLS_CAT flag only if the catmap is
really allocated. Additionally let netlbl_catmap_getlong() cope
with NULL catmap.

Reported-by: Matthew Sheets &lt;matthew.sheets@gd-ms.com&gt;
Fixes: 4b8feff251da ("netlabel: fix the horribly broken catmap functions")
Fixes: ceba1832b1b2 ("calipso: Set the calipso socket label to match the secattr.")
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
