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

attachment: Use SHA-256 instead of SHA-1 #158

Merged
merged 1 commit into from
Mar 16, 2017

Conversation

eungjun-yi
Copy link
Contributor

Overwriting an existing attachment file maliciously is possible since
Yona uses SHA-1 algorithm, which is known to be shattered1, to digest
the contents to generate the names of the attachment files.

This fix ensures backward compatibility. Only new attachments have
filenames generated by SHA-256 algorithm. Fortunately, the length of
'name' column of 'attachment' table is 255 which is enough to store
SHA-256 which requires 64.

Overwriting an existing attachment file maliciously is possible since
Yona uses SHA-1 algorithm, which is known to be shattered[1], to digest
the contents to generate the names of the attachment files.

This fix ensures backward compatibility. Only new attachments have
filenames generated by SHA-256 algorithm. Fortunately, the length of
'name' column of 'attachment' table is 255 which is enough to store
SHA-256 which requires 64.

[1]: https://shattered.it/
@sjstyle
Copy link
Collaborator

sjstyle commented Feb 26, 2017

@benelog
사내 버전에도 backport 패치를 적용할 계획입니다.

@sjstyle
Copy link
Collaborator

sjstyle commented Feb 27, 2017

Yona 모든 버전에 취약점이 존재하며, 해당 커밋으로 문제가 해결되는 것을 확인하였습니다.

아직까지는 해당 취약점을 악용하는 것은 거의 불가능하므로 당장 패치해야하는 상황은 아닌것으로 파악했습니다.

@doortts doortts force-pushed the master branch 3 times, most recently from a9dd787 to 53db075 Compare March 14, 2017 15:41
@doortts doortts merged commit 0afae59 into yona-projects:master Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants