Skip to contentSkip to conversation

smackfs load append mode fix - resend unmundged.

PATCH In review Casey Schaufler 2 participants 3 messages Jan 28, 2009

Subsystems (2)
lore
Share & tools
lore

Casey Schaufler

author maintainer
#0 lore raw

PATCH 1/1 smackfs load append mode fix - resend unmundged.

From: Casey Schaufler <[email protected]>

Given just how hard it is to find the code that uses MAY_APPEND it's probably not a big surprise that this went unnoticed for so long. The Smack rules loading code is incorrectly setting the MAY_READ bit when MAY_APPEND is requested.

---

security/smack/smackfs.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
security/smack/smackfs.c +0 -0
diff -uprN -X linux-2.6/Documentation/dontdiff linux-2.6/security/smack/smackfs.c linux-0112/security/smack/smackfs.c
@@ -334,7 +334,7 @@ static ssize_t smk_write_load(struct fil
		break;
	case 'a':
	case 'A':
-		rule.smk_access |= MAY_READ;
+		rule.smk_access |= MAY_APPEND;
		break;
	default:
		goto out;
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Casey Schaufler

From: Casey Schaufler <[email protected]>

Given just how hard it is to find the code that uses MAY_APPEND it's probably not a big surprise that this went unnoticed for so long. The Smack rules loading code is incorrectly setting the MAY_READ bit when MAY_APPEND is requested.

Signature · 2 lines
James Morris
<[email protected]>
maintainer
#2 lore raw
In reply to Casey Schaufler
Quoted 8 lines · Casey Schaufler

From: Casey Schaufler <[email protected]>

Given just how hard it is to find the code that uses MAY_APPEND it's probably not a big surprise that this went unnoticed for so long. The Smack rules loading code is incorrectly setting the MAY_READ bit when MAY_APPEND is requested.

The patch was still corrupt (and you didn't format the subject line properly).

A fixed version for Linus may be pulled via:

The following changes since commit e4a7ca29039e615ce13a61b9c6abfb2aa394e9a1:
Linus Torvalds (1):

        Merge git://git.kernel.org/.../gregkh/usb-2.6

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 for-linus

Casey Schaufler (1):
smack: smackfs load append mode fix

 security/smack/smackfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Signature · 2 lines
James Morris
<[email protected]>