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

Add ClearSecretData calls for IPK bits on Darwin. #17179

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Keypairs do this automatically, but we're using a raw buffer for the IPK.

Problem

Not clearing key data.

Change overview

Do it.

Testing

Tested that I can still use iOS CHIPTool sanely to pair and control devices.

@github-actions
Copy link

github-actions bot commented Apr 7, 2022

PR #17179: Size comparison from 0c06ba5 to 707e748

Increases (14 builds for efr32, linux, p6)
platform target config section 0c06ba5 707e748 change % change
efr32 lighting-app BRD4161A+rpc (read only) 932780 932796 16 0.0
.text 932772 932788 16 0.0
linux all-clusters-app debug (read only) 2622689 2622721 32 0.0
.text 2231410 2231442 32 0.0
bridge-app debug+rpc (read only) 1831421 1831453 32 0.0
.text 1565669 1565701 32 0.0
chip-tool debug (read only) 10679957 10679989 32 0.0
.text 9312629 9312661 32 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 10281420 10281468 48 0.0
.text 8665812 8665860 48 0.0
door-lock-app debug (read only) 2102513 2102545 32 0.0
.text 1761554 1761586 32 0.0
lighting-app debug+rpc (read only) 2305017 2305049 32 0.0
.text 1958770 1958802 32 0.0
ota-provider-app debug (read only) 2040353 2040385 32 0.0
.text 1712466 1712498 32 0.0
ota-requestor-app debug (read only) 2069657 2069689 32 0.0
.text 1743602 1743634 32 0.0
shell debug (read only) 2517473 2517505 32 0.0
.text 2144082 2144114 32 0.0
thermostat-no-ble arm64 (read only) 2348476 2348508 32 0.0
.text 1976576 1976608 32 0.0
tv-app debug (read only) 2794369 2794401 32 0.0
.text 2401330 2401362 32 0.0
p6 all-clusters-app default (read/write) 2512552 2512568 16 0.0
.text 1470816 1470832 16 0.0
light-app default (read/write) 2413576 2413592 16 0.0
.text 1371840 1371856 16 0.0
Full report (28 builds for cc13x2_26x2, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 0c06ba5 707e748 change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 674515 674515 0 0.0
(read/write) 176964 176964 0 0.0
.bss 81520 81520 0 0.0
.data 3216 3216 0 0.0
.rodata 80563 80563 0 0.0
.text 593472 593472 0 0.0
lock-mtd LP_CC2652R7 (read only) 623651 623651 0 0.0
(read/write) 154320 154320 0 0.0
.bss 77248 77248 0 0.0
.data 3216 3216 0 0.0
.rodata 80451 80451 0 0.0
.text 542712 542712 0 0.0
pump-app LP_CC2652R7 (read only) 681875 681875 0 0.0
(read/write) 170780 170780 0 0.0
.bss 81928 81928 0 0.0
.data 3248 3248 0 0.0
.rodata 75243 75243 0 0.0
.text 606148 606148 0 0.0
pump-controller-app LP_CC2652R7 (read only) 676219 676219 0 0.0
(read/write) 176164 176164 0 0.0
.bss 81656 81656 0 0.0
.data 3212 3212 0 0.0
.rodata 79027 79027 0 0.0
.text 596708 596708 0 0.0
efr32 lighting-app BRD4161A (read only) 904908 904908 0 0.0
(read/write) 133160 133160 0 0.0
.bss 131120 131120 0 0.0
.data 2040 2040 0 0.0
.text 904900 904900 0 0.0
BRD4161A+rpc (read only) 932780 932796 16 0.0
(read/write) 149108 149108 0 0.0
.bss 146888 146888 0 0.0
.data 2220 2220 0 0.0
.text 932772 932788 16 0.0
window-app BRD4161A (read only) 842196 842196 0 0.0
(read/write) 131228 131228 0 0.0
.bss 129280 129280 0 0.0
.data 1948 1948 0 0.0
.text 842188 842188 0 0.0
esp32 all-clusters-app c3devkit (read only) 991900 991900 0 0.0
(read/write) 1461762 1461762 0 0.0
.dram0.bss 62936 62936 0 0.0
.dram0.data 14356 14356 0 0.0
.flash.rodata 198984 198984 0 0.0
.flash.text 991900 991900 0 0.0
.iram0.text 62572 62572 0 0.0
m5stack (read only) 1044615 1044615 0 0.0
(read/write) 462816 462816 0 0.0
.dram0.bss 68464 68464 0 0.0
.dram0.data 34160 34160 0 0.0
.flash.rodata 228048 228048 0 0.0
.flash.text 1039231 1039231 0 0.0
.iram0.text 123415 123415 0 0.0
k32w light k32w061+release (read/write) 685148 685148 0 0.0
.bss 78208 78208 0 0.0
.data 2036 2036 0 0.0
.text 599104 599104 0 0.0
lock k32w061+release (read/write) 689932 689932 0 0.0
.bss 78784 78784 0 0.0
.data 1996 1996 0 0.0
.text 603352 603352 0 0.0
linux all-clusters-app debug (read only) 2622689 2622721 32 0.0
(read/write) 145640 145640 0 0.0
.bss 57664 57664 0 0.0
.data 1824 1824 0 0.0
.data.rel.ro 80264 80264 0 0.0
.dynamic 592 592 0 0.0
.got 4320 4320 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 222405 222405 0 0.0
.text 2231410 2231442 32 0.0
bridge-app debug+rpc (read only) 1831421 1831453 32 0.0
(read/write) 91304 91304 0 0.0
.bss 44344 44344 0 0.0
.data 2912 2912 0 0.0
.data.rel.ro 38936 38936 0 0.0
.dynamic 592 592 0 0.0
.got 3936 3936 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 148281 148281 0 0.0
.text 1565669 1565701 32 0.0
chip-tool debug (read only) 10679957 10679989 32 0.0
(read/write) 371736 371736 0 0.0
.bss 22752 22752 0 0.0
.data 1104 1104 0 0.0
.data.rel.ro 341632 341632 0 0.0
.dynamic 624 624 0 0.0
.got 4928 4928 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 538389 538389 0 0.0
.text 9312629 9312661 32 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 10281420 10281468 48 0.0
(read/write) 492177 492177 0 0.0
.bss 41009 41009 0 0.0
.data 1168 1168 0 0.0
.data.rel.ro 388800 388800 0 0.0
.dynamic 560 560 0 0.0
.got 57392 57392 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 512540 512540 0 0.0
.text 8665812 8665860 48 0.0
door-lock-app debug (read only) 2102513 2102545 32 0.0
(read/write) 119024 119024 0 0.0
.bss 47936 47936 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 64056 64056 0 0.0
.dynamic 592 592 0 0.0
.got 4264 4264 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 186313 186313 0 0.0
.text 1761554 1761586 32 0.0
lighting-app debug+rpc (read only) 2305017 2305049 32 0.0
(read/write) 127344 127344 0 0.0
.bss 50144 50144 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 69544 69544 0 0.0
.dynamic 608 608 0 0.0
.got 4312 4312 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 181513 181513 0 0.0
.text 1958770 1958802 32 0.0
ota-provider-app debug (read only) 2040353 2040385 32 0.0
(read/write) 114592 114592 0 0.0
.bss 47840 47840 0 0.0
.data 1608 1608 0 0.0
.data.rel.ro 59384 59384 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 632 632 0 0.0
.rodata 172323 172323 0 0.0
.text 1712466 1712498 32 0.0
ota-requestor-app debug (read only) 2069657 2069689 32 0.0
(read/write) 117880 117880 0 0.0
.bss 48800 48800 0 0.0
.data 1864 1864 0 0.0
.data.rel.ro 61624 61624 0 0.0
.dynamic 592 592 0 0.0
.got 4304 4304 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 168716 168716 0 0.0
.text 1743602 1743634 32 0.0
shell debug (read only) 2517473 2517505 32 0.0
(read/write) 149168 149168 0 0.0
.bss 67368 67368 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 74808 74808 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 214002 214002 0 0.0
.text 2144082 2144114 32 0.0
thermostat-no-ble arm64 (read only) 2348476 2348508 32 0.0
(read/write) 150497 150497 0 0.0
.bss 63025 63025 0 0.0
.data 1424 1424 0 0.0
.data.rel.ro 78264 78264 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 368 368 0 0.0
.rodata 144428 144428 0 0.0
.text 1976576 1976608 32 0.0
tv-app debug (read only) 2794369 2794401 32 0.0
(read/write) 251096 251096 0 0.0
.bss 165032 165032 0 0.0
.data 4448 4448 0 0.0
.data.rel.ro 75408 75408 0 0.0
.dynamic 592 592 0 0.0
.got 4680 4680 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 213323 213323 0 0.0
.text 2401330 2401362 32 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2366844 2366844 0 0.0
.bss 185060 185060 0 0.0
.data 5840 5840 0 0.0
.text 1329444 1329444 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1153375 1153375 0 0.0
bss 135540 135540 0 0.0
rodata 145832 145832 0 0.0
text 793388 793388 0 0.0
p6 all-clusters-app default (read/write) 2512552 2512568 16 0.0
.bss 118464 118464 0 0.0
.data 2768 2768 0 0.0
.text 1470816 1470832 16 0.0
light-app default (read/write) 2413576 2413592 16 0.0
.bss 111960 111960 0 0.0
.data 2576 2576 0 0.0
.text 1371840 1371856 16 0.0
lock-app default (read/write) 2377208 2377208 0 0.0
.bss 111704 111704 0 0.0
.data 2536 2536 0 0.0
.text 1335472 1335472 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 799240 799240 0 0.0
bss 70064 70064 0 0.0
noinit 40416 40416 0 0.0
text 568274 568274 0 0.0

Keypairs do this automatically, but we're using a raw buffer for the IPK.
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

PR #17179: Size comparison from 16606a4 to 67b62ad

Increases (14 builds for efr32, linux, p6)
platform target config section 16606a4 67b62ad change % change
efr32 lighting-app BRD4161A+rpc (read only) 932940 932956 16 0.0
.text 932932 932948 16 0.0
linux all-clusters-app debug (read only) 2622753 2622785 32 0.0
.text 2231218 2231250 32 0.0
bridge-app debug+rpc (read only) 1831453 1831485 32 0.0
.text 1565477 1565509 32 0.0
chip-tool debug (read only) 10679029 10679061 32 0.0
.text 9311701 9311733 32 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 10280588 10280620 32 0.0
.text 8665028 8665060 32 0.0
door-lock-app debug (read only) 2102545 2102577 32 0.0
.text 1761362 1761394 32 0.0
lighting-app debug+rpc (read only) 2305049 2305081 32 0.0
.text 1958642 1958674 32 0.0
ota-provider-app debug (read only) 2040289 2040321 32 0.0
.text 1712274 1712306 32 0.0
ota-requestor-app debug (read only) 2069641 2069673 32 0.0
.text 1743426 1743458 32 0.0
shell debug (read only) 2517569 2517601 32 0.0
.text 2143890 2143922 32 0.0
thermostat-no-ble arm64 (read only) 2348540 2348588 48 0.0
.text 1976416 1976464 48 0.0
tv-app debug (read only) 2793361 2793393 32 0.0
.text 2400194 2400226 32 0.0
p6 all-clusters-app default (read/write) 2512776 2512792 16 0.0
.text 1471040 1471056 16 0.0
light-app default (read/write) 2413744 2413760 16 0.0
.text 1372008 1372024 16 0.0
Full report (28 builds for cc13x2_26x2, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 16606a4 67b62ad change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 674667 674667 0 0.0
(read/write) 176812 176812 0 0.0
.bss 81520 81520 0 0.0
.data 3216 3216 0 0.0
.rodata 80715 80715 0 0.0
.text 593472 593472 0 0.0
lock-mtd LP_CC2652R7 (read only) 623803 623803 0 0.0
(read/write) 154320 154320 0 0.0
.bss 77248 77248 0 0.0
.data 3216 3216 0 0.0
.rodata 80603 80603 0 0.0
.text 542712 542712 0 0.0
pump-app LP_CC2652R7 (read only) 682115 682115 0 0.0
(read/write) 170540 170540 0 0.0
.bss 81928 81928 0 0.0
.data 3248 3248 0 0.0
.rodata 75467 75467 0 0.0
.text 606164 606164 0 0.0
pump-controller-app LP_CC2652R7 (read only) 676451 676451 0 0.0
(read/write) 175932 175932 0 0.0
.bss 81656 81656 0 0.0
.data 3212 3212 0 0.0
.rodata 79243 79243 0 0.0
.text 596724 596724 0 0.0
efr32 lighting-app BRD4161A (read only) 905068 905068 0 0.0
(read/write) 133160 133160 0 0.0
.bss 131120 131120 0 0.0
.data 2040 2040 0 0.0
.text 905060 905060 0 0.0
BRD4161A+rpc (read only) 932940 932956 16 0.0
(read/write) 149108 149108 0 0.0
.bss 146888 146888 0 0.0
.data 2220 2220 0 0.0
.text 932932 932948 16 0.0
window-app BRD4161A (read only) 842348 842348 0 0.0
(read/write) 131228 131228 0 0.0
.bss 129280 129280 0 0.0
.data 1948 1948 0 0.0
.text 842340 842340 0 0.0
esp32 all-clusters-app c3devkit (read only) 991958 991958 0 0.0
(read/write) 1462090 1462090 0 0.0
.dram0.bss 62944 62944 0 0.0
.dram0.data 14364 14364 0 0.0
.flash.rodata 199312 199312 0 0.0
.flash.text 991958 991958 0 0.0
.iram0.text 62572 62572 0 0.0
m5stack (read only) 1044615 1044615 0 0.0
(read/write) 463152 463152 0 0.0
.dram0.bss 68464 68464 0 0.0
.dram0.data 34160 34160 0 0.0
.flash.rodata 228384 228384 0 0.0
.flash.text 1039231 1039231 0 0.0
.iram0.text 123415 123415 0 0.0
k32w light k32w061+release (read/write) 685388 685388 0 0.0
.bss 78208 78208 0 0.0
.data 2036 2036 0 0.0
.text 599344 599344 0 0.0
lock k32w061+release (read/write) 690084 690084 0 0.0
.bss 78784 78784 0 0.0
.data 1996 1996 0 0.0
.text 603504 603504 0 0.0
linux all-clusters-app debug (read only) 2622753 2622785 32 0.0
(read/write) 145640 145640 0 0.0
.bss 57664 57664 0 0.0
.data 1824 1824 0 0.0
.data.rel.ro 80264 80264 0 0.0
.dynamic 592 592 0 0.0
.got 4320 4320 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 222661 222661 0 0.0
.text 2231218 2231250 32 0.0
bridge-app debug+rpc (read only) 1831453 1831485 32 0.0
(read/write) 91304 91304 0 0.0
.bss 44344 44344 0 0.0
.data 2912 2912 0 0.0
.data.rel.ro 38936 38936 0 0.0
.dynamic 592 592 0 0.0
.got 3936 3936 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 148505 148505 0 0.0
.text 1565477 1565509 32 0.0
chip-tool debug (read only) 10679029 10679061 32 0.0
(read/write) 371736 371736 0 0.0
.bss 22752 22752 0 0.0
.data 1104 1104 0 0.0
.data.rel.ro 341632 341632 0 0.0
.dynamic 624 624 0 0.0
.got 4928 4928 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 538389 538389 0 0.0
.text 9311701 9311733 32 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 10280588 10280620 32 0.0
(read/write) 492145 492145 0 0.0
.bss 41009 41009 0 0.0
.data 1168 1168 0 0.0
.data.rel.ro 388776 388776 0 0.0
.dynamic 560 560 0 0.0
.got 57392 57392 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 512524 512524 0 0.0
.text 8665028 8665060 32 0.0
door-lock-app debug (read only) 2102545 2102577 32 0.0
(read/write) 119024 119024 0 0.0
.bss 47936 47936 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 64056 64056 0 0.0
.dynamic 592 592 0 0.0
.got 4264 4264 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 186537 186537 0 0.0
.text 1761362 1761394 32 0.0
lighting-app debug+rpc (read only) 2305049 2305081 32 0.0
(read/write) 127344 127344 0 0.0
.bss 50144 50144 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 69544 69544 0 0.0
.dynamic 608 608 0 0.0
.got 4312 4312 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 181673 181673 0 0.0
.text 1958642 1958674 32 0.0
ota-provider-app debug (read only) 2040289 2040321 32 0.0
(read/write) 114592 114592 0 0.0
.bss 47840 47840 0 0.0
.data 1608 1608 0 0.0
.data.rel.ro 59384 59384 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 632 632 0 0.0
.rodata 172451 172451 0 0.0
.text 1712274 1712306 32 0.0
ota-requestor-app debug (read only) 2069641 2069673 32 0.0
(read/write) 117880 117880 0 0.0
.bss 48800 48800 0 0.0
.data 1864 1864 0 0.0
.data.rel.ro 61624 61624 0 0.0
.dynamic 592 592 0 0.0
.got 4304 4304 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 168876 168876 0 0.0
.text 1743426 1743458 32 0.0
shell debug (read only) 2517569 2517601 32 0.0
(read/write) 149168 149168 0 0.0
.bss 67368 67368 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 74808 74808 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 214290 214290 0 0.0
.text 2143890 2143922 32 0.0
thermostat-no-ble arm64 (read only) 2348540 2348588 48 0.0
(read/write) 150497 150497 0 0.0
.bss 63025 63025 0 0.0
.data 1424 1424 0 0.0
.data.rel.ro 78264 78264 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 368 368 0 0.0
.rodata 144652 144652 0 0.0
.text 1976416 1976464 48 0.0
tv-app debug (read only) 2793361 2793393 32 0.0
(read/write) 251096 251096 0 0.0
.bss 165032 165032 0 0.0
.data 4448 4448 0 0.0
.data.rel.ro 75408 75408 0 0.0
.dynamic 592 592 0 0.0
.got 4680 4680 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 213451 213451 0 0.0
.text 2400194 2400226 32 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2366996 2366996 0 0.0
.bss 185060 185060 0 0.0
.data 5840 5840 0 0.0
.text 1329596 1329596 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1153663 1153663 0 0.0
bss 135540 135540 0 0.0
rodata 146120 146120 0 0.0
text 793392 793392 0 0.0
p6 all-clusters-app default (read/write) 2512776 2512792 16 0.0
.bss 118464 118464 0 0.0
.data 2768 2768 0 0.0
.text 1471040 1471056 16 0.0
light-app default (read/write) 2413744 2413760 16 0.0
.bss 111960 111960 0 0.0
.data 2576 2576 0 0.0
.text 1372008 1372024 16 0.0
lock-app default (read/write) 2377304 2377304 0 0.0
.bss 111704 111704 0 0.0
.data 2536 2536 0 0.0
.text 1335568 1335568 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 799480 799480 0 0.0
bss 70064 70064 0 0.0
noinit 40416 40416 0 0.0
text 568290 568290 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit b3cb89a into project-chip:master Apr 8, 2022
@bzbarsky-apple bzbarsky-apple deleted the clear-secret-data branch April 8, 2022 01:31
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
Keypairs do this automatically, but we're using a raw buffer for the IPK.
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.

4 participants