coredumpctl does not show dump information to non-root users
This document (000021326) is provided subject to the disclaimer at the end of this document.
Environment
Situation
s12sp5:~ # whoami root s12sp5:~ # coredumpctl list TIME PID UID GID SIG PRESENT EXE Mon 2024-01-17 10:57:26 CET 12654 0 0 6 * /usr/bin/sleep Wed 2024-01-17 10:58:11 CET 12704 1000 100 6 * /usr/bin/top s12sp5:~ # s12sp5:~ # su - wtmpx -c "coredumpctl list" No coredumps found.
However on SLE 15 coredumpctl command can list core files owned by the respective user of the process/ application dumping the core.
s15sp5:~ # whoami root s15sp5:~ # coredumpctl list TIME PID UID GID SIG COREFILE EXE SIZE Wed 2024-01-17 11:06:27 CET 12117 1000 100 SIGABRT present /usr/bin/sleep 28.2K Wed 2024-01-17 11:06:50 CET 12170 1001 100 SIGABRT present /usr/bin/sleep 28.3K Wed 2024-01-17 11:07:39 CET 12183 0 0 SIGABRT present /usr/bin/sleep 28.5K s15sp5:~ # s15sp5:~ # su - wtmpx -c "coredumpctl list -q" TIME PID UID GID SIG COREFILE EXE SIZE Wed 2024-01-17 11:06:27 CET 12117 1000 100 SIGABRT present /usr/bin/sleep 28.2K s15sp5:~ # s15sp5:~ # su - rayan -c "coredumpctl list -q" TIME PID UID GID SIG COREFILE EXE SIZE Wed 2024-01-17 11:06:50 CET 12170 1001 100 SIGABRT present /usr/bin/sleep 28.3K
Resolution
Another solution would be by upgrading SUSE Linux Enterprise Server 12 SP5 to a supported SUSE Linux Enterprise Server 15 (https://www.suse.com/lifecycle) release.
Adding extra permissions to non-root users via sudo to run coredumpctl with root permission is not advisable and will create a major security issue. As core files may contain the complete memory layout of the process at the time it crashed, they may contain sensitive/privileged information (e.g. cached credentials, keys) and should be kept private.
Cause
Additional Information
Note that coredumpctl needs access to the journal files to retrieve the relevant entries from the journal. Thus, an unprivileged user will normally only see information about crashing programs of this user.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021326
- Creation Date: 17-Jan-2024
- Modified Date:22-Jan-2024
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com