[Bug 917669] New: Mail::Box::Parser::C parses messages with long header lines (>1023 characters) improperly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=917669

            Bug ID: 917669
           Summary: Mail::Box::Parser::C parses messages with long header
                    lines (>1023 characters) improperly
           Product: Fedora
           Version: 18
         Component: perl-Mail-Box-Parser-C
          Severity: unspecified
          Priority: unspecified
          Reporter: jik@xxxxxxxxxxxxxxxxxxxxxx
   External Bug ID: CPAN 83749

Created attachment 704992
  --> https://bugzilla.redhat.com/attachment.cgi?id=704992&action=edit
patch to fix bug

Header lines longer than 1023 characters cause Mail::Box::Parser::C to parse
the header improperly and corrupt the message.

Yes, I realize that nothing is supposed to generate header lines that long, and
yet, there are things that do, and "Be generous in what you accept" dictates
that this could should do its best to parse them successfully.

The attached patch implements a dynamic buffer for reading message lines, which
is reallocated as needed to make enough space for the longest line in the
mailbox, and freed when the mailbox is freed.

I considered putting an upper limit on the line length to prevent memory
exhaustion DoS attacks against the application running the code, but I decided
not to because there is no length check on folded header lines in the existing
code, which means the DoS potential is already there.

I hope you will consider including this patch in Fedora whether or not the
maintainer of the CPAN package releases a new version with it (I've submitted
the patch to him as https://rt.cpan.org/Ticket/Display.html?id=83749). The CPAN
package hasn't been modified since 2004 so there's no way of knowing whether
the maintainer will fix this issue promptly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=IhFTPhl0P2&a=cc_unsubscribe
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel



[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux