Bug 1373083 - "mmap: Invalid argument" while executing `restorecon /var/crash/` with libselinux-2.5-6.el7.x86_64
Summary: "mmap: Invalid argument" while executing `restorecon /var/crash/` with libsel...
Keywords:
Status: CLOSED DUPLICATE of bug 1372200
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-05 06:30 UTC by Qiao Zhao
Modified: 2016-09-08 06:19 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-08 06:00:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Qiao Zhao 2016-09-05 06:30:44 UTC
Description of problem:
I just notice this problem from kernel-3.10.0-500.el7, like:
# kdumpctl restart
kexec: unloaded kdump kernel
Stopping kdump: [OK]
mmap: Invalid argument
Detected change(s) in the following file(s):
  
  /etc/kdump.conf
Rebuilding /boot/initramfs-3.10.0-500.el7.x86_64kdump.img
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
kexec: loaded kdump kernel
Starting kdump: [OK]

Can't find this message on kernel-3.10.0-495.el7, i will do some kernel bisect to make sure which fix caused this problem.

Version-Release number of selected component (if applicable):
kexec-tools-2.0.7-49.el7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Pratyush Anand 2016-09-06 15:18:30 UTC
It is the restorecon command which is generating this error message. 
# restorecon /var/crash/
  mmap: Invalid argument

# rpm -qf `which restorecon`
policycoreutils-2.5-8.el7.x86_64

However, version of policycoreutils seems same in RHEL-7.3-20160901.1 and RHEL-7.3-20160825.1.

Comment 4 Pratyush Anand 2016-09-08 04:54:35 UTC
I did some more experiments with policycoreutils code from https://github.com/SELinuxProject/selinux.git. This error is printed when selabel_open() is called, which is part of libselinux. RHEL-7.3-20160901.1 has libselinux-2.5-6 and, RHEL-7.3-20160825.1 had libselinux-2.5-5. So, I think error was introduced in libselinux-2.5-6.

Therefore, it would be good to assign this BZ to selinux team.

Simplified reproducer:
(1) Use libselinux-2.5-6.el7.x86_64
(2) execute `restorecon /var/crash/`

You will see a message "mmap: Invalid argument".

Comment 5 Petr Lautrbach 2016-09-08 06:00:24 UTC

*** This bug has been marked as a duplicate of bug 1372200 ***


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