Bug 440036

Summary: logrotate doesn't prevent recursive includes
Product: Red Hat Enterprise Linux 4 Reporter: Milos Malik <mmalik>
Component: logrotateAssignee: Daniel Novotny <dnovotny>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.6CC: azelinka, rvokal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: logrotate-3.7.1-11.RHEL4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 574784 (view as bug list) Environment:
Last Closed: 2010-03-31 07:48:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 574784    
Attachments:
Description Flags
recursion depth counter backported from newer logrotate none

Description Milos Malik 2008-04-01 14:34:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ; rv:1.8.1.13) Gecko/20080325 Fedora/2.0.0.13-1.fc8 Firefox/2.0.0.13

Description of problem:
During processing of a configuration file logrotate doesn't check whether the included file isn't the same. It leads to segmentation fault.

During processing of a configuration file logrotate doesn't check whether the included directory isn't the same as the directory of that file. It leads to logrotate infinite loop.

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

How reproducible:
Always


Steps to Reproduce:
1. write "include /etc/logrotate.d/syslog" on the 1st line of /etc/logrotate.d/syslog file
2. /etc/cron.daily/logrotate


Actual Results:
/etc/cron.daily/logrotate: line 3:  8634 Segmentation fault      /usr/sbin/logrotate /etc/logrotate.conf


Expected Results:
Some message which warns you about recursive includes and skipping the file.

Additional info:

Comment 1 Tomas Smetana 2008-04-03 08:56:44 UTC
The segmentation fault seems to have the same cause as in the bug #440202. 
However the detection of recursive includes might be an useful feature.

Comment 3 Daniel Novotny 2010-03-18 15:15:52 UTC
Created attachment 401041 [details]
recursion depth counter backported from newer logrotate

Comment 4 Daniel Novotny 2010-03-23 12:21:14 UTC
fixed in logrotate-3.7.1-11.RHEL4

Comment 7 errata-xmlrpc 2010-03-31 07:48:28 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0334.html