You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Insert the code from above somewhere in the main function
Observe the buffer in the debugger
Expected Result:
Parsing of the (incomplete) JSON string.
Actual Result:
The application can crashes, when nearby important buffers are overwritten. Attached is a sample application, where the UART configuration object gets overwritten, leading to a crash on the next UART operation.
Frequency (1/1):
Build/Commit:
Latest Release: release-v3.2.0
Target:
Cypress CY8CKIT-062-WiFi-BT
Host OS and Version:
Ubuntu 20.04
Compiler:
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.07) 10.3.1 20210621 (release)
Environment
Latest Modus Toolbox and the above mentioned Cypress CY8CKIT-062-WiFi-BT board
Since the MAX_BACKUP_SIZE is 500, the static buffer packet_backup can only backup 500 characters of input json string. This backup happens only when input json string is incomplete and if backed up data +new input data exceeds MAX_BACKUP_SIZE, the old json string is discarded and it will start parsing the new json string.
Prerequisites
Yes, see below
There seem to be no known issues
It happens on the latest master version
Description:
A Buffer Overflow of the static buffer
packet_backup[ MAX_BACKUP_SIZE ]
incy_json_parser.c
can be triggered with following code:Steps to Reproduce:
Create a new application with the Modus Toolbox and include the connectivity-utilities
Insert the code from above somewhere in the main function
Observe the buffer in the debugger
Expected Result:
Parsing of the (incomplete) JSON string.
Actual Result:
The application can crashes, when nearby important buffers are overwritten. Attached is a sample application, where the UART configuration object gets overwritten, leading to a crash on the next UART operation.
Frequency (1/1):
Build/Commit:
Latest Release: release-v3.2.0
Target:
Cypress CY8CKIT-062-WiFi-BT
Host OS and Version:
Ubuntu 20.04
Compiler:
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.07) 10.3.1 20210621 (release)
Environment
Latest Modus Toolbox and the above mentioned Cypress CY8CKIT-062-WiFi-BT board
UART_Transmit_and_Receive_JSON_Crash.zip
The text was updated successfully, but these errors were encountered: