This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530: heap-buffer-overflow in nmPb_processSrvrGetDeviceInfoReq - ZIGBEE-LINUX-SENSOR-TO-CLOUD_1.0.1 --

Part Number: CC2530

This is possibly caused by packing strucures in 'zcl.c'  (#pragma pack")  but then again, it could also happen without that : the cause to effect is not clear.

[2020-11-06 13:16:01] =================================================================
[2020-11-06 13:16:01] ==11106==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb4c02c6c at pc 0x0006e8d1 bp 0xb5b77998 sp 0xb5b7799c
[2020-11-06 13:16:01] READ of size 4 at 0xb4c02c6c thread T3
[2020-11-06 13:16:01]     #0 0x6e8cf in nmPb_processSrvrGetDeviceInfoReq .../3rdparty/ti/Zigbee_3_0_Linux_Gateway_1_0_1/source/Projects/zstack/linux/nwkmgr/nwkmgrp2p.c:247
[2020-11-06 13:16:01]     #1 0x4737f in nmHandleServerPbCb .../3rdparty/ti/Zigbee_3_0_Linux_Gateway_1_0_1/source/Projects/zstack/linux/nwkmgr/nwkmgrsrv.c:1546
[2020-11-06 13:16:01]     #2 0x46ed1 in nmSyncPbCb .../3rdparty/ti/Zigbee_3_0_Linux_Gateway_1_0_1/source/Projects/zstack/linux/nwkmgr/nwkmgrsrv.c:1303
[2020-11-06 13:16:01]     #3 0xa2429 in apisConnectionHandle ../srvwrapper/api_server.c:1181
[2020-11-06 13:16:01]     #4 0xa0c69 in apislisteningThreadFunc ../srvwrapper/api_server.c:749
[2020-11-06 13:16:01]

The line that produces the error is:

      deviceInfo.simpledesclist = nmPb_HandleServerSimpleDescPb( pDeviceInfo->endpointCount,
                                                                 pDeviceInfo->aEndpoint );