tomoyo: Don't emit WARNING: string while fuzzing testing.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tue, 7 May 2019 11:34:22 +0000 (20:34 +0900)
committerJames Morris <jamorris@linux.microsoft.com>
Fri, 10 May 2019 21:58:35 +0000 (14:58 -0700)
Commit cff0e6c3ec3e6230 ("tomoyo: Add a kernel config option for fuzzing
testing.") enabled the learning mode, but syzkaller is detecting any
"WARNING:" string as a crash. Thus, disable TOMOYO's quota warning if
built for fuzzing testing.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: James Morris <jamorris@linux.microsoft.com>
security/tomoyo/util.c

index 0517cbd..52752e1 100644 (file)
@@ -1076,8 +1076,10 @@ bool tomoyo_domain_quota_is_ok(struct tomoyo_request_info *r)
                domain->flags[TOMOYO_DIF_QUOTA_WARNED] = true;
                /* r->granted = false; */
                tomoyo_write_log(r, "%s", tomoyo_dif[TOMOYO_DIF_QUOTA_WARNED]);
+#ifndef CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING
                pr_warn("WARNING: Domain '%s' has too many ACLs to hold. Stopped learning mode.\n",
                        domain->domainname->name);
+#endif
        }
        return false;
 }