Bug 608392

Summary: CUPS' mailto notifier can run into an infinite loop
Product: Red Hat Enterprise Linux 5 Reporter: Opher Shachar <ophers>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: azelinka, cward, jpopelka, ofourdan, pknirsch, tao, ykopkova
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A possible patch none

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