Cse counter overflow leads to write protection

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Cse counter overflow leads to write protection

ソリューションへジャンプ
2,631件の閲覧回数
RedOne
Contributor III

Hello 

So I guess I found a bug or something 

What I did is that I tried to write value of counter in function calculate_M1_to_M5 to 4294967295 which is max value of uint (because parameter counter is uint type) to see what happen at overflow. I write a key with this value and nothing bad happened, however, Next I should be passing 0 at counter, but keys already hit write protection. Now I can’t erase them. Is there any way to reset memory to erase all keys?

0 件の賞賛
返信
1 解決策
2,563件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

If write protection is set, there's no way to recover. Even NXP factory can't unlock it.

Regards,

Lukas

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,601件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Denis,

width of the counter is 28bits, not 32bits. The SHE specification talks about "saturating counter", so no overflow can happen. Do you mean that destroying of the partition using CMD_DBG_CHAL and CMD_DBG_AUTH is nor working? If you set counter 4294967295 (i.e. 32bits), is it possible that additional bits set write protection somehow?

Regards,

Lukas

0 件の賞賛
返信
2,597件の閲覧回数
RedOne
Contributor III

It looks like overflow did set write protection bit, and no, cmd_debug don’t do anything because keys are now write protected. Are there any other ways to set protection bit back to 0? Like hard reset of some sort?

0 件の賞賛
返信
2,592件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Setting of the write protection bit is irreversible operation, it's not possible to reset the device back to factory state. This requirement is given by SHE specification.

Regards,

Lukas

0 件の賞賛
返信
2,580件の閲覧回数
RedOne
Contributor III

So basically my device is now bricked in that regard? Even sending it to nxp wouldn’t help?

0 件の賞賛
返信
2,564件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

If write protection is set, there's no way to recover. Even NXP factory can't unlock it.

Regards,

Lukas

0 件の賞賛
返信