Your message dated Thu, 06 Dec 2007 12:47:05 +0100
with message-id <[EMAIL PROTECTED]>
and subject line fixed in 2.2.11-1
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: libgmime-2.0-2
Version: 2.2.10-2
Severity: serious
Tags: security
Hi,
on messages with malformed encoding of header values,
g_mime_parser_construct_message does not return.
This could be quite a bad deal as any application processing mail from
untrusted sources (i.e. almost anything working on inbound mail) can be
prevented to process other messages correctly (as in DOS). If, however,
the security team concludes that this bug is not security relevant,
please do remove the tag and lower the severity.
Please find attached testcase.c and testcase.mbox.
Upon compiling with
gcc $(gmime-config --cflags --libs) testcase.c -o testcase
and running
./testcase testcase.mbox
reproduces the problem, which seems to rest with the nothing between the
first two ?? in the subject's "=??Q??=".
Kind regards
T.
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-tv0 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libgmime-2.0-2 depends on:
ii libc6 2.7-1 GNU C Library: Shared
ii libglib2.0-0 2.14.3-1 The GLib library of C
ii zlib1g 1:1.2.3.3.dfsg-7 compression library -
libgmime-2.0-2 recommends no packages.
-- no debconf information
--
Thomas Viehmann, http://thomas.viehmann.net/
#include <fcntl.h>
#include <stdlib.h>
#include <gmime/gmime.h>
int main(int argc, char** argv)
{
GMimeStream *stream;
GMimeParser *parser;
GMimeMessage *msg = 0;
int fh;
if (argc != 2) {
fprintf(stderr, "usage: %s mbox\n",argv[0]);
exit(1);
}
g_mime_init(GMIME_INIT_FLAG_UTF8);
fh = open(argv[1], O_RDONLY);
if (fh < 0) {
fprintf(stderr, "could not open\n");
exit(1);
}
stream = g_mime_stream_fs_new(fh);
parser = g_mime_parser_new_with_stream(stream);
g_mime_parser_set_scan_from(parser, TRUE);
while (! g_mime_parser_eos(parser)) {
printf("reading message...\n");
msg = g_mime_parser_construct_message(parser);
printf("read message.\n");
if (msg != 0) {
const char* raw_msgid = g_mime_message_get_header(msg, "Message-Id");
if (raw_msgid != NULL)
printf("message-id: %s\n",raw_msgid);
g_object_unref(msg);
}
}
g_mime_stream_unref(stream);
close(fh);
}
>From [EMAIL PROTECTED] Thu Dec 06 00:00:00 2007
Subject: =??Q??=
Message-ID: <test>
abc
--- End Message ---
--- Begin Message ---
Version: 2.2.11-1
Hi Guus,
this is fixed in 2.2.11-1.
Apologies for reporting an old bug.
Kind regards
T.
--- End Message ---