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

[tlul] tlul_sram_byte data integrity check #8815

Open
tjaychen opened this issue Oct 21, 2021 · 15 comments
Open

[tlul] tlul_sram_byte data integrity check #8815

tjaychen opened this issue Oct 21, 2021 · 15 comments
Labels
Component:Doc Documentation issue Component:Security Component:Software Issue related to Software IP:tlul Priority:P3 Priority: low SW:cryptolib Crypto library Type:Enhancement Feature requests, enhancements
Milestone

Comments

@tjaychen
Copy link

tjaychen commented Oct 21, 2021

When a byte write is issued to memory, tlul_sram_byte is responsible for doing a read first to generate the new word-wise integrity.

However, the read data integrity is not checked as part of this generation. This potentially creates a security risk.

estimate 4

@tjaychen tjaychen self-assigned this Oct 21, 2021
@tjaychen
Copy link
Author

@weicaiyang

@weicaiyang
Copy link
Contributor

Let's review this in D2S meeting

@msfschaffner
Copy link
Contributor

msfschaffner commented Jan 12, 2022

@tjaychen, should we just check ECC on all SRAM reads in this case (like we do on incoming TL-UL transactions)?
I.e., if we are adding this logic anyway, we might as let all read transactions benefir from it...

@tjaychen
Copy link
Author

o sorry, this is due to lack of a tagging scheme.
This is meant to be "future" improvement. I'm not too concerned about weaknesses in the byte case because we already KNOW it is weaker than a full word write / read.

@tjaychen tjaychen added Type:Enhancement Feature requests, enhancements Priority:P3 Priority: low labels Jan 12, 2022
@msfschaffner
Copy link
Contributor

Ah got it, thanks for the clarification!

FYI @moidx @cfrantz

@moidx moidx added the Component:Software Issue related to Software label Jan 13, 2022
@moidx
Copy link
Contributor

moidx commented Jan 13, 2022

Tagging with software label as this needs to be added to the software implementation guidelines.

@msfschaffner msfschaffner added the Type:FutureRelease Not relevant to currently planned releases/milestones label Aug 23, 2022
@andreaskurth
Copy link
Contributor

Triaged for tlul. Are we sure we don't want to check the integrity of data read in tlul_sram_byte by adding a tlul_data_integ_dec and feeding its data_err_o into error_o? (This to me does not seem to be a complex change, though we might have to insert some flops to break overly long paths coming out of SRAMs.) Tagging @vogelpi for a security opinion

@vogelpi
Copy link
Contributor

vogelpi commented Mar 10, 2023

Thanks for tagging me @andreaskurth . After having studied the RTL I agree that the change would probably be rather simple and it would be a nice to have for M2.5. However, it's not critical. Thus, I label this as P3. If we don't have time to do it or things turn out more difficult, we can instead include information on this in the software guidelines.

@vogelpi vogelpi added this to the Discrete: M2.5 milestone Mar 10, 2023
@vogelpi vogelpi added Triaged and removed Type:FutureRelease Not relevant to currently planned releases/milestones labels Mar 10, 2023
@msfschaffner
Copy link
Contributor

Given that byte-writes are already considered less secure due to the ECC recomputation, I would lump this into software guidance for now and forego the RTL change.

@msfschaffner
Copy link
Contributor

@moidx since this is documentation-only, I'll move this to the M2.5 Backlog.

@msfschaffner msfschaffner added the Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones label Oct 6, 2023
@msfschaffner msfschaffner removed this from the Earlgrey ES M2.5.Backlog milestone Nov 3, 2023
@msfschaffner
Copy link
Contributor

msfschaffner commented Feb 20, 2024

@vogelpi @johannheyszl are we ok with leaving this in the documentation-only category for Earlgrey-PROD?
If so, does it make sense to capture that in the SW guidelines?

@johannheyszl
Copy link
Contributor

Both ways - adding to guidelines, or a modification - sgtm. If the fix is small and we can avoid one more item on the guidelines, that is a benefit. @vogelpi ?

@msfschaffner
Copy link
Contributor

I would lean towards no change at this point, since this also introduces again more DV effort.

@vogelpi
Copy link
Contributor

vogelpi commented Feb 23, 2024

Ideally, we would have changed the design here but I agree to leave this as is for Earlgrey-PROD. There are other, higher priority things to be taken care of first.

@johannheyszl johannheyszl added SW:cryptolib Crypto library and removed Hotlist:Security Security Opinion Needed Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones labels Mar 25, 2024
@vogelpi
Copy link
Contributor

vogelpi commented Mar 25, 2024

This was discussed in the Sec WG meeting on Mar 14, 2024 . It was concluded to leave this as is.

There are also other reasons for not doing byte writes and we have already SW guidance for those. For example, byte-write operations are not favorable from an SCA viewpoint. In both cases, SW should first perform a word read and then insert the byte inside the ALU and write back the full word.

@vogelpi vogelpi modified the milestones: Earlgrey-PROD.M3, cryptolib Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Doc Documentation issue Component:Security Component:Software Issue related to Software IP:tlul Priority:P3 Priority: low SW:cryptolib Crypto library Type:Enhancement Feature requests, enhancements
Projects
None yet
Development

No branches or pull requests

8 participants