Discussion:
[PATCH] qmail-qfilter bounds issue
Dale Woolridge
2005-08-11 07:11:08 UTC
Permalink
The attached patch addresses two issues encountered recently on a fairly
heavily loaded mail server.

The first issue is really a valgrind problem, but it's still in my
patch and does no harm. Valgrind was not reporting correctly when
the first strlen() in parse_sender() referenced ptr, but I was able
to shut it up by referencing env instead.

In the second case, if a filter modifies the envelope/message, then
move_unless_empty() will call parse_envelope() before assigning the
new length to *var, so the mmap() call in parse_envelope() will use
the unmodified envelope/message length.

thanks.
--
-dale
Bruce Guenter
2005-08-12 22:54:54 UTC
Permalink
Post by Dale Woolridge
In the second case, if a filter modifies the envelope/message, then
move_unless_empty() will call parse_envelope() before assigning the
new length to *var, so the mmap() call in parse_envelope() will use
the unmodified envelope/message length.
Thanks, and good catch. I have applied the patch and will release a new
version of qmail-qfilter shortly.
--
Bruce Guenter <***@untroubled.org> http://untroubled.org/
OpenPGP key: 699980E8 / D0B7 C8DD 365D A395 29DA 2E2A E96F B2DC 6999 80E8
Loading...