ima/policy: fix parsing of fsuuid
Subsystems (5)
PATCH 1/1 ima/policy: fix parsing of fsuuid
The switch to uuid_t invereted the logic of verfication that &entry->fsuuid is zero during parsing of "fsuuid=" rule. Instead of making sure the &entry->fsuuid field is not attempted to be overwriten, we bail out for perfectly correct rule.
--- security/integrity/ima/ima_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_policy.c +1 -1
@@ -743,7 +743,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)case Opt_fsuuid:ima_log_string (ab,"fsuuid" , args[0 ].from); -if (uuid_is_null (&entry->fsuuid)) { +if (!uuid_is_null (&entry->fsuuid)) { result = -EINVAL ;break ; }
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Greg KH
maintainerQuoted 11 lines · Mike Rapoport
The switch to
uuid_tinvereted the logic of verfication that&entry->fsuuidis zero during parsing of "fsuuid=" rule. Instead of making sure the&entry->fsuuidfield is not attempted to be overwriten, we bail out for perfectly correct rule.Fixes 787d8c530af7 ("ima/policy: switch to use uuid_t")Signed-off-by Mike Rapoport <[email protected]>--- security/integrity/ima/ima_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Mike Rapoport
The switch to
uuid_tinvereted the logic of verfication that&entry->fsuuidis zero during parsing of "fsuuid=" rule. Instead of making sure the&entry->fsuuidfield is not attempted to be overwriten, we bail out for perfectly correct rule.Fixes 787d8c530af7 ("ima/policy: switch to use uuid_t")Signed-off-by Mike Rapoport <[email protected]>
Thanks, Mike.
Quoted 9 lines
--- security/integrity/ima/ima_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/integrity/ima/ima_policy.c +0
-0
security/integrity/ima/ima_policy.c static int ima_parse_rule(char *rule, struct ima_rule_entry *entry) · line 749
Quoted 8 lines
security/integrity/ima/ima_policy.c +1
-1@@ -743,7 +743,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)case Opt_fsuuid:ima_log_string (ab,"fsuuid" , args[0 ].from); -if (uuid_is_null (&entry->fsuuid)) { +if (!uuid_is_null (&entry->fsuuid)) { result = -EINVAL ;break ; }
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html