Skip to content

Conversation

@stacycorcoran
Copy link

@stacycorcoran stacycorcoran commented Nov 5, 2025

When execv() or execl() fail in child processes, the child would continue executing parent code instead of properly terminating. This could lead to unexpected behavior with multiple firewall3 processes running.

Replace return calls with _exit(EXIT_FAILURE) calls after failed exec operations in __fw3_command_pipe() and fw3_hotplug() to ensure child processes terminate immediately on exec failure.

@stacycorcoran stacycorcoran marked this pull request as ready for review November 5, 2025 17:45
When execv() or execl() fail in child processes, the child would
continue executing parent code instead of properly terminating.
This could lead to unexpected behavior with multiple firewall3
processes running.

Add proper error handling and _exit(EXIT_FAILURE) calls after failed
exec operations in __fw3_command_pipe() and fw3_hotplug() to ensure
child processes terminate immediately on exec failure.

Signed-off-by: Stacy Corcoran <stacy.corcoran@verkada.com>
@stacycorcoran stacycorcoran force-pushed the fix-process-termination-in-child-processes branch from 79e42c5 to 1a10817 Compare November 6, 2025 16:57
@stacycorcoran
Copy link
Author

@hauke @Ansuel Any chance one of you guys can take a look at this? Ran into an OOM issue due to the child processes execv/execl call failing and returning to the parent context creating race conditions and a cascade of firewall3 processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant