Other Parts Discussed in Thread: CC3200, CC3100
Hello Ti Team,
I'm facing system hang issue from _SlDrvMsgReadCmdCtx function and I've debugged inside the code, I observed that CC3120 is not giving respond and _SlNonOsSemGet function is entering to infinite loop. I've already done a good time of researches in this forum related same kind of topic but none of them given any solution for my issue.
About test case : we have an embedded device with CC3120 NWP, which is perfectly working for webHMI communication. Before the product SOP we have given our embedded device for Cyber security attack testing and they found 2 major issue.
Test -1
DoS attack :It was possible to crash the embedded device by sending a specially crafted IP packet with a null length for IP option#0xE4. When this plugin was rerun multiple times on embedded device, TCP 21,80 and UDP port 53 were down permanently during and after the test. After 30 minutes, it was observed that the client connected to the embedded device was kicked off and the re-connection to embedded device was possible only after the manual reboot of the device.
Test -2
Slow Http test : During Range attack, it was observed that tcp ports 21 and 80 was down permanently during and after the test. Ports were recovered into normal state only after the device was manually
rebooted. During slow read test, it was observed that tcp port 21 was down permanently during and after the test. Port 21 recovered into normal state only after the device was manually rebooted. Port 80
was also found to be down multiple times during the test duration. It is recommended the web server should be able to handle http requests which are send very slowly. As a security measure, set an absolute timeout. Define the minimum incoming data rate and drop connections slower than that rate. Also, some server specific measures like setting connection Timeout, will also minimize the impact of slow HTTP attacks.
When I debug the code :
For test - 1: embedded device is entering to the infinite loop and I have enable Timeout decrements code inside nonos.c then I got [SIMPLELINK] FATAL ERROR: No Cmd Ack detected [cmd opcode = 0x9c0b] . later it given [SIMPLELINK] FATAL ERROR: Driver Abort detected.
For test -2 : embedded device throwing error is [SIMPLELINK] FATAL ERROR: Driver Abort detected..
Device Environment details:
MCU : K61 from Freescale
RTOS : MQX 4.2
NWP : 3.10.0.5
MAC: 2.0.0.0
PHY : 2.2.0.6
WIFI Chip : CC3120
Embedded device wifi stack driver codes are up to date with NWP version.
Additional information : Code is hanging this way, _httpsrv_server_task --> MUTEX_SECTION(new_sock, sl_Accept((server->sock_v4), ( struct SlSockAddr_t *)&ClientAddres, (SlSocklen_t*)&AddrSize)); -->
sl_Accept --> VERIFY_RET_OK(_SlDrvCmdOp((_SlCmdCtrl_t *)&_SlAcceptCmdCtrl, &Msg, NULL)); --> _SlDrvCmdOp --> RetVal = _SlDrvMsgReadCmdCtx(pCmdCtrl->Opcode, IsLockRequired); /* will free global lock */ --> RetVal = sl_SyncObjWait(&g_pCB->CmdSyncObj, CmdCmpltTimeout); --> _SlNonOsSemGet () --> infinite Loop.
Could you please give me a solution for this two issues. Our device is using for highly critical monitoring application which won't allow to reset the device. Since our project in SOP stage, need to fix this issue immediately.
I'm looking forward your response.
Thanks in advance.
regards,
Paul