Skip to content

Commit 8724596

Browse files
committed
Merge tag 'Smack-for-6.6' of https://github.com/cschaufler/smack-next
Pull smack updates from Casey Schaufler: "Two minor fixes: is a simple spelling fix. The other is a bounds check for a very likely underflow" * tag 'Smack-for-6.6' of https://github.com/cschaufler/smack-next: smackfs: Prevent underflow in smk_set_cipso() security: smack: smackfs: fix typo (lables->labels)
2 parents 1a35914 + 3ad49d3 commit 8724596

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/smack/smackfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ struct smack_known *smack_syslog_label;
114114
* SMACK_PTRACE_DEFAULT regular smack ptrace rules (/proc based)
115115
* SMACK_PTRACE_EXACT labels must match, but can be overriden with
116116
* CAP_SYS_PTRACE
117-
* SMACK_PTRACE_DRACONIAN lables must match, CAP_SYS_PTRACE has no effect
117+
* SMACK_PTRACE_DRACONIAN labels must match, CAP_SYS_PTRACE has no effect
118118
*/
119119
int smack_ptrace_rule = SMACK_PTRACE_DEFAULT;
120120

@@ -896,7 +896,7 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
896896
}
897897

898898
ret = sscanf(rule, "%d", &catlen);
899-
if (ret != 1 || catlen > SMACK_CIPSO_MAXCATNUM)
899+
if (ret != 1 || catlen < 0 || catlen > SMACK_CIPSO_MAXCATNUM)
900900
goto out;
901901

902902
if (format == SMK_FIXED24_FMT &&

0 commit comments

Comments
 (0)