Skip to content

Fix NULL deref in xml_rpc_isaction() on <action> without resolvable namespace - #705

Open
pexaxep wants to merge 1 commit into
clicon:masterfrom
pexaxep:fix/xml-rpc-isaction-null-deref
Open

pexaxep wants to merge 1 commit into
clicon:masterfrom
pexaxep:fix/xml-rpc-isaction-null-deref

Conversation

@pexaxep

@pexaxep pexaxep commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

xml_rpc_isaction() calls strcmp(YANG_XML_NAMESPACE, ns) without checking whether xml2ns() returned NULL. An whose namespace cannot be resolved (e.g. no xmlns in scope at all) makes xml2ns() return ns == NULL, and the subsequent strcmp() segfaults.

Found via fuzzing (AFL++) and reproduced through the real NETCONF protocol path with clixon_netconf.

Fix: treat an unresolved namespace as "not an action" instead of crashing, consistent with how the rest of this file already guards ns == NULL (see eg line 1831).

Added a regression test in test_yang_action.sh.

…amespace

xml_rpc_isaction() calls strcmp(YANG_XML_NAMESPACE, ns) without checking
whether xml2ns() returned NULL. An <rpc><action> whose namespace cannot be
resolved (e.g. no xmlns in scope at all) makes xml2ns() return ns == NULL,
and the subsequent strcmp() segfaults.

Found via fuzzing (AFL++) and reproduced through the real NETCONF protocol
path with clixon_netconf.

Fix: treat an unresolved namespace as "not an action" instead of crashing,
consistent with how the rest of this file already guards ns == NULL
(see eg line 1831).

Added a regression test in test_yang_action.sh.

This branch has not been deployed

No deployments
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