Bug 1710397

Summary: mutt: invalid format of RFC parameter passed to atoi() function in rfc2231.c could lead to unexpected behavior
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: athoscribeiro, dakingun, databases-maint, hhorak, jmmahler, me, mmuzila, pkubat
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-27 03:28:33 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:
Bug Depends On: 1710398, 1711761, 1711762    
Bug Blocks: 1710399    

Description Marian Rehak 2019-05-15 13:39:00 UTC
Invalid format of RFC parameter passed to atoi() function in rfc2231.c could lead to unexpected behavior.

External References:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929017

Comment 1 Marian Rehak 2019-05-15 13:39:11 UTC
Created mutt tracking bugs for this issue:

Affects: fedora-all [bug 1710398]

Comment 2 Huzaifa S. Sidhpurwala 2019-05-20 04:34:05 UTC
Analysis:

RFC 2231 (https://tools.ietf.org/html/rfc2231) corresponds to parsing MIME parameters and encoded extensions. The flaw could be exploited by a specially crafted (spam) email header. The effects depend on the value passed to atoi and its implementation.

Testing this on Red Hat Enterprise Linux as follows yields no crash:

[huzaifas@babylon ~]$ cat a.c
#include<stdlib.h>

void main(void)
{
atoi("999999999999999999999999999999");
}
[huzaifas@babylon ~]$ gcc a.c
[huzaifas@babylon ~]$ ./a.out 
[huzaifas@babylon ~]$ 

So its quite possible that the impact is really minimal or a very long string is required to be parsed.

Comment 4 Huzaifa S. Sidhpurwala 2019-05-20 04:52:56 UTC
Upstream patch: https://gitlab.com/muttmua/mutt/commit/3b6f6b829718ec8a7cf3eb6997d86e83e6c38567