Repository navigation
Conversation
xmlrpc_parseparam() used g_xmlcall.argsize to index the fixed-size XML-RPC parameter arrays without checking it against MAX_ARGS. A request with too many parameters could write past g_xmlcall.args[] and g_xmlcall.arguments[]. Reject additional parameters once MAX_ARGS is reached, propagate parse errors while parsing the parameter list, and make xmlrpc_parse() honor xmlrpc_parsemethod() failures before dispatching the registered method. Signed-off-by: chao an <anchao.archer@bytedance.com>
xiaoxiang781216
previously approved these changes
Oct 22, 2026
1 task done
Fix nxstyle "Bad alignment" errors in the switch-case block of xmlrpc_parseparam(). Align case labels and body statements to conform with the NuttX coding standard. Signed-off-by: chao an <anchao.archer@bytedance.com>
xiaoxiang781216
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add bounds checking for parsed XML-RPC request parameters in the netutils XML-RPC parser.
Problem
xmlrpc_parseparam()usedg_xmlcall.argsizeto index the fixed-size XML-RPC parameter arrays without checking it againstMAX_ARGS.The affected arrays are:
g_xmlcall.args[]g_xmlcall.arguments[]A request containing more parameters than
MAX_ARGScould write past these arrays.Additionally, parse errors from parameter parsing were not propagated consistently, and
xmlrpc_parse()did not honor failures returned byxmlrpc_parsemethod()before attempting to continue parsing and dispatch the request.Solution
This change:
g_xmlcall.argsizereachesMAX_ARGSxmlrpc_parseparam()failures fromxmlrpc_parseparams()xmlrpc_parse()honorxmlrpc_parsemethod()failuresTesting
sim/nsh and enable CONFIG_NETUTILS_XMLRPC