From e89a8133ace9ed10d2c327c3b27d9c4198ad28d5 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 12 Feb 2021 21:15:36 -0700 Subject: [PATCH] Reset sudoers path, owner and mode before parsing plugin arguments. This is only needed when calling sudoers_policy_deserialize_info() more than once, which is true for the policy fuzzer. --- plugins/sudoers/policy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/sudoers/policy.c b/plugins/sudoers/policy.c index 2c58b00d8..a6a3e4159 100644 --- a/plugins/sudoers/policy.c +++ b/plugins/sudoers/policy.c @@ -117,6 +117,10 @@ sudoers_policy_deserialize_info(void *v) } /* Parse sudo.conf plugin args. */ + sudoers_file = _PATH_SUDOERS; + sudoers_mode = SUDOERS_MODE; + sudoers_uid = SUDOERS_UID; + sudoers_gid = SUDOERS_GID; if (info->plugin_args != NULL) { for (cur = info->plugin_args; *cur != NULL; cur++) { if (MATCHES(*cur, "error_recovery=")) {