Cse counter overflow leads to write protection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cse counter overflow leads to write protection

Jump to solution
2,598 Views
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 Kudos
Reply
1 Solution
2,530 Views
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

View solution in original post

0 Kudos
Reply
5 Replies
2,568 Views
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 Kudos
Reply
2,564 Views
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 Kudos
Reply
2,559 Views
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 Kudos
Reply
2,547 Views
RedOne
Contributor III

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

0 Kudos
Reply
2,531 Views
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 Kudos
Reply