Bug 1387436

Summary: rcs segfaults when accessing large directories
Product: Red Hat Enterprise Linux 7 Reporter: Michael Watters <wattersm>
Component: rcsAssignee: Matej Mužila <mmuzila>
Status: CLOSED WONTFIX QA Contact: RHEL CS Apps Subsystem QE <rhel-cs-apps-subsystem-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: hhorak, mmuzila
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1393376 (view as bug list) Environment:
Last Closed: 2020-01-03 10:29:31 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:
Bug Depends On:    
Bug Blocks: 1346768, 1393376    
Attachments:
Description Flags
Patch to fix segfaults
none
updated spec file none

Description Michael Watters 2016-10-20 21:20:25 UTC
Description of problem:

rcs segfaults on certain large directories when called by cvsweb.  This is shown in the audit logs as follows.

>type=ANOM_ABEND msg=audit(1476987465.316:15375): auid=4294967295 uid=48 gid=48 ses=4294967295 subj=system_u:system_r:cvs_script_t:s0 pid=25858 comm="rcs" reason="memory violation" sig=11

The directory being accessed has 3.7 GB of data.

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

Version     : 5.9.0
Release     : 5.el7

How reproducible:

Always

Steps to Reproduce:
1. Open cvsweb, click on a directory

Actual results:
An internal server error is returned due to rcs segfaulting.

Expected results:
The directory contents are listed.

Additional info:
Server is running cvsweb 3.0.6.

Comment 2 Michael Watters 2016-10-25 17:52:02 UTC
The same error also occurs using rcs version 5.9.4 from upstream.

> Oct 25 13:48:49 server-cent7 kernel: rcs[8968]: segfault at 7ffd003c7b40 ip 000000000040e62a sp 00007ffd003c7b40 error 6 in rcs[400000+2a000]

Comment 3 Michael Watters 2016-10-27 20:09:19 UTC
Created attachment 1214736 [details]
Patch to fix segfaults

Comment 4 Michael Watters 2016-10-27 20:10:35 UTC
Created attachment 1214737 [details]
updated spec file

This spec file can be used to build a new package which includes the previously attached patch.

Comment 5 Michael Watters 2016-10-27 20:11:14 UTC
There is now a patch available which corrects the segfaults generated by the rlog application.  See http://git.savannah.gnu.org/cgit/rcs.git/commit/?h=p&id=6bb3cb6c for more details.

Comment 6 Matej Mužila 2016-11-28 14:29:46 UTC
Thank you for the patch