Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Null Pointer Dereference in TCP Packet Handling #36751

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

BoB13-Matter
Copy link
Contributor

@BoB13-Matter BoB13-Matter commented Dec 6, 2024

Description

This PR fixes #36750 a null pointer dereference in TCPBase::ProcessSingleMessage caused by malformed TCP packets. The issue could lead to a Denial of Service (DoS) attack.

Changes

  • Added a null pointer validation for state->mReceived before calling ProcessSingleMessage.

  • This change prevents crash and print error log:

    [1733488993.071785][31090:31090] CHIP:IN: Incoming connection established with peer at fe80::46c0:aa19:6d9:c653.
    [1733488993.071895][31090:31090] CHIP:IN: Received TCP connection request from TCP:[fe80::46c0:aa19:6d9:c653%ens33]:42740.
    [1733488993.072182][31090:31090] CHIP:IN: Failed to accept received TCP message: src/transport/raw/TCP.cpp:347: CHIP Error 0x0000000D: Message incomplete
    [1733488993.072304][31090:31090] CHIP:IN: Closing connection with peer TCP:[fe80::46c0:aa19:6d9:c653%ens33]:42740.

Testing

  • Tested against malformed packets to confirm the fix.
  • Verified with valid packet. (e.g. onoff on 1 1 --allow-large-payload 1)

Copy link

Review changes with  SemanticDiff

Copy link

github-actions bot commented Dec 6, 2024

