Bug 1212120

Summary: libnbcompat: broken sha256 hashes with -fstrict-aliasing
Product: [openSUSE] openSUSE Tumbleweed Reporter: Aleksa Sarai <asarai>
Component: SecurityAssignee: Aleksa Sarai <asarai>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Aleksa Sarai 2023-06-08 01:03:12 UTC
This has already been fixed upstream in [1], the core issue is that the sha2.c code has a strict aliasing violation which GCC >= 11 optimises in a way that produces incorrect sha256 hashes. This is easily verifiable by using "nmtree -k sha256digest -c" on Tumbleweed.

[1]: https://github.com/archiecobbs/libnbcompat/commit/864c1cf42c2c605636008626f171caf6410421cb