[NETCONF-1194] Invalid NETCONF message triggers unnecessary parsing of partial message Created: 02/Nov/23 Updated: 06/Nov/23 Resolved: 06/Nov/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | 4.0.8, 6.0.4, 5.0.9 |
| Fix Version/s: | 7.0.0, 4.0.9, 6.0.5, 5.0.10 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Sangwook Ha | Assignee: | Sangwook Ha |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When a NETCONF XML message is corrupted, SAXParseException is raised while parsing the XML message. In some cases, e.g. when there is an invalid character, the exception is raised before all the data in the buffer is read. And in this case the next decoding is started from the point where the parsing was aborted and this in turn will cause another parsing failure. This repeatedly happens until all the remaining data in the buffer is exhausted. If the corrupted XML message is large, then this may put significant load on the controller and generate a lot of log messages. |
| Comments |
| Comment by Ivan Hrasko [ 06/Nov/23 ] |
|
PeterSuna Needs better unit testing. |
| Comment by Ivan Hrasko [ 06/Nov/23 ] |
|
That's needed because |