Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1078887

Summary: Fuser segfault
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Koten <jkoten>
Component: psmiscAssignee: Jan Rybar <jrybar>
Status: CLOSED ERRATA QA Contact: David Jež <djez>
Severity: urgent Docs Contact:
Priority: high    
Version: 7.0CC: bnater, djez, isenfeld, ovasik
Target Milestone: rcKeywords: EasyFix, Patch, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: psmisc-22.20-10.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 06:10:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1289025, 1295829, 1313485    
Attachments:
Description Flags
abrt log
none
psmisc-22.20-insufficient-path-len-in-mntinfo.patch none

Description Jiri Koten 2014-03-20 13:49:04 UTC
Description of problem:
When I try to run fuser it segfaults

Version-Release number of selected component (if applicable):
psmisc-22.20-8.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. $ fuser -V
2.
3.

Comment 1 Jiri Koten 2014-03-20 14:03:00 UTC
Created attachment 876868 [details]
abrt log

Comment 3 RHEL Program Management 2014-03-28 05:47:27 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 8 Jaromír Cápík 2015-07-31 17:41:13 UTC
#0  0x00007ffff7a7481f in _IO_vfscanf_internal (s=<optimized out>, format=<optimized out>, argptr=argptr@entry=0x7fffffffc238, errp=errp@entry=0x0) at vfscanf.c:1073
#1  0x00007ffff7a7b767 in ___vfscanf (s=<optimized out>, format=<optimized out>, argptr=argptr@entry=0x7fffffffc238) at vfscanf.c:2942
#2  0x00007ffff7a84127 in __fscanf (stream=stream@entry=0x609010, format=format@entry=0x4057d2 "%i %i %u:%u %*s %s %*[^\n]") at fscanf.c:31
#3  0x00000000004031af in init_mntinfo () at fuser.c:1914

Comment 9 Jaromír Cápík 2015-07-31 17:48:52 UTC
The problem very probably lies in the PATH_MAX limit as it defines the maximum path length including the null terminator, but it doesn't count with octal escaping of special characters used in the /proc/self/mountinfo. The maximum escaped length of a single character seems to be 4 characters. The fix therefore might be a multiplication of PATH_MAX by 4.

Comment 10 Jaromír Cápík 2015-07-31 18:02:43 UTC
Created attachment 1058105 [details]
psmisc-22.20-insufficient-path-len-in-mntinfo.patch

This patch prevents fuser from segfaulting.

Comment 15 Jan Rybar 2016-05-20 13:51:37 UTC
Patch applied to upstream source code in commit https://gitlab.com/psmisc/psmisc/commit/e7aeecb644957559be0ad6f8bf8398814f1c3ec9.

Comment 20 errata-xmlrpc 2016-11-04 06:10:43 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, 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://rhn.redhat.com/errata/RHBA-2016-2417.html