lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 27 Oct 2008 22:51:45 -0700
From:	Casey Schaufler <casey@...aufler-ca.com>
To:	Rob MacKinnon <c4blem0nkey@...il.com>
CC:	Andreas Gruenbacher <agruen@...e.de>,
	Stephen Smalley <sds@...ho.nsa.gov>, rob.mackinnon@...il.com,
	hpa@...or.com, hugh@...itas.com, linux-kernel@...r.kernel.org,
	casey@...aufler-ca.com
Subject: Re: tmpfs support of xattrs?

Rob MacKinnon wrote:
> Andreas Gruenbacher wrote:
>   
>> On Monday, 27 October 2008 21:25:31 Stephen Smalley wrote:
>>     
>>> Looks like a bug in Smack's implementation of the inode_listsecurity
>>> hook to me.  Did you mean to enable Smack in your kernel config?
>>>       
>> Yes, there is at least one bug there; this kernel is broken. You may want to 
>> try booting with a kernel command line option like "security=none", which 
>> *should* turn smack off.
>>
>> Andreas
>>     
>
> All,
>
> Indeed the kernel cmdline option security=none did disable smack. So
> atleast that works. Thank you all for helping me track this down.  I can
> now return to updating packages (some of which have been waiting
> patiently for this to be cleared up)!  Though I will be looking forward
> to this feature working as it was intended. ;)  Let me know if there is
> a bug # assigned and I'll quietly return to lurking... ;

It looks like a trivial fix and the patch is here. I have just started
testing it myself, but if I don't send it now it will be Wednesday before
I do. No sign-off because I haven't verified it, but I would be delighted
if you would pass judgement on its efficacy. Thank you.


----

diff -uprN -X linux-2.6/Documentation/dontdiff linux-2.6/security/smack/smack_lsm.c linux-smack/security/smack/smack_lsm.c
--- linux-2.6/security/smack/smack_lsm.c	2008-10-26 17:37:08.000000000 -0700
+++ linux-smack/security/smack/smack_lsm.c	2008-10-26 19:11:23.000000000 -0700
@@ -763,13 +763,11 @@ static int smack_inode_getsecurity(const
 static int smack_inode_listsecurity(struct inode *inode, char *buffer,
 				    size_t buffer_size)
 {
-	int len = strlen(XATTR_NAME_SMACK);
+	int len = sizeof(XATTR_NAME_SMACK);
 
-	if (buffer != NULL && len <= buffer_size) {
+	if (buffer != NULL && len <= buffer_size)
 		memcpy(buffer, XATTR_NAME_SMACK, len);
-		return len;
-	}
-	return -EINVAL;
+	return len;
 }
 
 /**

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