Bug 440036 - logrotate doesn't prevent recursive includes
logrotate doesn't prevent recursive includes
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: logrotate (Show other bugs)
4.6
All Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Novotny
:
Depends On:
Blocks: 574784
  Show dependency treegraph
 
Reported: 2008-04-01 10:34 EDT by Milos Malik
Modified: 2010-03-31 03:48 EDT (History)
2 users (show)

See Also:
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 03:48:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
recursion depth counter backported from newer logrotate (1.34 KB, patch)
2010-03-18 11:15 EDT, Daniel Novotny
no flags Details | Diff

  None (edit)
Description Milos Malik 2008-04-01 10:34:09 EDT
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 04:56:44 EDT
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 11:15:52 EDT
Created attachment 401041 [details]
recursion depth counter backported from newer logrotate
Comment 4 Daniel Novotny 2010-03-23 08:21:14 EDT
fixed in logrotate-3.7.1-11.RHEL4
Comment 7 errata-xmlrpc 2010-03-31 03:48:28 EDT
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

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