Bug 608392 - CUPS' mailto notifier can run into an infinite loop
Summary: CUPS' mailto notifier can run into an infinite loop
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cups   
(Show other bugs)
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-27 08:21 UTC by Opher Shachar
Modified: 2011-01-13 23:29 UTC (History)
7 users (show)

Fixed In Version: cups-1.3.7-24.el5
Doc Type: Bug Fix
Doc Text:
The CUPS mailto notifier got in a loop consuming CPU cycles if an SMTP mail server failed while the notifier was sending an email message. This update fixes the SMTP response parsing code of the notifier and the loop occurs no longer.
Story Points: ---
Clone Of: 474920
Environment:
Last Closed: 2011-01-13 23:29:49 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)
A possible patch (744 bytes, patch)
2010-06-27 08:23 UTC, Opher Shachar
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0095 normal SHIPPED_LIVE cups bug fix update 2011-01-12 17:21:21 UTC
CUPS Bugs and Features 3609 None None None Never

Description Opher Shachar 2010-06-27 08:21:48 UTC
+++ This bug was initially created as a clone of Bug #474920 +++

Hello,
mailto notifier can run into an infinite loop in mailto.c 366-375 (the SMTP error handling code).
It happens if an SMTP session breaks while in progress - e.g. due to network congestion or SMTP server failure.
I've filed STR #3609 upstream.

Kind regards,
Opher Shachar,
Ladpc Ltd.

Comment 1 Opher Shachar 2010-06-27 08:23:18 UTC
Created attachment 427186 [details]
A possible patch

Comment 2 Opher Shachar 2010-06-27 08:28:17 UTC
I've forgotten to mention before that this will lead to *high* CPU usage for cupsd and, if it's running in DEBUG mode then cupsd will take 100% CPU and error_log file will grow to its limit.

Comment 4 Opher Shachar 2010-07-08 16:58:32 UTC
It has now been fixed upstream...

Comment 7 Tim Waugh 2010-09-23 16:26:38 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
If an SMTP mail server fails while the CUPS mailto notifier is sending an email message, the notifier can get stuck in a loop consuming CPU cycles.  This has been fixed by correcting the SMTP response parsing code in that notifier.

Comment 9 Eva Kopalova 2010-11-19 10:05:24 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-If an SMTP mail server fails while the CUPS mailto notifier is sending an email message, the notifier can get stuck in a loop consuming CPU cycles.  This has been fixed by correcting the SMTP response parsing code in that notifier.+The CUPS mailto notifier got in a loop consuming CPU cycles if an SMTP mail server failed while the notifier was sending an email message. This update fixes the SMTP response parsing code of the notifier and the loop occurs no longer.

Comment 13 errata-xmlrpc 2011-01-13 23:29:49 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-2011-0095.html


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