Bug 1128400 - ABRT does not honor dmesg_restrict
Summary: ABRT does not honor dmesg_restrict
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: abrt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1227661
Blocks: 1214172 1214175
TreeView+ depends on / blocked
 
Reported: 2014-08-10 04:50 UTC by tborland1
Modified: 2015-06-21 00:33 UTC (History)
4 users (show)

Fixed In Version: gnome-abrt-1.2.0-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1214175 (view as bug list)
Environment:
Last Closed: 2015-06-21 00:33:34 UTC


Attachments (Terms of Use)
trigger Kerneloops from any user (453 bytes, text/x-python)
2014-08-10 04:50 UTC, tborland1
no flags Details

Description tborland1 2014-08-10 04:50:25 UTC
Created attachment 925466 [details]
trigger Kerneloops from any user

Description of problem:
Kerneloops handlers can be called by any user by communicating directly with the journal unix socket and setting the analyzer as Kerneloops. When this analyzer is set then dmesg is called and dumped to the output dump directory. The dump file is given the permissions of the calling user, which allows any user to read dmesg.

The problem is that no appropriate checks or privilege dropping is done before calling dmesg.

How reproducible:
As long as bug is not duplicate (change type), always when the script is ran from any user.


Steps to Reproduce:
1. Set dmesg_restrict
2. Run attached Python script
3. Navigate to dump directory
4. View dmesg

Actual results:
$ cat /proc/sys/kernel/dmesg_restrict 
1

$ dmesg 
dmesg: read kernel buffer failed: Operation not permitted

$ cat /dev/kmsg 
cat: /dev/kmsg: Operation not permitted

$ python kerneloops.py

$ stat /var/tmp/abrt/dumpit-2014-08-09-23\:02\:36-1/dmesg 
..
Access: (0660/-rw-rw----)  Uid: ( 1001/ test)   Gid: (  173/    abrt)
...

Expected results:
Don't dump dmesg if calling user is restricted.

Comment 1 Murray McAllister 2014-08-12 05:24:23 UTC
Hello,

Thank you for the report! I am going to get one of our kernel people to check this, whether it should be treated as a security flaw or just hardening.

Thanks,

--
Murray McAllister / Red Hat Product Security

Comment 2 Jakub Filak 2014-11-11 09:29:53 UTC
(In reply to Murray McAllister from comment #1)
Murray, any update on this bug report?

Should ABRT stop saving dmesg in the problem directories? Or should ABRT make the problem data accessible to root only if /proc/sys/kernel/dmesg_restrict is 1?

I prefer the latter option.

Comment 3 Murray McAllister 2014-12-18 02:45:46 UTC
Apologies for missing this and the long delay. From our kernel person:

"this could be treated more as a hardening issue than a security one. More so, it needs to be fixed on the abrtd side, as it provides the journal socket access to user applications to write log messages. without it, the reproducer does not work."

Comment 4 Murray McAllister 2014-12-18 02:47:51 UTC
I have asked someone to provide guidance on the question.

Comment 5 Josh Bressers 2015-03-31 17:50:12 UTC
I'm removing the security flag from this bug. Fedora should not have embargoed issues and this should be opened up so it can be fixed.

Comment 6 tborland1 2015-04-17 16:08:50 UTC
With all of the new abrt issues going on around and other 'information disclosure' ones coming out, I figured I should update this ticket so it's in the list.

Comment 7 Fedora End Of Life 2015-05-29 12:35:51 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Florian Weimer 2015-05-29 12:51:46 UTC
Still present in Fedora 21 at least.

Comment 9 Fedora Update System 2015-06-11 10:15:57 UTC
gnome-abrt-1.2.0-1.fc22,abrt-2.6.0-1.fc22,libreport-2.6.0-1.fc22,satyr-0.18-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/gnome-abrt-1.2.0-1.fc22,abrt-2.6.0-1.fc22,libreport-2.6.0-1.fc22,satyr-0.18-1.fc22

Comment 10 Jakub Filak 2015-06-11 20:25:29 UTC
Upstream commit https://github.com/abrt/abrt/commit/45975f6b8d6940865b67f63b99a062b5ecbb217b fixes this bug.

Comment 11 Fedora Update System 2015-06-13 06:37:42 UTC
Package gnome-abrt-1.2.0-1.fc22, abrt-2.6.0-1.fc22, libreport-2.6.0-1.fc22, satyr-0.18-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gnome-abrt-1.2.0-1.fc22 abrt-2.6.0-1.fc22 libreport-2.6.0-1.fc22 satyr-0.18-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-9886/gnome-abrt-1.2.0-1.fc22,abrt-2.6.0-1.fc22,libreport-2.6.0-1.fc22,satyr-0.18-1.fc22
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2015-06-21 00:33:34 UTC
gnome-abrt-1.2.0-1.fc22, abrt-2.6.0-1.fc22, libreport-2.6.0-1.fc22, satyr-0.18-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, 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.