Bug 1387436 - rcs segfaults when accessing large directories
Summary: rcs segfaults when accessing large directories
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rcs
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Matej Mužila
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks: 1346768 1393376
TreeView+ depends on / blocked
 
Reported: 2016-10-20 21:20 UTC by Michael Watters
Modified: 2020-01-03 10:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1393376 (view as bug list)
Environment:
Last Closed: 2020-01-03 10:29:31 UTC
Target Upstream Version:


Attachments (Terms of Use)
Patch to fix segfaults (1.39 KB, patch)
2016-10-27 20:09 UTC, Michael Watters
no flags Details | Diff
updated spec file (6.71 KB, text/x-rpm-spec)
2016-10-27 20:10 UTC, Michael Watters
no flags Details

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


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