Skip to content

exec: harden deferred reply teardown#32

Open
wildmeng wants to merge 1 commit into
openwrt:masterfrom
wildmeng:submit/harden-async-exec-reply
Open

exec: harden deferred reply teardown#32
wildmeng wants to merge 1 commit into
openwrt:masterfrom
wildmeng:submit/harden-async-exec-reply

Conversation

@wildmeng
Copy link
Copy Markdown

@wildmeng wildmeng commented May 5, 2026

Follow-up to #27.

The deferred async exec reply path can still schedule another zero-timeout reply once reply teardown has started. On current master this path reuses c->timeout, so leave teardown marked by clearing timeout.cb and keep the first pending deferred status while a reply callback is already queued.

Also initialize the exec reply blob buffer before pipe/fork cleanup paths and guard plugin JSON table/array allocation failures before closing or recursing into them.

Avoid scheduling another deferred exec reply once reply teardown has started and keep the first scheduled deferred status while a reply callback is pending.

Also handle blob allocation failures in the async exec/plugin reply path.
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