Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1443981 - writing ARM image to SD card: 'Message recipient disconnected from message bus without replying'
Summary: writing ARM image to SD card: 'Message recipient disconnected from message bu...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-20 11:25 UTC by Lukas Brabec
Modified: 2019-06-19 12:27 UTC (History)
14 users (show)

Fixed In Version: selinux-policy-3.13.1-257.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:43:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
ausearch -m AVC,USER_AVC -ts today (5.41 KB, text/x-vhdl)
2017-06-13 13:08 UTC, Lukas Brabec
no flags Details

Description Lukas Brabec 2017-04-20 11:25:06 UTC
Description of problem:
When trying to write ARM image to SD card I got an error message: 'Message recipient disconnected from message bus without replying' and nothing is written to the card. Same procedure with USB stick works as expected.


Version-Release number of selected component (if applicable):
mediawriter-4.0.95-1.fc26.x86_64


Steps to Reproduce:
1. insert SD card (or anywhere before step 5)
2. run mediawriter
3. select Fedora Xfce Desktop
4. click 'Create Live USB' and wait until the image is downloaded
5. click 'Write to disk'

Actual results:
user is prompted for password, but after that an error message is shown: 'Message recipient disconnected from message bus without replying'

Expected results:
image is written to SD card

Comment 1 Martin Bříza 2017-04-20 11:29:05 UTC
Writing a normal image to the SD card works ok?

Comment 2 Lukas Brabec 2017-04-20 11:46:09 UTC
(In reply to Martin Bříza from comment #1)
> Writing a normal image to the SD card works ok?

nope, same error message

Comment 3 Martin Bříza 2017-04-24 08:37:58 UTC
I'll check this on more computers. In case it works for me, I'll stop by in your cubicle.

Comment 4 Martin Bříza 2017-04-25 10:30:57 UTC
Doesn't work in GNOME Disks either, the problem lies somewhere below in the stack, either in udisks/storage or even selinux.
Reassigning.

Comment 5 Tomas Smetana 2017-04-25 10:33:15 UTC
I find it unlikely you're using storaged in F26...

Comment 6 Martin Bříza 2017-04-25 10:38:49 UTC
Thanks, I wasn't sure if we switched back or not. Sorry for using the wrong component. :)

Comment 7 Vratislav Podzimek 2017-05-26 13:26:21 UTC
(In reply to Martin Bříza from comment #4)
> Doesn't work in GNOME Disks either, the problem lies somewhere below in the
> stack, either in udisks/storage or even selinux.

Good guess! Here's what I've found out so far:

1. udisks2 is terminated with SIGTERM after processing the request to open a device for writing
2. it's udisks2 itself sending the SIGTERM
3. this all only happens with SELinux in enforcing mode

The OpenForRestore() method is using a bit special feature of DBus (and POSIX sockets in general) -- it passes an open file descriptor over the DBus (socket). So I guess SELinux has some special treatment for this?

Comment 8 Vratislav Podzimek 2017-05-26 20:19:27 UTC
So this is specific to an SD card accessed as an 'mmcblk' device, i.e. over the internal card reader. When I used and external card reader, which presents the card as a SATA/SCSI-like device (/dev/sdb), everything worked just fine. Also, when I created a loop device on top of the mmcblk device, everything worked fine on that loop device.

The difference is quite clear from the output of 'll -Z':

brw-rw----. 1 root disk system_u:object_r:fixed_disk_device_t:s0 8, 0 May 26 20:21 /dev/sdb

brw-rw----. 1 root disk system_u:object_r:fixed_disk_device_t:s0 7, 0 May 26 20:23 /dev/loop0

brw-rw----. 1 root disk system_u:object_r:removable_device_t:s0 179, 0 May 26 20:22 /dev/mmcblk0

The problem is clearly with the 'removable_device_t' label on the card being accessed over the mmc_block driver.

I just don't know yet, where the problematic definitions are as well as what defines labels on those devices. Just selinux-policy and udev, respectively, I guess?

Comment 9 Vratislav Podzimek 2017-05-29 07:54:06 UTC
Reassigning to selinux-policy as this is clearly a SELinux-related issue. I believe the policy needs an extra "rule" next to this one:

storage_raw_read_fixed_disk(udisks2_t)

which would enable the raw_read for removable_device_t.

Comment 10 Fedora Update System 2017-06-08 11:10:13 UTC
selinux-policy-3.13.1-257.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6a43388229

Comment 11 Fedora Update System 2017-06-10 01:09:47 UTC
selinux-policy-3.13.1-257.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6a43388229

Comment 12 Fedora Update System 2017-06-12 13:05:49 UTC
selinux-policy-3.13.1-257.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Lukas Brabec 2017-06-13 11:42:49 UTC
I still have the same issue:

W@27747ms: Writing failed: "Message recipient disconnected from message bus without replying"

selinux-policy-3.13.1-257.fc26.noarch
mediawriter-4.1.0-1.fc26.x86_64

but when I disable selinux (setenforce 0), fmw works as expected. Reopening.

Comment 14 Lukas Vrabec 2017-06-13 12:23:12 UTC
Lukas,

Could you set switch to permissive mode:
# setenforce 0

And then reproduce the scenario and attach output of: 
# ausearch -m AVC, USER_AVC -ts today 

THanks. 
Lukas.

Comment 15 Lukas Brabec 2017-06-13 13:08:42 UTC
Created attachment 1287287 [details]
ausearch -m AVC,USER_AVC -ts today

Comment 16 Kevin R. Page 2018-01-14 22:26:03 UTC
Also experienced currently on F27.

Works with a USB SD card writer; this error is thrown when using the laptop inbuilt SD card slot.

mediawriter-4.1.1-1.fc27.x86_64

Comment 17 Fedora End Of Life 2018-05-03 07:56:50 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 '26'.

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 26 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 18 Fedora End Of Life 2018-05-29 11:43:53 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 19 Diego 2019-06-19 09:56:22 UTC
(In reply to Kevin R. Page from comment #16)
> Also experienced currently on F27.
> 
> Works with a USB SD card writer; this error is thrown when using the laptop
> inbuilt SD card slot.
> 
> mediawriter-4.1.1-1.fc27.x86_64

Same happened to me with mediawriter-4.1.4-1.fc28.x86_64. I'll let you know if this happens on F30 when I'll upgrade.


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