2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Return NOT_FOUND from the set_cmnd_path() stub since we don't set user_cmnd.

The purpose of set_cmnd_path() is to reset user_cmnd based on a new
runchroot.  For the stub version we don't modify user_cmnd and so
must not return a status of FOUND.
Fixes oss-fuzz issue #31250 which only affected the fuzzer and not sudo.
This commit is contained in:
Todd C. Miller 2021-02-22 19:53:08 -07:00
parent 5fc6b8c177
commit 322e0b3693
2 changed files with 4 additions and 2 deletions

View File

@ -84,7 +84,8 @@ get_interfaces(void)
int int
set_cmnd_path(const char *runchroot) set_cmnd_path(const char *runchroot)
{ {
return FOUND; /* Cannot return FOUND without also setting user_cmnd to a new value. */
return NOT_FOUND;
} }
/* STUB */ /* STUB */

View File

@ -502,7 +502,8 @@ init_eventlog_config(void)
int int
set_cmnd_path(const char *runchroot) set_cmnd_path(const char *runchroot)
{ {
return FOUND; /* Cannot return FOUND without also setting user_cmnd to a new value. */
return NOT_FOUND;
} }
static bool static bool