Bug 1752050

Summary: Memory corruption in systemd-cryptsetup
Product: Red Hat Enterprise Linux 8 Reporter: Sergio Correia <scorreia>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: urgent    
Version: 8.0CC: dtardon, fkrska, msekleta, rmetrich, systemd-maint-list, toneata
Target Milestone: rcKeywords: ZStream
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-239-19.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1777037 (view as bug list) Environment:
Last Closed: 2020-04-28 16:45:02 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:
Bug Depends On:    
Bug Blocks: 1751912, 1777037    

Description Sergio Correia 2019-09-13 14:33:59 UTC
Description of problem:

When trying to use clevis to unlock multiple LUKS devices automatically, systemd-cryptsetup crashes with SIGABRT.


Version-Release number of selected component (if applicable):

systemd-239-13.el8.x86_64

How reproducible:
Always, when using a clevis setup as per https://bugzilla.redhat.com/show_bug.cgi?id=1751912


Steps to Reproduce:
1.  Install RHEL 8.0 w/ multiple LUKS1 devices
2.  Configure the LUKS devices to be decrypted with tang server
3.  Reboot

Actual results:

systemd-cryptsetup will crash due to memory corruption.
journalctl will have messages like the following:

systemd-cryptsetup@luks\x2dc695d0af\x2db6a0\x2d4e93\x2d941f\x2d53c0f36c865d.service: Main process exited, code=dumped, status=6/ABRT
Sep 13 07:11:47 rhel-luks1 systemd[1]: systemd-cryptsetup@luks\x2dc695d0af\x2db6a0\x2d4e93\x2d941f\x2d53c0f36c865d.service: Failed with result 'core-dump'.
Sep 13 07:11:47 rhel-luks1 systemd[1]: Failed to start Cryptography Setup for luks-c695d0af-b6a0-4e93-941f-53c0f36c865d.


Expected results:

No crashes in systemd-cryptsetup.

Additional info:

Backporting this upstream fix resolves this particular memory corruption: https://github.com/systemd/systemd/commit/59c55e73eaee345e1ee67c23eace8895ed499693

Comment 1 David Tardon 2019-09-17 13:45:29 UTC
PR: https://github.com/systemd-rhel/rhel-8/pull/20

Comment 3 Renaud Métrich 2019-10-09 15:11:05 UTC
*** Bug 1759954 has been marked as a duplicate of this bug. ***

Comment 5 Lukáš Nykrýn 2019-10-21 09:21:42 UTC
fix merged to github master branch -> https://github.com/systemd-rhel/rhel-8/pull/20 -> post

Comment 10 errata-xmlrpc 2020-04-28 16:45:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1794