PR #36751: Size comparison from 9e671ad to 404db44

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 9e671ad 404db44 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1353308 1353308 0 0.0
RAM 104112 104112 0 0.0
bl702 lighting-app bl702+eth FLASH 651816 651816 0 0.0
RAM 25353 25353 0 0.0
bl702+wifi FLASH 829144 829144 0 0.0
RAM 14093 14093 0 0.0
bl706+mfd+rpc+littlefs FLASH 1057594 1057594 0 0.0
RAM 23933 23933 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 978968 978968 0 0.0
RAM 16596 16596 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 839736 839744 8 0.0
RAM 123664 123664 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 825276 825284 8 0.0
RAM 125552 125552 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 772064 772072 8 0.0
RAM 114020 114020 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 756260 756268 8 0.0
RAM 114228 114228 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 631026 631030 4 0.0
RAM 205824 205824 0 0.0
lock CC3235SF_LAUNCHXL FLASH 669622 669626 4 0.0
RAM 205968 205968 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 681473 681473 0 0.0
RAM 78724 78724 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 701325 701325 0 0.0
RAM 81364 81364 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 701325 701325 0 0.0
RAM 81364 81364 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 658261 658261 0 0.0
RAM 73792 73792 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 618033 618033 0 0.0
RAM 71708 71708 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 637661 637661 0 0.0
RAM 74252 74252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 637661 637661 0 0.0
RAM 74252 74252 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 637433 637433 0 0.0
RAM 74724 74724 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 657149 657149 0 0.0
RAM 77268 77268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 657149 657149 0 0.0
RAM 77268 77268 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613901 613901 0 0.0
RAM 68812 68812 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633753 633753 0 0.0
RAM 71444 71444 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633753 633753 0 0.0
RAM 71444 71444 0 0.0
efr32 lock-app BRD4187C FLASH 932308 932308 0 0.0
RAM 160192 160192 0 0.0
BRD4338a FLASH 746112 746104 -8 -0.0
RAM 233320 233320 0 0.0
window-app BRD4187C FLASH 1024752 1024752 0 0.0
RAM 128296 128296 0 0.0
esp32 all-clusters-app c3devkit DRAM 95360 95360 0 0.0
FLASH 1543466 1543466 0 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116312 116312 0 0.0
FLASH 1550118 1550118 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2715045 2715097 52 0.0
RAM 129800 129800 0 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 6007046 6007098 52 0.0
RAM 523544 523544 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5344818 5344870 52 0.0
RAM 242600 242600 0 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4684354 4684406 52 0.0
RAM 218416 218416 0 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12850332 12850384 52 0.0
RAM 582474 582474 0 0.0
chip-tool-ipv6only arm64 unknown 21344 21344 0 0.0
FLASH 10984096 10984144 48 0.0
RAM 633384 633384 0 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11254395 11254447 52 0.0
RAM 582850 582850 0 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4509930 4509982 52 0.0
RAM 205600 205600 0 0.0
fabric-sync debug unknown 4936 4936 0 0.0
FLASH 5607797 5607845 48 0.0
RAM 472584 472584 0 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5621057 5621105 48 0.0
RAM 228792 228792 0 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4733594 4733646 52 0.0
RAM 204776 204776 0 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4359332 4359384 52 0.0
RAM 198448 198448 0 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4498356 4498408 52 0.0
RAM 203032 203032 0 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3030061 3030109 48 0.0
RAM 160424 160424 0 0.0
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4103472 4103536 64 0.0
RAM 243040 243040 0 0.0
tv-app debug unknown 5704 5704 0 0.0
FLASH 5958757 5958805 48 0.0
RAM 596016 596016 0 0.0
tv-casting-app debug unknown 5288 5288 0 0.0
FLASH 11054349 11054413 64 0.0
RAM 692152 692152 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 917576 917576 0 0.0
RAM 143292 143292 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 890080 890080 0 0.0
RAM 141487 141487 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 851720 851720 0 0.0
RAM 142200 142200 0 0.0
nxp contact k32w0+release FLASH 585408 585408 0 0.0
RAM 71080 71080 0 0.0
mcxw71+release FLASH 600016 600016 0 0.0
RAM 63176 63176 0 0.0
light k32w0+release FLASH 612364 612364 0 0.0
RAM 70472 70472 0 0.0
k32w1+release FLASH 686552 686552 0 0.0
RAM 48808 48808 0 0.0
lock mcxw71+release FLASH 762896 762896 0 0.0
RAM 70844 70844 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646348 1646348 0 0.0
RAM 212104 212104 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1554092 1554092 0 0.0
RAM 208904 208904 0 0.0
light cy8ckit_062s2_43012 FLASH 1469404 1469420 16 0.0
RAM 200880 200880 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467148 1467148 0 0.0
RAM 225240 225240 0 0.0
qpg lighting-app qpg6105+debug FLASH 663976 663976 0 0.0
RAM 105424 105424 0 0.0
lock-app qpg6105+debug FLASH 621772 621772 0 0.0
RAM 99868 99868 0 0.0
stm32 light STM32WB5MM-DK FLASH 484696 484696 0 0.0
RAM 144880 144880 0 0.0
telink bridge-app tlsr9258a FLASH 682804 682804 0 0.0
RAM 91208 91208 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 623230 623230 0 0.0
RAM 31440 31440 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 764728 764728 0 0.0
RAM 50220 50220 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710656 710656 0 0.0
RAM 73504 73504 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 627762 627762 0 0.0
RAM 142140 142140 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813690 813690 0 0.0
RAM 99684 99684 0 0.0
tizen all-clusters-app arm unknown 4988 4988 0 0.0
FLASH 1732480 1732512 32 0.0
RAM 90744 90744 0 0.0
chip-tool-ubsan arm unknown 10808 10808 0 0.0
FLASH 17972502 17972630 128 0.0
RAM 7841496 7841548 52 0.0

src/transport/raw/TCP.cpp Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Dec 10, 2024

