Before the split, it made sense to assert, as checks were on setup.
But now these come from deserialization, and the fuzzer hits the
asserts, so simply return an error instead.
assert(exit_status);
/* Explicitly test for CVE-2021-4034 inspired invocations */
- assert(command->path);
- assert(!strv_isempty(command->argv));
+ if (!command->path || strv_isempty(command->argv)) {
+ *exit_status = EXIT_EXEC;
+ return log_exec_error_errno(
+ context,
+ params,
+ SYNTHETIC_ERRNO(EINVAL),
+ "Invalid command line arguments.");
+ }
LOG_CONTEXT_PUSH_EXEC(context, params);