Bug 2370858 - Segfault when trying to read empty environment.d files
Summary: Segfault when trying to read empty environment.d files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libeconf
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-06 17:41 UTC by Paul Holzinger
Modified: 2025-06-16 02:52 UTC (History)
3 users (show)

Fixed In Version: libeconf-0.7.6-2.fc42
Clone Of:
Environment:
Last Closed: 2025-06-16 02:52:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
stack trace (1.05 KB, text/plain)
2025-06-06 17:43 UTC, Paul Holzinger
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.