PR #36751: Size comparison from 5d42d92 to 6bfe4f5

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 5d42d92 6bfe4f5 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1353308 1353308 0 0.0
RAM 104112 104112 0 0.0
bl702 lighting-app bl702+eth FLASH 651816 651816 0 0.0
RAM 25353 25353 0 0.0
bl702+wifi FLASH 829144 829144 0 0.0
RAM 14093 14093 0 0.0
bl706+mfd+rpc+littlefs FLASH 1057594 1057594 0 0.0
RAM 23933 23933 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 978968 978968 0 0.0
RAM 16596 16596 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 839736 839744 8 0.0
RAM 123664 123664 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 825276 825284 8 0.0
RAM 125552 125552 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 772064 772072 8 0.0
RAM 114020 114020 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 756260 756268 8 0.0
RAM 114228 114228 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 631026 631030 4 0.0
RAM 205824 205824 0 0.0
lock CC3235SF_LAUNCHXL FLASH 669622 669626 4 0.0
RAM 205968 205968 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 681473 681473 0 0.0
RAM 78724 78724 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 701325 701325 0 0.0
RAM 81364 81364 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 701325 701325 0 0.0
RAM 81364 81364 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 658261 658261 0 0.0
RAM 73792 73792 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 618033 618033 0 0.0
RAM 71708 71708 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 637661 637661 0 0.0
RAM 74252 74252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 637661 637661 0 0.0
RAM 74252 74252 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 637433 637433 0 0.0
RAM 74724 74724 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 657149 657149 0 0.0
RAM 77268 77268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 657149 657149 0 0.0
RAM 77268 77268 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613901 613901 0 0.0
RAM 68812 68812 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633753 633753 0 0.0
RAM 71444 71444 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633753 633753 0 0.0
RAM 71444 71444 0 0.0
efr32 lock-app BRD4187C FLASH 932308 932308 0 0.0
RAM 160192 160192 0 0.0
BRD4338a FLASH 746112 746104 -8 -0.0
RAM 233320 233320 0 0.0
window-app BRD4187C FLASH 1024752 1024752 0 0.0
RAM 128296 128296 0 0.0
esp32 all-clusters-app c3devkit DRAM 95360 95360 0 0.0
FLASH 1543466 1543466 0 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116312 116312 0 0.0
FLASH 1550118 1550118 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2715045 2715085 40 0.0
RAM 129800 129800 0 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 6007046 6007086 40 0.0
RAM 523544 523544 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5344786 5344826 40 0.0
RAM 242600 242600 0 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4684354 4684394 40 0.0
RAM 218416 218416 0 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12847594 12847634 40 0.0
RAM 582474 582474 0 0.0
chip-tool-ipv6only arm64 unknown 21344 21344 0 0.0
FLASH 10982304 10982336 32 0.0
RAM 633384 633384 0 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11254395 11254435 40 0.0
RAM 582850 582850 0 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4509930 4509970 40 0.0
RAM 205600 205600 0 0.0
fabric-sync debug unknown 4936 4936 0 0.0
FLASH 5607797 5607829 32 0.0
RAM 472584 472584 0 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5621057 5621089 32 0.0
RAM 228792 228792 0 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4733594 4733634 40 0.0
RAM 204776 204776 0 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4359332 4359372 40 0.0
RAM 198448 198448 0 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4498324 4498364 40 0.0
RAM 203032 203032 0 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3030061 3030109 48 0.0
RAM 160424 160424 0 0.0
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4103456 4103504 48 0.0
RAM 243040 243040 0 0.0
tv-app debug unknown 5704 5704 0 0.0
FLASH 5958757 5958789 32 0.0
RAM 596016 596016 0 0.0
tv-casting-app debug unknown 5288 5288 0 0.0
FLASH 11054349 11054397 48 0.0
RAM 692152 692152 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 917588 917588 0 0.0
RAM 143292 143292 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 890096 890096 0 0.0
RAM 141487 141487 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 851732 851732 0 0.0
RAM 142200 142200 0 0.0
nxp contact k32w0+release FLASH 585408 585408 0 0.0
RAM 71080 71080 0 0.0
mcxw71+release FLASH 600016 600016 0 0.0
RAM 63176 63176 0 0.0
light k32w0+release FLASH 612364 612364 0 0.0
RAM 70472 70472 0 0.0
k32w1+release FLASH 686552 686552 0 0.0
RAM 48808 48808 0 0.0
lock mcxw71+release FLASH 762896 762896 0 0.0
RAM 70844 70844 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646348 1646348 0 0.0
RAM 212104 212104 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1554092 1554092 0 0.0
RAM 208904 208904 0 0.0
light cy8ckit_062s2_43012 FLASH 1469404 1469420 16 0.0
RAM 200880 200880 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467148 1467148 0 0.0
RAM 225240 225240 0 0.0
qpg lighting-app qpg6105+debug FLASH 663976 663976 0 0.0
RAM 105424 105424 0 0.0
lock-app qpg6105+debug FLASH 621772 621772 0 0.0
RAM 99868 99868 0 0.0
stm32 light STM32WB5MM-DK FLASH 484696 484696 0 0.0
RAM 144880 144880 0 0.0
telink bridge-app tlsr9258a FLASH 682888 682888 0 0.0
RAM 91208 91208 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 623318 623318 0 0.0
RAM 31440 31440 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 772148 772148 0 0.0
RAM 49300 49300 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710742 710742 0 0.0
RAM 73504 73504 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 627784 627784 0 0.0
RAM 142140 142140 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813776 813776 0 0.0
RAM 99684 99684 0 0.0
tizen all-clusters-app arm unknown 4988 4988 0 0.0
FLASH 1732480 1732504 24 0.0
RAM 90744 90744 0 0.0
chip-tool-ubsan arm unknown 10804 10804 0 0.0
FLASH 17969438 17969462 24 0.0
RAM 7840748 7840748 0 0.0

