Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1515304 - Permission error mapping temporary file
Summary: Permission error mapping temporary file
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-20 14:31 UTC by Frediano Ziglio
Modified: 2017-11-28 23:53 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-283.17.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-11-28 23:53:24 UTC

Attachments (Terms of Use)

Description Frediano Ziglio 2017-11-20 14:31:13 UTC
Description of problem:
Trying spice-server compiled with --enable-statistics Qemu launched by libvirt fails to map a shared memory object.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
This used reproduced with a custom build of spice-server (master) with --enable-statistics used. Basically the program do in sequence:
- shm_open read/write (shm_open(stat_file->shm_name, O_CREAT | O_RDWR, 0444))
- ftruncate to get some space in the file
- mmap call (mmap(NULL, shm_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0))

Actual results:
The error from SELinux is
type=AVC msg=audit(1511118431.984:955): avc:  denied  { map } for  pid=14901 comm="qemu-system-x86" path="/dev/shm/spice.14901" dev="tmpfs" ino=386800 scontext=system_u:system_r:svirt_t:s0:c226,c673 tcontext=system_u:object_r:svirt_tmpfs_t:s0 tclass=file permissive=0

Expected results:
No error.

Additional info:
Talked in IRC with #virt team and asked if was expected and we agreed to open a bug report.

Comment 1 Fedora Update System 2017-11-22 08:54:34 UTC
selinux-policy-3.13.1-283.17.fc27 has been submitted as an update to Fedora 27.

Comment 2 Frediano Ziglio 2017-11-22 10:44:39 UTC
Was this selinux-policy-3.13.1-283.17.fc27 supposed to address this specific issue? It does not work for me, still getting the same error.

Comment 3 Fedora Update System 2017-11-22 21:40:58 UTC
selinux-policy-3.13.1-283.17.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See for
instructions on how to install test updates.
You can provide feedback for this update here:

Comment 4 Frediano Ziglio 2017-11-23 11:18:10 UTC
Tested the new package, is now working.

Comment 5 Fedora Update System 2017-11-28 23:53:24 UTC
selinux-policy-3.13.1-283.17.fc27 has been pushed to the Fedora 27 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.