Bug 440036 - logrotate doesn't prevent recursive includes
Summary: logrotate doesn't prevent recursive includes
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: logrotate   
(Show other bugs)
Version: 4.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Novotny
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 574784
TreeView+ depends on / blocked
 
Reported: 2008-04-01 14:34 UTC by Milos Malik
Modified: 2010-03-31 07:48 UTC (History)
2 users (show)

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: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0334 normal SHIPPED_LIVE logrotate bug fix update 2010-03-31 07:48:22 UTC

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


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