RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2187745 - io_uring requires mmap() of anonymous inodes
Summary: io_uring requires mmap() of anonymous inodes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.3
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Pytela
QA Contact: Milos Malik
Petr Hybl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-18 15:15 UTC by Jeff Moyer
Modified: 2024-03-13 04:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
.`io_uring` now works without SELinux denials Previously, the `io_uring` kernel interface missed the `map` permission in the SELinux policy. Consequently, the `mmap` system call failed and the `io_uring` interface did not work properly. With this update, the `map` permissions have been allowed in SELinux policy and the interface now works without SELinux denials.
Clone Of:
Environment:
Last Closed: 2023-11-07 08:52:21 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2025714 0 medium CLOSED SELinux is preventing qemu-system-x86 from 'map' accesses on the anon_inode anon_inode. 2024-04-03 11:08:55 UTC
Red Hat Issue Tracker RHELPLAN-155060 0 None None None 2023-04-18 15:17:18 UTC
Red Hat Product Errata RHBA-2023:6617 0 None None None 2023-11-07 08:52:30 UTC

Description Jeff Moyer 2023-04-18 15:15:32 UTC
Description of problem:
We are enabling io_uring in RHEL 9.3 (see bug 2068237).  By default, our selinux policy is preventing io_uring applications from working.  Here is a snippet from the audit log:

type=AVC msg=audit(1681827274.832:197): avc:  denied  { map } for  pid=27074 comm="iopoll-leak.t" path="anon_inode:[io_uring]" dev="anon_inodefs" ino=64058 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:unconfined_t:s0 tclass=anon_inode permissive=0

How do you recommend we address this?

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

How reproducible:
100%

Steps to Reproduce:
1. Run an application that makes use of io_uring.  This could be fio, fio's t/io_uring, or the liburing test suite.

Additional info:

Note that io_uring will be disabled by default.  You can find the current proposed code here:
  https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2375#note_1356018369

I would be happy to test any patches or updated packages.

Thanks!

Comment 1 Zdenek Pytela 2023-04-18 15:26:40 UTC
Should be as easy as backporting
34264caf2 Add the map permission to common_anon_inode_perm permission set

unless there were other interfering changes in Fedora in the meantime.

Comment 15 errata-xmlrpc 2023-11-07 08:52:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6617

Comment 17 Red Hat Bugzilla 2024-03-13 04:25:03 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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