Bug #67396 [Opn->Wfx]: Stack exhaustion in imap_rfc822_parse_adrlist

From: Date: Tue, 10 Jun 2014 18:43:13 +0000
Subject: Bug #67396 [Opn->Wfx]: Stack exhaustion in imap_rfc822_parse_adrlist
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186141@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67396&edit=1 ID: 67396 Updated by: aharvey@php.net Reported by: mikispag at gmail dot com Summary: Stack exhaustion in imap_rfc822_parse_adrlist -Status: Open +Status: Wont fix Type: Bug Package: IMAP related Operating System: Linux PHP Version: 5.5.13 Block user comment: N Private report: N New Comment: I don't think there's much we can do about this one: it's an issue in c-client, and attempting to clamp the input string to prevent this is going to result in madness, since it's going to vary depending on the OS, architecture, stack size, and so on. (See also the various bugs over the years about PCRE recursion.) If c-client ever provides a non-recursive interface for this, then we can see about reimplementing imap_rfc822_parse_adrlist() to use it, but right now this is a won't fix. Previous Comments: ------------------------------------------------------------------------ [2014-06-08 10:36:05] mikispag at gmail dot com Description: ------------ This is a stack exhaustion in PHP imap_rfc822_parse_adrlist, which calls libc-client rfc822_parse_phrase -> rfc822_parse_word Test script: --------------- <?php imap_rfc822_parse_adrlist(str_repeat("x\n", 200000), "a"); ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67396&edit=1

« previous php.bugs (#186141) next »