anchao opened a new pull request, #3899: URL: https://github.com/apache/nuttx-apps/pull/3899
## Summary
Add bounds checking for parsed XML-RPC request parameters in the netutils
XML-RPC parser.
## Problem
`xmlrpc_parseparam()` used `g_xmlcall.argsize` to index the fixed-size
XML-RPC parameter arrays without checking it against `MAX_ARGS`.
The affected arrays are:
- `g_xmlcall.args[]`
- `g_xmlcall.arguments[]`
A request containing more parameters than `MAX_ARGS` could write past these
arrays.
Additionally, parse errors from parameter parsing were not propagated
consistently, and `xmlrpc_parse()` did not honor failures returned by
`xmlrpc_parsemethod()` before attempting to continue parsing and dispatch the
request.
## Solution
This change:
- rejects additional parameters once `g_xmlcall.argsize` reaches `MAX_ARGS`
- propagates `xmlrpc_parseparam()` failures from `xmlrpc_parseparams()`
- makes `xmlrpc_parse()` honor `xmlrpc_parsemethod()` failures
- prevents dispatching the registered XML-RPC method after a parse failure
## Testing
sim/nsh and enable CONFIG_NETUTILS_XMLRPC
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
