php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49704 imap_header crashing on large data
Submitted: 2009-09-29 02:24 UTC Modified: 2009-10-08 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: avi at phpclub dot org Assigned: pajoye (profile)
Status: No Feedback Package: IMAP related
PHP Version: 5.2.11 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: avi at phpclub dot org
New email:
PHP Version: OS:

 

 [2009-09-29 02:24 UTC] avi at phpclub dot org
Description:
------------
imap_header crashes, I've searched the bugs db and found that many people came across this problem but it hasn't been fixed properly nor has anyone given too much data to solve it.

php version is 5.2.2 and according to the bugs it seems that upgarding wouldn't do any good (plus, i'm on a shared host and can't upgrade on my own).

Reproduce code:
---------------
a message with large header data (229 To addresses) and all kinds of junk headers, the message is a chain message thats been throught tons of mail servers & thus have many headers.

Actual result:
--------------
here's the gdb output :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211549472 (LWP 17124)]
0x439c88ec in memcpy () from /lib/tls/libc.so.6
(gdb) where
#0  0x439c88ec in memcpy () from /lib/tls/libc.so.6
#1  0x08362d75 in rfc822_output_data (buf=0x8896eb7,
    string=0x8892a98 "d.co.il", len=-1080115201) at rfc822.c:1361
#2  0x08362dd8 in rfc822_output_string (buf=0xbf9e77b0, string=Variable "string"                                                                              is not available.
)
    at rfc822.c:1380
#3  0x0836305f in rfc822_output_address (buf=0xbf9e77b0, adr=0x8892a60)
    at rfc822.c:1577
#4  0x083630b9 in rfc822_output_address_list (buf=0xbf9e77b0, adr=0x8892a60,
    pretty=0, specials=0x0) at rfc822.c:1541
#5  0x0814e52d in _php_rfc822_write_address (addresslist=Variable "addresslist"                                                                              is not available.
)
    at /home/cpeasyapache/src/php-5.2.8/ext/imap/php_imap.c:3904
#6  0x00000029 in ?? ()
(gdb) list
3904    /home/cpeasyapache/src/php-5.2.8/ext/imap/php_imap.c: No such file or directory.
        in /home/cpeasyapache/src/php-5.2.8/ext/imap/php_imap.c



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-29 08:10 UTC] pajoye@php.net
Which c-client version do you use?
 [2009-09-29 15:55 UTC] avi at phpclub dot org
Don't know, how can I check?
 [2009-09-29 15:59 UTC] pajoye@php.net
Check what you have installed or phpinfo. It should be something like 200x and a letter.
 [2009-09-30 08:38 UTC] avi at phpclub dot org
c-client ver : 2006k
PHP version 5.2.8
 [2009-09-30 08:42 UTC] pajoye@php.net
Please try using a recent version (2007+).
 [2009-10-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC