<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/smack, branch v3.11.6</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security/smack?h=v3.11.6</id>
<link rel='self' href='https://git.amat.us/linux/atom/security/smack?h=v3.11.6'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-06T10:53:54Z</updated>
<entry>
<title>Smack: IPv6 casting error fix for 3.11</title>
<updated>2013-08-06T10:53:54Z</updated>
<author>
<name>Casey Schaufler</name>
<email>casey@schaufler-ca.com</email>
</author>
<published>2013-08-05T20:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ea062475a9a2ea6e1394487fa0e51b3459957d1'/>
<id>urn:sha1:6ea062475a9a2ea6e1394487fa0e51b3459957d1</id>
<content type='text'>
The original implementation of the Smack IPv6 port based
local controls works most of the time using a sockaddr as
a temporary variable, but not always as it overflows in
some circumstances. The correct data is a sockaddr_in6.
A struct sockaddr isn't as large as a struct sockaddr_in6.
There would need to be casting one way or the other. This
patch gets it the right way.

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'nfs-for-3.11-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2013-07-09T19:09:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-07-09T19:09:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=be0c5d8c0bb0023e11f5c6d38e90f7b0f24edb64'/>
<id>urn:sha1:be0c5d8c0bb0023e11f5c6d38e90f7b0f24edb64</id>
<content type='text'>
Pull NFS client updates from Trond Myklebust:
 "Feature highlights include:
   - Add basic client support for NFSv4.2
   - Add basic client support for Labeled NFS (selinux for NFSv4.2)
   - Fix the use of credentials in NFSv4.1 stateful operations, and add
     support for NFSv4.1 state protection.

  Bugfix highlights:
   - Fix another NFSv4 open state recovery race
   - Fix an NFSv4.1 back channel session regression
   - Various rpc_pipefs races
   - Fix another issue with NFSv3 auth negotiation

  Please note that Labeled NFS does require some additional support from
  the security subsystem.  The relevant changesets have all been
  reviewed and acked by James Morris."

* tag 'nfs-for-3.11-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (54 commits)
  NFS: Set NFS_CS_MIGRATION for NFSv4 mounts
  NFSv4.1 Refactor nfs4_init_session and nfs4_init_channel_attrs
  nfs: have NFSv3 try server-specified auth flavors in turn
  nfs: have nfs_mount fake up a auth_flavs list when the server didn't provide it
  nfs: move server_authlist into nfs_try_mount_request
  nfs: refactor "need_mount" code out of nfs_try_mount
  SUNRPC: PipeFS MOUNT notification optimization for dying clients
  SUNRPC: split client creation routine into setup and registration
  SUNRPC: fix races on PipeFS UMOUNT notifications
  SUNRPC: fix races on PipeFS MOUNT notifications
  NFSv4.1 use pnfs_device maxcount for the objectlayout gdia_maxcount
  NFSv4.1 use pnfs_device maxcount for the blocklayout gdia_maxcount
  NFSv4.1 Fix gdia_maxcount calculation to fit in ca_maxresponsesize
  NFS: Improve legacy idmapping fallback
  NFSv4.1 end back channel session draining
  NFS: Apply v4.1 capabilities to v4.2
  NFSv4.1: Clean up layout segment comparison helper names
  NFSv4.1: layout segment comparison helpers should take 'const' parameters
  NFSv4: Move the DNS resolver into the NFSv4 module
  rpc_pipefs: only set rpc_dentry_ops if d_op isn't already set
  ...
</content>
</entry>
<entry>
<title>Security: Add Hook to test if the particular xattr is part of a MAC model.</title>
<updated>2013-06-08T20:20:11Z</updated>
<author>
<name>David Quigley</name>
<email>dpquigl@davequigley.com</email>
</author>
<published>2013-05-22T16:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=746df9b59c8a5f162c907796c7295d3c4c0d8995'/>
<id>urn:sha1:746df9b59c8a5f162c907796c7295d3c4c0d8995</id>
<content type='text'>
The interface to request security labels from user space is the xattr
interface. When requesting the security label from an NFS server it is
important to make sure the requested xattr actually is a MAC label. This allows
us to make sure that we get the desired semantics from the attribute instead of
something else such as capabilities or a time based LSM.

Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: Matthew N. Dodd &lt;Matthew.Dodd@sparta.com&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>Smack: Fix the bug smackcipso can't set CIPSO correctly</title>
<updated>2013-06-03T17:56:02Z</updated>
<author>
<name>Passion,Zhao</name>
<email>passion.zhao@intel.com</email>
</author>
<published>2013-06-03T03:42:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0fcfee61d63b82c1eefb5b1a914240480f17d63f'/>
<id>urn:sha1:0fcfee61d63b82c1eefb5b1a914240480f17d63f</id>
<content type='text'>
Bug report: https://tizendev.org/bugs/browse/TDIS-3891

The reason is userspace libsmack only use "smackfs/cipso2" long-label interface,
but the code's logical is still for orginal fixed length label. Now update
smack_cipso_apply() to support flexible label (&lt;=256 including tailing '\0')

There is also a bug in kernel/security/smack/smackfs.c:
When smk_set_cipso() parsing the CIPSO setting from userspace, the offset of
CIPSO level should be "strlen(label)+1" instead of "strlen(label)"

Signed-off-by: Passion,Zhao &lt;passion.zhao@intel.com&gt;
</content>
</entry>
<entry>
<title>Smack: Fix possible NULL pointer dereference at smk_netlbl_mls()</title>
<updated>2013-05-28T17:15:35Z</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2013-05-27T11:11:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8cd77a0bd4b4a7d02c2a6926a69585d8088ee721'/>
<id>urn:sha1:8cd77a0bd4b4a7d02c2a6926a69585d8088ee721</id>
<content type='text'>
netlbl_secattr_catmap_alloc(GFP_ATOMIC) can return NULL.

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
</content>
</entry>
<entry>
<title>Smack: Add smkfstransmute mount option</title>
<updated>2013-05-28T17:08:44Z</updated>
<author>
<name>Casey Schaufler</name>
<email>casey@schaufler-ca.com</email>
</author>
<published>2013-05-23T01:43:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e830b39412ca2bbedd7508243f21c04d57ad543c'/>
<id>urn:sha1:e830b39412ca2bbedd7508243f21c04d57ad543c</id>
<content type='text'>
Suppliment the smkfsroot mount option with another, smkfstransmute,
that does the same thing but also marks the root inode as
transmutting. This allows a freshly created filesystem to
be mounted with a transmutting heirarchy.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: Improve access check performance</title>
<updated>2013-05-28T17:08:32Z</updated>
<author>
<name>Casey Schaufler</name>
<email>casey@schaufler-ca.com</email>
</author>
<published>2013-05-23T01:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2f823ff8bec03a1e6f9e11fd0c4d54e4c7d09532'/>
<id>urn:sha1:2f823ff8bec03a1e6f9e11fd0c4d54e4c7d09532</id>
<content type='text'>
Each Smack label that the kernel has seen is added to a
list of labels. The list of access rules for a given subject
label hangs off of the label list entry for the label.
This patch changes the structures that contain subject
labels to point at the label list entry rather that the
label itself. Doing so removes a label list lookup in
smk_access() that was accounting for the largest single
chunk of Smack overhead.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: Local IPv6 port based controls</title>
<updated>2013-05-28T17:08:26Z</updated>
<author>
<name>Casey Schaufler</name>
<email>casey@schaufler-ca.com</email>
</author>
<published>2013-05-23T01:42:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c673944347edfd4362b10eea11ac384a582b1cf5'/>
<id>urn:sha1:c673944347edfd4362b10eea11ac384a582b1cf5</id>
<content type='text'>
Smack does not provide access controls on IPv6 communications.
This patch introduces a mechanism for maintaining Smack lables
for local IPv6 communications. It is based on labeling local ports.
The behavior should be compatible with any future "real" IPv6
support as it provides no interfaces for users to manipulate
the labeling. Remote IPv6 connections use the ambient label
the same way that unlabeled IPv4 packets are treated.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: include magic.h in smackfs.c</title>
<updated>2013-04-03T02:13:51Z</updated>
<author>
<name>Casey Schaufler</name>
<email>casey@schaufler-ca.com</email>
</author>
<published>2013-04-02T18:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=958d2c2f4ad905e3ffa1711d19184d21d9b00cc1'/>
<id>urn:sha1:958d2c2f4ad905e3ffa1711d19184d21d9b00cc1</id>
<content type='text'>
As reported for linux-next: Tree for Apr 2 (smack)
Add the required include for smackfs.c

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>Fix NULL pointer dereference in smack_inode_unlink() and smack_inode_rmdir()</title>
<updated>2013-03-19T21:38:17Z</updated>
<author>
<name>Igor Zhbanov</name>
<email>i.zhbanov@samsung.com</email>
</author>
<published>2013-03-19T09:49:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cdb56b60884c687ea396ae96a418554739b40129'/>
<id>urn:sha1:cdb56b60884c687ea396ae96a418554739b40129</id>
<content type='text'>
This patch fixes kernel Oops because of wrong common_audit_data type
in smack_inode_unlink() and smack_inode_rmdir().

When SMACK security module is enabled and SMACK logging is on (/smack/logging
is not zero) and you try to delete the file which
1) you cannot delete due to SMACK rules and logging of failures is on
or
2) you can delete and logging of success is on,

you will see following:

	Unable to handle kernel NULL pointer dereference at virtual address 000002d7

	[&lt;...&gt;] (strlen+0x0/0x28)
	[&lt;...&gt;] (audit_log_untrustedstring+0x14/0x28)
	[&lt;...&gt;] (common_lsm_audit+0x108/0x6ac)
	[&lt;...&gt;] (smack_log+0xc4/0xe4)
	[&lt;...&gt;] (smk_curacc+0x80/0x10c)
	[&lt;...&gt;] (smack_inode_unlink+0x74/0x80)
	[&lt;...&gt;] (security_inode_unlink+0x2c/0x30)
	[&lt;...&gt;] (vfs_unlink+0x7c/0x100)
	[&lt;...&gt;] (do_unlinkat+0x144/0x16c)

The function smack_inode_unlink() (and smack_inode_rmdir()) need
to log two structures of different types. First of all it does:

	smk_ad_init(&amp;ad, __func__, LSM_AUDIT_DATA_DENTRY);
	smk_ad_setfield_u_fs_path_dentry(&amp;ad, dentry);

This will set common audit data type to LSM_AUDIT_DATA_DENTRY
and store dentry for auditing (by function smk_curacc(), which in turn calls
dump_common_audit_data(), which is actually uses provided data and logs it).

	/*
	 * You need write access to the thing you're unlinking
	 */
	rc = smk_curacc(smk_of_inode(ip), MAY_WRITE, &amp;ad);
	if (rc == 0) {
		/*
		 * You also need write access to the containing directory
		 */

Then this function wants to log anoter data:

		smk_ad_setfield_u_fs_path_dentry(&amp;ad, NULL);
		smk_ad_setfield_u_fs_inode(&amp;ad, dir);

The function sets inode field, but don't change common_audit_data type.

		rc = smk_curacc(smk_of_inode(dir), MAY_WRITE, &amp;ad);
	}

So the dump_common_audit() function incorrectly interprets inode structure
as dentry, and Oops will happen.

This patch reinitializes common_audit_data structures with correct type.
Also I removed unneeded
	smk_ad_setfield_u_fs_path_dentry(&amp;ad, NULL);
initialization, because both dentry and inode pointers are stored
in the same union.

Signed-off-by: Igor Zhbanov &lt;i.zhbanov@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
</content>
</entry>
</feed>
