Re: [exim-dev] buffer overflow?

Top Page
Delete this message
Reply to this message
Author: Geraint Edwards
Date:  
To: exim-dev
Subject: Re: [exim-dev] buffer overflow?
Philip Hazel <ph10@???> said
        (on Mon, Mar 14, 2005 at 09:49:26AM +0000):

> On Sat, 12 Mar 2005, Subhi S Hashwa wrote:
>
> > going through my logfiles, I notice my /etc/group and
> > /etc/services in the logfile as rejected input.
>
> I will look at the code. Thanks for the report.


I'm also getting this - exactly the same thing about once a day
(not a hugely busy server - 100s of e-mails a day). Also on
FreeBSD (4.11 in my case, RELENG_4_11 from April 1st). Exim 4.50
is the port from same date.

I had a quick look through the code, and the below check/log/corrent
was the only thing that struck me.

######################################################################
*** smtp_in.c.orig   Thu Feb 17 14:49:11 2005
--- smtp_in.c        Tue Apr  5 20:17:00 2005
***************
*** 1610,1615 ****
--- 1610,1622 ----
        &tzero) > 0)
      {
      int rc = read(fileno(smtp_in), smtp_inbuffer, in_buffer_size);
+     if (rc < 0)
+       {
+       log_write(0, LOG_MAIN|LOG_REJECT,
+                 "read() error %d during connection from %s",
+                 rc, host_and_ident(TRUE));
+       rc = 0;
+       }
      if (rc > 150) rc = 150;
      smtp_inbuffer[rc] = 0;
      log_write(0, LOG_MAIN|LOG_REJECT, "SMTP protocol violation: "
######################################################################


Am I barking up the wrong tree? I'm open to suggestions, if I
can help with more/different analysis.

No /etc/group in my log in the 17hrs since last night. :-)
No log like the above either. :-(
About a dozen logs of inputs sent before the greeting.

--
Geraint A. Edwards (aka "Gedge")
gedge@???