git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
patch-2_6_7-vs1_9_1_12
[linux-2.6.git]
/
security
/
selinux
/
ss
/
services.c
diff --git
a/security/selinux/ss/services.c
b/security/selinux/ss/services.c
index
7d0fedf
..
21ab4c9
100644
(file)
--- a/
security/selinux/ss/services.c
+++ b/
security/selinux/ss/services.c
@@
-532,6
+532,11
@@
int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid)
if (rc)
goto out_unlock;
+ if ((p - scontext2) < scontext_len) {
+ rc = -EINVAL;
+ goto out_unlock;
+ }
+
/* Check the validity of the new context. */
if (!policydb_context_isvalid(&policydb, &context)) {
rc = -EINVAL;