if (messageSize == 0)
{
// No payload but considered a valid message. Return success to keep the connection alive.
return CHIP_NO_ERROR;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But ... doesn't this leave the four bytes 0, 0, 0, 0 in state->mReceived? As in, shouldn't this check-and-return be after the Consume call?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is right. Good catch! Since this is a complete packet, the size field should be consumed first(contrary to the previous if-check-and-return).

Copy link
Contributor Author

@BoB13-Matter BoB13-Matter Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the earlier if statements, the messageSize == 0 check was placed here, assuming it was the correct position. However, since this case assumes the message is a complete message, should this check actually come after the Consume call instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the Consume() of the 4 byte MessageSize field has to happen before the check to throw away this 0-payload packet and move forward along the byte stream.

Copy link
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Testing section here seems to contain a "manual" entry. Please add more details (how does one test with "malformed packets" to reproduce the test) and add a justification why automated testing of this code is impossible.

We are intentionally trying to make the "manually tested" threshold high to avoid PRs being marked as "manually tested" because it is easier to do so.

Since this is a "Processed buffer" call, it does seem that this could be unit tested.

@BoB13-Matter BoB13-Matter force-pushed the fix-tcp-nullptr-dereference branch from 6bfe4f5 to f494cd9 Compare December 17, 2024 12:38
@BoB13-Matter
Copy link
Contributor Author

The Testing section here seems to contain a "manual" entry. Please add more details (how does one test with "malformed packets" to reproduce the test) and add a justification why automated testing of this code is impossible.

We are intentionally trying to make the "manually tested" threshold high to avoid PRs being marked as "manually tested" because it is easier to do so.

Since this is a "Processed buffer" call, it does seem that this could be unit tested.

Thanks. I have added a new test in TestTCP.cpp to validate the behavior with malformed packets. Let me know if further modifications are needed.

Copy link

github-actions bot commented Dec 17, 2024

PR #36751: Size comparison from 4e44586 to cca52cd

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 4e44586 cca52cd change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1353616 1353616 0 0.0
RAM 104136 104136 0 0.0
bl702 lighting-app bl702+eth FLASH 651842 651842 0 0.0
RAM 25353 25353 0 0.0
bl702+wifi FLASH 829426 829426 0 0.0
RAM 14093 14093 0 0.0
bl706+mfd+rpc+littlefs FLASH 1057898 1057898 0 0.0
RAM 23933 23933 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 979272 979272 0 0.0
RAM 16596 16596 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 839828 839836 8 0.0
RAM 123672 123672 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 825368 825376 8 0.0
RAM 125560 125560 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 772244 772252 8 0.0
RAM 114036 114036 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 756440 756448 8 0.0
RAM 114236 114236 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 539753 539761 8 0.0
RAM 205776 205776 0 0.0
lock CC3235SF_LAUNCHXL FLASH 574033 574041 8 0.0
RAM 205920 205920 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 681673 681673 0 0.0
RAM 78732 78732 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 701517 701517 0 0.0
RAM 81372 81372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 701517 701517 0 0.0
RAM 81372 81372 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 658461 658461 0 0.0
RAM 73800 73800 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 618217 618217 0 0.0
RAM 71724 71724 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 637853 637853 0 0.0
RAM 74268 74268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 637853 637853 0 0.0
RAM 74268 74268 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 637625 637625 0 0.0
RAM 74732 74732 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 657341 657341 0 0.0
RAM 77276 77276 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 657341 657341 0 0.0
RAM 77276 77276 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614085 614085 0 0.0
RAM 68820 68820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633945 633945 0 0.0
RAM 71452 71452 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633945 633945 0 0.0
RAM 71452 71452 0 0.0
efr32 lock-app BRD4187C FLASH 932492 932492 0 0.0
RAM 160204 160204 0 0.0
BRD4338a FLASH 746472 746464 -8 -0.0
RAM 233332 233332 0 0.0
window-app BRD4187C FLASH 1025128 1025128 0 0.0
RAM 128308 128308 0 0.0
esp32 all-clusters-app c3devkit DRAM 95376 95376 0 0.0
FLASH 1543430 1543430 0 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116320 116320 0 0.0
FLASH 1550006 1550006 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2716107 2716147 40 0.0
RAM 129896 129896 0 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 6009352 6009392 40 0.0
RAM 523640 523640 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5345924 5345964 40 0.0
RAM 242696 242696 0 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4685460 4685500 40 0.0
RAM 218512 218512 0 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12849310 12849350 40 0.0
RAM 582506 582506 0 0.0
chip-tool-ipv6only arm64 unknown 21352 21352 0 0.0
FLASH 10983936 10983968 32 0.0
RAM 633424 633424 0 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11255859 11255899 40 0.0
RAM 582850 582850 0 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4510992 4511032 40 0.0
RAM 205696 205696 0 0.0
fabric-sync debug unknown 4936 4936 0 0.0
FLASH 5611061 5611093 32 0.0
RAM 472680 472680 0 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5622193 5622225 32 0.0
RAM 228888 228888 0 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4734732 4734772 40 0.0
RAM 204872 204872 0 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4360438 4360478 40 0.0
RAM 198544 198544 0 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4499462 4499502 40 0.0
RAM 203128 203128 0 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3033277 3033325 48 0.0
RAM 160520 160520 0 0.0
thermostat-no-ble arm64 unknown 9552 9552 0 0.0
FLASH 4104720 4104768 48 0.0
RAM 243160 243160 0 0.0
tv-app debug unknown 5704 5704 0 0.0
FLASH 5959989 5960021 32 0.0
RAM 596112 596112 0 0.0
tv-casting-app debug unknown 5288 5288 0 0.0
FLASH 11055693 11055741 48 0.0
RAM 692328 692328 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 918036 918036 0 0.0
RAM 143308 143308 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 890460 890460 0 0.0
RAM 141495 141495 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 851924 851924 0 0.0
RAM 142220 142220 0 0.0
nxp contact k32w0+release FLASH 585472 585472 0 0.0
RAM 71088 71088 0 0.0
mcxw71+release FLASH 600184 600184 0 0.0
RAM 63184 63184 0 0.0
light k32w0+release FLASH 612476 612476 0 0.0
RAM 70480 70480 0 0.0
k32w1+release FLASH 686736 686736 0 0.0
RAM 48816 48816 0 0.0
lock mcxw71+release FLASH 763072 763072 0 0.0
RAM 70852 70852 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646996 1647012 16 0.0
RAM 212104 212104 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1554436 1554452 16 0.0
RAM 208920 208920 0 0.0
light cy8ckit_062s2_43012 FLASH 1469764 1469764 0 0.0
RAM 200888 200888 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467492 1467508 16 0.0
RAM 225248 225248 0 0.0
qpg lighting-app qpg6105+debug FLASH 664168 664168 0 0.0
RAM 105432 105432 0 0.0
lock-app qpg6105+debug FLASH 621964 621964 0 0.0
RAM 99884 99884 0 0.0
stm32 light STM32WB5MM-DK FLASH 484884 484884 0 0.0
RAM 144888 144888 0 0.0
telink bridge-app tlsr9258a FLASH 683080 683080 0 0.0
RAM 91224 91224 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 623494 623494 0 0.0
RAM 31456 31456 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 772312 772312 0 0.0
RAM 49316 49316 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710934 710934 0 0.0
RAM 73520 73520 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 627950 627950 0 0.0
RAM 142156 142156 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813968 813968 0 0.0
RAM 99700 99700 0 0.0
tizen all-clusters-app arm unknown 4996 4996 0 0.0
FLASH 1734844 1734868 24 0.0
RAM 90784 90784 0 0.0
chip-tool-ubsan arm unknown 10804 10804 0 0.0
FLASH 17973406 17973422 16 0.0
RAM 7842608 7842608 0 0.0

@andy31415
Copy link
Contributor

@BoB13-Matter this may need more fixes. Test fails on linux:

...
[ RUN      ] TestTCP.MessageSizeTest
[1734441240.898] [11220:11220] [IN] TransportMgr initialized
[1734441240.898] [11220:11220] [IN] Incoming connection established with peer at ::1.
[1734441240.898] [11220:11220] [IN] Connection established successfully with TCP:[::1]:5638.
[1734441240.898] [11220:11220] [IN] Message Receive Handler called
[1734441240.898] [11220:11220] [IN] Closing connection with peer TCP:[::1]:5638.
[1734441240.898] [11220:11220] [CSL] SystemPacketBuffer::Free: aPacket->ref = 0
Aborted (core dumped)
INF Test 1/1: [FAIL] TestTCP in 0.043 s

Copy link

github-actions bot commented Dec 18, 2024

PR #36751: Size comparison from 4e44586 to d9316a2

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 4e44586 d9316a20 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1353616 1353786 170 0.0
RAM 104136 104136 0 0.0
bl702 lighting-app bl702+eth FLASH 651842 651960 118 0.0
RAM 25353 25353 0 0.0
bl702+wifi FLASH 829426 829548 122 0.0
RAM 14093 14093 0 0.0
bl706+mfd+rpc+littlefs FLASH 1057898 1058020 122 0.0
RAM 23933 23933 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 979272 979394 122 0.0
RAM 16596 16596 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 839828 839976 148 0.0
RAM 123672 123672 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 825368 825500 132 0.0
RAM 125560 125560 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 772244 772380 136 0.0
RAM 114036 114036 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 756440 756568 128 0.0
RAM 114236 114236 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 539753 539861 108 0.0
RAM 205776 205776 0 0.0
lock CC3235SF_LAUNCHXL FLASH 574033 574157 124 0.0
RAM 205920 205920 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 681673 681737 64 0.0
RAM 78732 78732 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 701517 701589 72 0.0
RAM 81372 81372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 701517 701589 72 0.0
RAM 81372 81372 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 658461 658517 56 0.0
RAM 73800 73800 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 618217 618353 136 0.0
RAM 71724 71724 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 637853 637981 128 0.0
RAM 74268 74268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 637853 637981 128 0.0
RAM 74268 74268 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 637625 637753 128 0.0
RAM 74732 74732 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 657341 657461 120 0.0
RAM 77276 77276 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 657341 657461 120 0.0
RAM 77276 77276 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614085 614205 120 0.0
RAM 68820 68820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633945 634065 120 0.0
RAM 71452 71452 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633945 634065 120 0.0
RAM 71452 71452 0 0.0
efr32 lock-app BRD4187C FLASH 932492 932620 128 0.0
RAM 160204 160204 0 0.0
BRD4338a FLASH 746472 746584 112 0.0
RAM 233332 233332 0 0.0
window-app BRD4187C FLASH 1025128 1025224 96 0.0
RAM 128308 128308 0 0.0
esp32 all-clusters-app c3devkit DRAM 95376 95376 0 0.0
FLASH 1543430 1543590 160 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116320 116320 0 0.0
FLASH 1550006 1550190 184 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2716107 2716263 156 0.0
RAM 129896 129928 32 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 6009352 6009574 222 0.0
RAM 523640 523640 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5345924 5346082 158 0.0
RAM 242696 242728 32 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4685460 4685618 158 0.0
RAM 218512 218528 16 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12849310 12849466 156 0.0
RAM 582506 582506 0 0.0
chip-tool-ipv6only arm64 unknown 21352 21352 0 0.0
FLASH 10983936 10984080 144 0.0
RAM 633424 633432 8 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11255859 11256015 156 0.0
RAM 582850 582850 0 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4510992 4511150 158 0.0
RAM 205696 205696 0 0.0
fabric-sync debug unknown 4936 4936 0 0.0
FLASH 5611061 5611205 144 0.0
RAM 472680 472696 16 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5622193 5622353 160 0.0
RAM 228888 228888 0 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4734732 4734890 158 0.0
RAM 204872 204872 0 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4360438 4360596 158 0.0
RAM 198544 198560 16 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4499462 4499620 158 0.0
RAM 203128 203144 16 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3033277 3033501 224 0.0
RAM 160520 160552 32 0.0
thermostat-no-ble arm64 unknown 9552 9552 0 0.0
FLASH 4104720 4104864 144 0.0
RAM 243160 243168 8 0.0
tv-app debug unknown 5704 5704 0 0.0
FLASH 5959989 5960197 208 0.0
RAM 596112 596128 16 0.0
tv-casting-app debug unknown 5288 5288 0 0.0
FLASH 11055693 11055853 160 0.0
RAM 692328 692328 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 918036 918112 76 0.0
RAM 143308 143308 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 890460 890256 -204 -0.0
RAM 141495 141495 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 851924 851992 68 0.0
RAM 142220 142220 0 0.0
nxp contact k32w0+release FLASH 585472 585624 152 0.0
RAM 71088 71088 0 0.0
mcxw71+release FLASH 600184 600320 136 0.0
RAM 63184 63184 0 0.0
light k32w0+release FLASH 612476 612548 72 0.0
RAM 70480 70480 0 0.0
k32w1+release FLASH 686736 686808 72 0.0
RAM 48816 48816 0 0.0
lock mcxw71+release FLASH 763072 763216 144 0.0
RAM 70852 70852 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646996 1647148 152 0.0
RAM 212104 212104 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1554436 1554580 144 0.0
RAM 208920 208920 0 0.0
light cy8ckit_062s2_43012 FLASH 1469764 1469884 120 0.0
RAM 200888 200888 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467492 1467620 128 0.0
RAM 225248 225248 0 0.0
qpg lighting-app qpg6105+debug FLASH 664168 664288 120 0.0
RAM 105432 105432 0 0.0
lock-app qpg6105+debug FLASH 621964 622108 144 0.0
RAM 99884 99884 0 0.0
stm32 light STM32WB5MM-DK FLASH 484884 485004 120 0.0
RAM 144888 144888 0 0.0
telink bridge-app tlsr9258a FLASH 683080 683206 126 0.0
RAM 91224 91224 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 623494 623620 126 0.0
RAM 31456 31456 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 772312 772438 126 0.0
RAM 49316 49316 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710934 711060 126 0.0
RAM 73520 73520 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 627950 628076 126 0.0
RAM 142156 142156 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813968 814094 126 0.0
RAM 99700 99700 0 0.0
tizen all-clusters-app arm unknown 4996 4996 0 0.0
FLASH 1734844 1734976 132 0.0
RAM 90784 90788 4 0.0
chip-tool-ubsan arm unknown 10804 10804 0 0.0
FLASH 17973406 17973702 296 0.0
RAM 7842608 7842724 116 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Denial of Service Vulnerability in TCP Packet Handling
5 participants