Bug 2370858

Summary: Segfault when trying to read empty environment.d files
Product: [Fedora] Fedora Reporter: Paul Holzinger <pholzing>
Component: libeconfAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 42CC: dustymabe, ipedrosa, ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: libeconf-0.7.6-2.fc42 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-06-16 02:52:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
stack trace none

Description Paul Holzinger 2025-06-06 17:41:46 UTC
When configuring some empty env files I got locked out of the system and was unable to login via many tools. There is a segfault when using pam so that is why logins no longer work. The actual stack trace shows libeconf as culprint.


Reproducible: Always

Steps to Reproduce:
Note only do this on a system when you are already logged in as root so you can recover by deleting the files again or on a throw away VM.

1. mkdir -p /etc/environment.d
2. echo '' > /etc/environment.d/default-env.conf
3. echo '' > /etc/environment.d/default-env2.conf
Actual Results:
$ sudo ps
Segmentation fault (core dumped)


Expected Results:
It should work on not segfault.

Additional Information:
I build libeconf locally and this was fixed upstream in https://github.com/openSUSE/libeconf/pull/229/commits/a84bfe9911ffb67da1478e967d19790934a9c976 as best as I can tell

Comment 1 Paul Holzinger 2025-06-06 17:43:10 UTC
Created attachment 2093253 [details]
stack trace

Comment 2 Fedora Update System 2025-06-11 09:39:03 UTC
FEDORA-2025-0975bbb70e (libeconf-0.7.6-2.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-0975bbb70e

Comment 3 Fedora Update System 2025-06-12 02:58:50 UTC
FEDORA-2025-0975bbb70e has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-0975bbb70e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-0975bbb70e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2025-06-16 02:52:15 UTC
FEDORA-2025-0975bbb70e (libeconf-0.7.6-2.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.