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

Make sure we handle BUSY responses during CASE properly. #28901

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

bzbarsky-apple
Copy link
Contributor

If we got a BUSY response during a CASE handshake and successfully read the wait time, we would treat that as a success case, not a failure case, and not realize that our exchange has been closed. That could lead to use-after-free when we later tried to abort an already-closed exchange.

The problem was introduced in 59a0b2f (PR #28153).

The new unit test fails (both with ASAN failures and with incorrect state because the client that got BUSY does not think the handshake failed) without this fix.

If we got a BUSY response during a CASE handshake and successfully read the wait
time, we would treat that as a success case, not a failure case, and not realize
that our exchange has been closed.  That could lead to use-after-free when we
later tried to abort an already-closed exchange.

The problem was introduced in 59a0b2f
(PR project-chip#28153).

The new unit test fails (both with ASAN failures and with incorrect state
because the client that got BUSY does not think the handshake failed) without
this fix.
@github-actions
Copy link

github-actions bot commented Aug 25, 2023

PR #28901: Size comparison from 79292ad to 8b09af7

Increases (12 builds for bl602, bl702, bl702l, cc32xx, psoc6)
platform target config section 79292ad 8b09af7 change % change
bl602 lighting-app bl602 .text 1058510 1058512 2 0.0
bl602+rpc .text 1090188 1090190 2 0.0
bl702 lighting-app bl702 .debug_str 3952431 3952443 12 0.0
.text 955754 955756 2 0.0
bl702+rpc (read/write) 1267139 1267143 4 0.0
.debug_str 4372317 4372329 12 0.0
.text 1030020 1030022 2 0.0
bl706-eth (read/write) 1014788 1014792 4 0.0
.debug_str 3524742 3524754 12 0.0
.text 773744 773746 2 0.0
bl706-wifi .debug_str 3586127 3586139 12 0.0
.text 847450 847452 2 0.0
bl702l lighting-app bl702l .debug_str 3964874 3964886 12 0.0
.text 944254 944256 2 0.0
cc32xx lock CC3235SF_LAUNCHXL .debug_info 21239538 21239634 96 0.0
.debug_str 3367677 3367689 12 0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 33504799 33504883 84 0.0
.debug_loclists 2304136 2304173 37 0.0
.debug_str 4529329 4529341 12 0.0
all-clusters-minimal cy8ckit_062s2_43012 .debug_info 29285325 29285409 84 0.0
.debug_loclists 2119888 2119925 37 0.0
.debug_str 3921922 3921934 12 0.0
light cy8ckit_062s2_43012 .debug_info 24339982 24340066 84 0.0
.debug_loclists 1956673 1956710 37 0.0
.debug_str 3729154 3729166 12 0.0
lock cy8ckit_062s2_43012 .debug_info 24151704 24151788 84 0.0
.debug_loclists 1935192 1935229 37 0.0
.debug_str 3692543 3692555 12 0.0
Decreases (48 builds for bl702, bl702l, cc32xx, efr32, esp32, linux, nrfconnect, psoc6, qpg, telink)
platform target config section 79292ad 8b09af7 change % change
bl702 lighting-app bl702 .debug_abbrev 1565739 1565721 -18 -0.0
.debug_info 41806938 41806918 -20 -0.0
.debug_line 5447506 5447410 -96 -0.0
.debug_loc 3516232 3516182 -50 -0.0
.debug_ranges 380456 380440 -16 -0.0
bl702+rpc .debug_abbrev 1742469 1742451 -18 -0.0
.debug_info 46702753 46702733 -20 -0.0
.debug_line 5859234 5859138 -96 -0.0
.debug_loc 3721928 3721878 -50 -0.0
.debug_ranges 406304 406288 -16 -0.0
bl706-eth .debug_abbrev 1114713 1114695 -18 -0.0
.debug_info 23269014 23268994 -20 -0.0
.debug_line 4405729 4405633 -96 -0.0
.debug_loc 3014642 3014577 -65 -0.0
.debug_ranges 317280 317264 -16 -0.0
bl706-wifi .debug_abbrev 1207636 1207618 -18 -0.0
.debug_info 24434194 24434174 -20 -0.0
.debug_line 4626856 4626760 -96 -0.0
.debug_loc 3098704 3098667 -37 -0.0
.debug_ranges 326176 326160 -16 -0.0
bl702l lighting-app bl702l .debug_abbrev 1568107 1568089 -18 -0.0
.debug_info 41813743 41813723 -20 -0.0
.debug_line 5363707 5363611 -96 -0.0
.debug_loc 3451973 3451909 -64 -0.0
.debug_ranges 385776 385760 -16 -0.0
cc32xx lock CC3235SF_LAUNCHXL .debug_line 2795148 2795056 -92 -0.0
.debug_loclists 1566738 1566691 -47 -0.0
.debug_rnglists 98910 98886 -24 -0.0
efr32 lighting-app BRD4187C (read/write) 1070648 1070640 -8 -0.0
.text 890560 890552 -8 -0.0
lock-app BRD4161A+wf200 (read/write) 1103744 1103728 -16 -0.0
.text 914064 914048 -16 -0.0
esp32 all-clusters-app c3devkit (read only) 1172906 1172904 -2 -0.0
.flash.text 1172906 1172904 -2 -0.0
m5stack (read only) 1213683 1213675 -8 -0.0
.flash.text 1208299 1208291 -8 -0.0
linux all-clusters-app debug (read only) 5648457 5648361 -96 -0.0
.text 4927779 4927683 -96 -0.0
all-clusters-minimal-app debug (read only) 4915105 4915025 -80 -0.0
.text 4411747 4411667 -80 -0.0
bridge-app debug (read only) 2772305 2772209 -96 -0.0
.text 2380067 2379971 -96 -0.0
chip-tool debug (read only) 10330633 10330553 -80 -0.0
.text 9346499 9346419 -80 -0.0
chip-tool-ipv6only arm64 (read only) 10172076 10172012 -64 -0.0
.text 9092088 9092024 -64 -0.0
lighting-app debug+rpc+ui (read only) 5244921 5244825 -96 -0.0
.text 4665379 4665283 -96 -0.0
lock-app debug (read only) 4478545 4478465 -80 -0.0
.text 4020499 4020419 -80 -0.0
ota-provider-app debug (read only) 4129857 4129777 -80 -0.0
.text 3738259 3738179 -80 -0.0
ota-requestor-app debug (read only) 4223337 4223241 -96 -0.0
.text 3824083 3823987 -96 -0.0
shell debug (read only) 3049137 3049057 -80 -0.0
.text 2660866 2660786 -80 -0.0
thermostat-no-ble arm64 (read only) 4357420 4357340 -80 -0.0
.text 3862104 3862024 -80 -0.0
tv-app debug (read only) 5317577 5317481 -96 -0.0
.text 4801443 4801347 -96 -0.0
tv-casting-app debug (read only) 8277097 8277001 -96 -0.0
.text 7538899 7538803 -96 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 text 863488 863484 -4 -0.0
nrf7002dk_nrf5340_cpuapp text 790756 790752 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 text 813520 813516 -4 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_line 4233159 4233067 -92 -0.0
.debug_rnglists 144584 144560 -24 -0.0
all-clusters-minimal cy8ckit_062s2_43012 .debug_line 3946256 3946164 -92 -0.0
.debug_rnglists 133976 133952 -24 -0.0
light cy8ckit_062s2_43012 .debug_line 3510772 3510680 -92 -0.0
.debug_rnglists 123660 123636 -24 -0.0
lock cy8ckit_062s2_43012 .debug_line 3463851 3463759 -92 -0.0
.debug_rnglists 121756 121732 -24 -0.0
qpg lighting-app qpg6105+debug (read/write) 1178036 1178028 -8 -0.0
.text 624880 624872 -8 -0.0
telink all-clusters-app tlsr9518adk80d text 752024 752022 -2 -0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 981688 981680 -8 -0.0
text 673674 673672 -2 -0.0
bridge-app tlsr9518adk80d text 647580 647578 -2 -0.0
contact-sensor-app tlsr9518adk80d text 591102 591100 -2 -0.0
light-switch-app tlsr9518adk80d text 632752 632750 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 984156 984148 -8 -0.0
text 687250 687248 -2 -0.0
lighting-app-factory-data tlsr9518adk80d (read/write) 995520 995512 -8 -0.0
text 694766 694764 -2 -0.0
lighting-app-rpc tlsr9518adk80d text 732246 732244 -2 -0.0
lighting-app-shell tlsr9518adk80d (read/write) 1085232 1085224 -8 -0.0
text 752462 752460 -2 -0.0
lock-app tlsr9518adk80d (read/write) 934956 934948 -8 -0.0
text 622230 622228 -2 -0.0
ota-requestor-app tlsr9518adk80d text 612956 612954 -2 -0.0
pump-app tlsr9518adk80d text 596728 596726 -2 -0.0
pump-controller-app tlsr9518adk80d text 587150 587148 -2 -0.0
smoke_co_alarm-app tlsr9518adk80d text 595460 595458 -2 -0.0
temperature-measurement-app tlsr9518adk80d text 582796 582794 -2 -0.0
thermostat tlsr9518adk80d text 602878 602876 -2 -0.0
window-covering tlsr9518adk80d text 598202 598200 -2 -0.0
Full report (62 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 79292ad 8b09af7 change % change
bl602 lighting-app bl602 (read/write) 1365550 1365550 0 0.0
.bss 73446 73446 0 0.0
.data 9600 9600 0 0.0
.text 1058510 1058512 2 0.0
bl602+rpc (read/write) 1412698 1412698 0 0.0
.bss 81486 81486 0 0.0
.data 9952 9952 0 0.0
.text 1090188 1090190 2 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1168747 1168747 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 41301 41301 0 0.0
.bss_psram 43248 43248 0 0.0
.comment 48 48 0 0.0
.data 3584 3584 0 0.0
.debug_abbrev 1565739 1565721 -18 -0.0
.debug_aranges 137912 137912 0 0.0
.debug_frame 507148 507148 0 0.0
.debug_info 41806938 41806918 -20 -0.0
.debug_line 5447506 5447410 -96 -0.0
.debug_loc 3516232 3516182 -50 -0.0
.debug_ranges 380456 380440 -16 -0.0
.debug_str 3952431 3952443 12 0.0
.hbn 544 544 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 107136 107136 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 590568 590568 0 0.0
.symtab 175952 175952 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
955754 955756 2 0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1267139 1267143 4 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 49749 49749 0 0.0
.bss_psram 43248 43248 0 0.0
.comment 48 48 0 0.0
.data 4104 4104 0 0.0
.debug_abbrev 1742469 1742451 -18 -0.0
.debug_aranges 146456 146456 0 0.0
.debug_frame 536064 536064 0 0.0
.debug_info 46702753 46702733 -20 -0.0
.debug_line 5859234 5859138 -96 -0.0
.debug_loc 3721928 3721878 -50 -0.0
.debug_ranges 406304 406288 -16 -0.0
.debug_str 4372317 4372329 12 0.0
.hbn 544 544 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 121768 121768 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 653638 653638 0 0.0
.symtab 194880 194880 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1030020 1030022 2 0.0
bl706-eth (read/write) 1014788 1014792 4 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 25586 25586 0 0.0
.bss_psram 94415 94415 0 0.0
.comment 48 48 0 0.0
.data 3304 3304 0 0.0
.debug_abbrev 1114713 1114695 -18 -0.0
.debug_aranges 114232 114232 0 0.0
.debug_frame 424080 424080 0 0.0
.debug_info 23269014 23268994 -20 -0.0
.debug_line 4405729 4405633 -96 -0.0
.debug_loc 3014642 3014577 -65 -0.0
.debug_ranges 317280 317264 -16 -0.0
.debug_str 3524742 3524754 12 0.0
.hbn 184 184 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 152 152 0 0.0
.psram 1 1 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 97332 97332 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 455877 455877 0 0.0
.symtab 138032 138032 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3338 3338 0 0.0
.text 0 0 0 0.0
773744 773746 2 0.0
bl706-wifi (read/write) 1086959 1086959 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 9981 9981 0 0.0
.bss_psram 95151 95151 0 0.0
.comment 48 48 0 0.0
.data 3624 3624 0 0.0
.debug_abbrev 1207636 1207618 -18 -0.0
.debug_aranges 118496 118496 0 0.0
.debug_frame 439524 439524 0 0.0
.debug_info 24434194 24434174 -20 -0.0
.debug_line 4626856 4626760 -96 -0.0
.debug_loc 3098704 3098667 -37 -0.0
.debug_ranges 326176 326160 -16 -0.0
.debug_str 3586127 3586139 12 0.0
.hbn 468 468 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 156 156 0 0.0
.psram 1 1 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 109608 109608 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 492642 492642 0 0.0
.symtab 150544 150544 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3402 3402 0 0.0
.text 0 0 0 0.0
847450 847452 2 0.0
bl702l lighting-app bl702l (read only) 278 278 0 0.0
(read/write) 1153980 1153980 0 0.0
.boot2 292 292 0 0.0
.bss 16004 16004 0 0.0
.bss_psram 77648 77648 0 0.0
.comment 48 48 0 0.0
.data 4528 4528 0 0.0
.debug_abbrev 1568107 1568089 -18 -0.0
.debug_aranges 132432 132432 0 0.0
.debug_frame 486880 486880 0 0.0
.debug_info 41813743 41813723 -20 -0.0
.debug_line 5363707 5363611 -96 -0.0
.debug_loc 3451973 3451909 -64 -0.0
.debug_ranges 385776 385760 -16 -0.0
.debug_str 3964874 3964886 12 0.0
.hbn 3244 3244 0 0.0
.hbn_noinit 308 308 0 0.0
.init 408 408 0 0.0
.init_array 144 144 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 101000 101000 0 0.0
.romdata 3224 3224 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 286 286 0 0.0
.stack 2048 2048 0 0.0
.strtab 590762 590762 0 0.0
.symtab 175488 175488 0 0.0
.tcm_data 692 692 0 0.0
.tcmcode 278 278 0 0.0
.text 0 0 0 0.0
944254 944256 2 0.0
cc32xx lock CC3235SF_LAUNCHXL (blank) 0 0 0 0.0
(read only) 617146 617146 0 0.0
(read/write) 207256 207256 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 200696 200696 0 0.0
.comment 206 206 0 0.0
.data 1440 1440 0 0.0
.debug_abbrev 966796 966796 0 0.0
.debug_aranges 106736 106736 0 0.0
.debug_frame 360944 360944 0 0.0
.debug_info 21239538 21239634 96 0.0
.debug_line 2795148 2795056 -92 -0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1566738 1566691 -47 -0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 98910 98886 -24 -0.0
.debug_str 3367677 3367689 12 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106506 106506 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 499896 499896 0 0.0
.symtab 294208 294208 0 0.0
.text 508520 508520 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 552407 552407 0 0.0
.app_xip_area 443673 443673 0 0.0
.bss 63704 63704 0 0.0
.data 664 664 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 538855 538855 0 0.0
.app_xip_area 425193 425193 0 0.0
.bss 68608 68608 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 574127 574127 0 0.0
.app_xip_area 466593 466593 0 0.0
.bss 62576 62576 0 0.0
.data 592 592 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
switch cyw930739m2evb_01 (read/write) 558799 558799 0 0.0
.app_xip_area 448049 448049 0 0.0
.bss 65696 65696 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 1026968 1026968 0 0.0
.bss 193040 193040 0 0.0
.data 2668 2668 0 0.0
.text 831240 831240 0 0.0
BRD4187C (read/write) 1070648 1070640 -8 -0.0
.bss 176812 176812 0 0.0
.data 3256 3256 0 0.0
.text 890560 890552 -8 -0.0
lock-app BRD4161A+wf200 (read/write) 1103744 1103728 -16 -0.0
.bss 186976 186976 0 0.0
.data 2684 2684 0 0.0
.text 914064 914048 -16 -0.0
window-app BRD4187C (read/write) 1119500 1119500 0 0.0
.bss 159564 159564 0 0.0
.data 3132 3132 0 0.0
.text 956784 956784 0 0.0
esp32 all-clusters-app c3devkit (read only) 1172906 1172904 -2 -0.0
(read/write) 1703892 1703892 0 0.0
.dram0.bss 79056 79056 0 0.0
.dram0.data 13084 13084 0 0.0
.flash.rodata 268840 268840 0 0.0
.flash.text 1172906 1172904 -2 -0.0
.iram0.text 75244 75244 0 0.0
m5stack (read only) 1213683 1213675 -8 -0.0
(read/write) 552802 552802 0 0.0
.dram0.bss 85424 85424 0 0.0
.dram0.data 34036 34036 0 0.0
.flash.rodata 299724 299724 0 0.0
.flash.text 1208299 1208291 -8 -0.0
.iram0.text 123287 123287 0 0.0
k32w contact k32w0+release (read only) 591196 591196 0 0.0
(read/write) 87944 87944 0 0.0
.bss 71192 71192 0 0.0
.data 2128 2128 0 0.0
.text 590660 590660 0 0.0
light k32w0+release (read only) 589980 589980 0 0.0
(read/write) 87596 87596 0 0.0
.bss 70856 70856 0 0.0
.data 2116 2116 0 0.0
.text 589444 589444 0 0.0
lock k32w0+release (read only) 562340 562340 0 0.0
(read/write) 85396 85396 0 0.0
.bss 68712 68712 0 0.0
.data 2060 2060 0 0.0
.text 561804 561804 0 0.0
linux all-clusters-app debug (read only) 5648457 5648361 -96 -0.0
(read/write) 420456 420456 0 0.0
.bss 130688 130688 0 0.0
.data 4016 4016 0 0.0
.data.rel.ro 278376 278376 0 0.0
.dynamic 624 624 0 0.0
.got 5384 5384 0 0.0
.init 27 27 0 0.0
.init_array 1344 1344 0 0.0
.rodata 339184 339184 0 0.0
.text 4927779 4927683 -96 -0.0
all-clusters-minimal-app debug (read only) 4915105 4915025 -80 -0.0
(read/write) 232392 232392 0 0.0
.bss 126368 126368 0 0.0
.data 3856 3856 0 0.0
.data.rel.ro 95024 95024 0 0.0
.dynamic 624 624 0 0.0
.got 5344 5344 0 0.0
.init 27 27 0 0.0
.init_array 1152 1152 0 0.0
.rodata 272582 272582 0 0.0
.text 4411747 4411667 -80 -0.0
bridge-app debug (read only) 2772305 2772209 -96 -0.0
(read/write) 133176 133176 0 0.0
.bss 51800 51800 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 71440 71440 0 0.0
.dynamic 624 624 0 0.0
.got 4640 4640 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 214568 214568 0 0.0
.text 2380067 2379971 -96 -0.0
chip-tool debug (read only) 10330633 10330553 -80 -0.0
(read/write) 441688 441688 0 0.0
.bss 93688 93688 0 0.0
.data 5090 5090 0 0.0
.data.rel.ro 335664 335664 0 0.0
.dynamic 624 624 0 0.0
.got 5816 5816 0 0.0
.init 27 27 0 0.0
.init_array 760 760 0 0.0
.rodata 388657 388657 0 0.0
.text 9346499 9346419 -80 -0.0
chip-tool-ipv6only arm64 (read only) 10172076 10172012 -64 -0.0
(read/write) 504136 504136 0 0.0
.bss 103080 103080 0 0.0
.data 4392 4392 0 0.0
.data.rel.ro 373008 373008 0 0.0
.dynamic 512 512 0 0.0
.got 18192 18192 0 0.0
.init 24 24 0 0.0
.init_array 248 248 0 0.0
.rodata 316056 316056 0 0.0
.text 9092088 9092024 -64 -0.0
lighting-app debug+rpc+ui (read only) 5244921 5244825 -96 -0.0
(read/write) 222536 222536 0 0.0
.bss 118064 118064 0 0.0
.data 4528 4528 0 0.0
.data.rel.ro 92376 92376 0 0.0
.dynamic 672 672 0 0.0
.got 5928 5928 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 337108 337108 0 0.0
.text 4665379 4665283 -96 -0.0
lock-app debug (read only) 4478545 4478465 -80 -0.0
(read/write) 203128 203128 0 0.0
.bss 113488 113488 0 0.0
.data 3760 3760 0 0.0
.data.rel.ro 79080 79080 0 0.0
.dynamic 624 624 0 0.0
.got 5264 5264 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 248550 248550 0 0.0
.text 4020499 4020419 -80 -0.0
ota-provider-app debug (read only) 4129857 4129777 -80 -0.0
(read/write) 192064 192064 0 0.0
.bss 113632 113632 0 0.0
.data 4032 4032 0 0.0
.data.rel.ro 68480 68480 0 0.0
.dynamic 624 624 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 201158 201158 0 0.0
.text 3738259 3738179 -80 -0.0
ota-requestor-app debug (read only) 4223337 4223241 -96 -0.0
(read/write) 196376 196376 0 0.0
.bss 114688 114688 0 0.0
.data 4272 4272 0 0.0
.data.rel.ro 71480 71480 0 0.0
.dynamic 624 624 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 204486 204486 0 0.0
.text 3824083 3823987 -96 -0.0
shell debug (read only) 3049137 3049057 -80 -0.0
(read/write) 152936 152936 0 0.0
.bss 60392 60392 0 0.0
.data 784 784 0 0.0
.data.rel.ro 85832 85832 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 1176 1176 0 0.0
.rodata 214162 214162 0 0.0
.text 2660866 2660786 -80 -0.0
thermostat-no-ble arm64 (read only) 4357420 4357340 -80 -0.0
(read/write) 241880 241880 0 0.0
.bss 122216 122216 0 0.0
.data 2896 2896 0 0.0
.data.rel.ro 100488 100488 0 0.0
.dynamic 512 512 0 0.0
.got 11824 11824 0 0.0
.init 24 24 0 0.0
.init_array 424 424 0 0.0
.rodata 161268 161268 0 0.0
.text 3862104 3862024 -80 -0.0
tv-app debug (read only) 5317577 5317481 -96 -0.0
(read/write) 350272 350272 0 0.0
.bss 241632 241632 0 0.0
.data 5136 5136 0 0.0
.data.rel.ro 96096 96096 0 0.0
.dynamic 624 624 0 0.0
.got 5616 5616 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 272374 272374 0 0.0
.text 4801443 4801347 -96 -0.0
tv-casting-app debug (read only) 8277097 8277001 -96 -0.0
(read/write) 210768 210768 0 0.0
.bss 54336 54336 0 0.0
.data 2544 2544 0 0.0
.data.rel.ro 147064 147064 0 0.0
.dynamic 624 624 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 337980 337980 0 0.0
.text 7538899 7538803 -96 -0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2523272 2523272 0 0.0
.bss 219424 219424 0 0.0
.data 5128 5128 0 0.0
.text 1485956 1485956 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1241140 1241140 0 0.0
bss 155482 155482 0 0.0
rodata 143176 143176 0 0.0
text 863488 863484 -4 -0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1359480 1359480 0 0.0
bss 140940 140940 0 0.0
rodata 137080 137080 0 0.0
text 790756 790752 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1160980 1160980 0 0.0
bss 154844 154844 0 0.0
rodata 113680 113680 0 0.0
text 813520 813516 -4 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 837160 837160 0 0.0
(read/write) 1793868 1793868 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 193628 193628 0 0.0
.comment 212 212 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2552 2552 0 0.0
.debug_abbrev 1418412 1418412 0 0.0
.debug_aranges 145152 145152 0 0.0
.debug_frame 482872 482872 0 0.0
.debug_info 33504799 33504883 84 0.0
.debug_line 4233159 4233067 -92 -0.0
.debug_line_str 957 957 0 0.0
.debug_loclists 2304136 2304173 37 0.0
.debug_rnglists 144584 144560 -24 -0.0
.debug_str 4529329 4529341 12 0.0
.heap 837160 837160 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 296 296 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 850416 850416 0 0.0
.symtab 515376 515376 0 0.0
.text 1589300 1589300 0 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 839944 839944 0 0.0
(read/write) 1678740 1678740 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 190932 190932 0 0.0
.comment 212 212 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2464 2464 0 0.0
.debug_abbrev 1290819 1290819 0 0.0
.debug_aranges 135016 135016 0 0.0
.debug_frame 454348 454348 0 0.0
.debug_info 29285325 29285409 84 0.0
.debug_line 3946256 3946164 -92 -0.0
.debug_line_str 981 981 0 0.0
.debug_loclists 2119888 2119925 37 0.0
.debug_rnglists 133976 133952 -24 -0.0
.debug_str 3921922 3921934 12 0.0
.heap 839944 839944 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 296 296 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 719951 719951 0 0.0
.symtab 467712 467712 0 0.0
.text 1476956 1476956 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 846280 846280 0 0.0
(read/write) 1607052 1607052 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184708 184708 0 0.0
.comment 212 212 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2352 2352 0 0.0
.debug_abbrev 1130644 1130644 0 0.0
.debug_aranges 125112 125112 0 0.0
.debug_frame 417392 417392 0 0.0
.debug_info 24339982 24340066 84 0.0
.debug_line 3510772 3510680 -92 -0.0
.debug_line_str 942 942 0 0.0
.debug_loclists 1956673 1956710 37 0.0
.debug_rnglists 123660 123636 -24 -0.0
.debug_str 3729154 3729166 12 0.0
.heap 846280 846280 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 296 296 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 637516 637516 0 0.0
.symtab 431248 431248 0 0.0
.text 1411604 1411604 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 818880 818880 0 0.0
(read/write) 1640324 1640324 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 212092 212092 0 0.0
.comment 212 212 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2368 2368 0 0.0
.debug_abbrev 1121608 1121608 0 0.0
.debug_aranges 123920 123920 0 0.0
.debug_frame 413044 413044 0 0.0
.debug_info 24151704 24151788 84 0.0
.debug_line 3463851 3463759 -92 -0.0
.debug_line_str 933 933 0 0.0
.debug_loclists 1935192 1935229 37 0.0
.debug_rnglists 121756 121732 -24 -0.0
.debug_str 3692543 3692555 12 0.0
.heap 818880 818880 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 296 296 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 611591 611591 0 0.0
.symtab 423296 423296 0 0.0
.text 1417476 1417476 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1178036 1178028 -8 -0.0
.bss 101024 101024 0 0.0
.data 744 744 0 0.0
.text 624880 624872 -8 -0.0
lock-app qpg6105+debug (read/write) 1135524 1135524 0 0.0
.bss 95744 95744 0 0.0
.data 748 748 0 0.0
.text 582364 582364 0 0.0
telink all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1096016 1096016 0 0.0
bss 108180 108180 0 0.0
text 752024 752022 -2 -0.0
all-clusters-minimal-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 981688 981680 -8 -0.0
bss 105332 105332 0 0.0
text 673674 673672 -2 -0.0
bridge-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 944936 944936 0 0.0
bss 109652 109652 0 0.0
text 647580 647578 -2 -0.0
contact-sensor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 876892 876892 0 0.0
bss 98696 98696 0 0.0
text 591102 591100 -2 -0.0
light-switch-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 923196 923196 0 0.0
bss 99536 99536 0 0.0
text 632752 632750 -2 -0.0
lighting-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 984156 984148 -8 -0.0
bss 107504 107504 0 0.0
text 687250 687248 -2 -0.0
lighting-app-factory-data tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 995520 995512 -8 -0.0
bss 111752 111752 0 0.0
text 694766 694764 -2 -0.0
lighting-app-rpc tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1053744 1053744 0 0.0
bss 109076 109076 0 0.0
text 732246 732244 -2 -0.0
lighting-app-shell tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1085232 1085224 -8 -0.0
bss 120152 120152 0 0.0
text 752462 752460 -2 -0.0
lock-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 934956 934948 -8 -0.0
bss 99424 99424 0 0.0
text 622230 622228 -2 -0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 899488 899488 0 0.0
bss 100012 100012 0 0.0
text 612956 612954 -2 -0.0
pump-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 882308 882308 0 0.0
bss 98828 98828 0 0.0
text 596728 596726 -2 -0.0
pump-controller-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 869448 869448 0 0.0
bss 98628 98628 0 0.0
text 587150 587148 -2 -0.0
shell tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 744116 744116 0 0.0
bss 97208 97208 0 0.0
text 478532 478532 0 0.0
smoke_co_alarm-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 880384 880384 0 0.0
bss 98816 98816 0 0.0
text 595460 595458 -2 -0.0
temperature-measurement-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 865628 865628 0 0.0
bss 98536 98536 0 0.0
text 582796 582794 -2 -0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 890904 890904 0 0.0
bss 98928 98928 0 0.0
text 602878 602876 -2 -0.0
window-covering tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 886528 886528 0 0.0
bss 99252 99252 0 0.0
text 598202 598200 -2 -0.0

@pullapprove pullapprove bot requested a review from saurabhst August 29, 2023 15:46
@mergify mergify bot merged commit c0ccbb1 into project-chip:master Aug 29, 2023
@bzbarsky-apple bzbarsky-apple deleted the fix-case-busy-handling branch August 29, 2023 20:04
@bzbarsky-apple
Copy link
Contributor Author

Note: we do not need this on 1.1, because #28153 did not land there.

HunsupJung pushed a commit to HunsupJung/connectedhomeip that referenced this pull request Oct 23, 2023
…p#28901)

If we got a BUSY response during a CASE handshake and successfully read the wait
time, we would treat that as a success case, not a failure case, and not realize
that our exchange has been closed.  That could lead to use-after-free when we
later tried to abort an already-closed exchange.

The problem was introduced in 59a0b2f
(PR project-chip#28153).

The new unit test fails (both with ASAN failures and with incorrect state
because the client that got BUSY does not think the handshake failed) without
this fix.
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.

6 participants