Bug 1688752

Summary: Libargon2 crash under memory pressure
Product: [Fedora] Fedora Reporter: Milan Broz <mbroz>
Component: argon2Assignee: Milan Broz <mbroz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fedora, gmazyland
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: argon2-20161029-7.fc29 argon2-20161029-8.fc30 argon2-20161029-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-23 02:56:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milan Broz 2019-03-14 11:22:49 UTC
Description of problem:

The libargon2 can exhaust system resourses (specifically if running under cgroup memory limits).

In this case create_pthread() fails, code then does not wait for remaining threads and these access deallocated memory. Libargon2 crashes with segfault or FPU exception.

Version-Release number of selected component (if applicable):
libargon2-20161029-7.fc30

How reproducible:
Set cgroups memory limit and run multiple argon2 instances in parallel requiring multiple threads (parallel cost parameter > 1) in this cgroup (reproducible aslo with cryptsetup and LUKS2).
...

Additional info:

This is upstream patch for the issue:
https://github.com/P-H-C/phc-winner-argon2/commit/cfa4385e728116989ad88b4be7c23b4868422778

Comment 1 Fedora Update System 2019-03-18 15:20:04 UTC
argon2-20161029-7.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-9dfcd35331

Comment 2 Fedora Update System 2019-03-18 15:20:12 UTC
argon2-20161029-8.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8513e044f7

Comment 3 Fedora Update System 2019-03-18 15:20:21 UTC
argon2-20161029-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-69cc80873b

Comment 4 Fedora Update System 2019-03-19 04:02:21 UTC
argon2-20161029-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-69cc80873b

Comment 5 Fedora Update System 2019-03-19 04:44:20 UTC
argon2-20161029-7.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-9dfcd35331

Comment 6 Fedora Update System 2019-03-21 19:10:37 UTC
argon2-20161029-8.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-8513e044f7

Comment 7 Fedora Update System 2019-03-23 02:56:46 UTC
argon2-20161029-7.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2019-03-29 19:17:40 UTC
argon2-20161029-8.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2019-04-03 18:50:57 UTC
argon2-20161029-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.