The 2.0.x kernels have a quirk in the TCP implementation that have to do with the accept() call returning after only a syn has been recieved (as opposed to the three way handshake having been completed). Sendmail, which is compiled on many unices, makes the assumption that the three way handshake has been completed and a tcp connection has been fully established. This trust in a standard tcp implementation is seen in the following section of code <src/daemon.c>: t = accept(DaemonSocket, (struct sockaddr *)&RealHostAddr, &lotherend); if (t >= 0 || errno != EINTR) break; } savederrno = errno; (void) blocksignal(SIGALRM); if (t < 0) { errno = savederrno; syserr("getrequests: accept"); /* arrange to re-open the socket next time around */ (void) close(DaemonSocket); DaemonSocket = -1; refusingconnections = TRUE; sleep(5); continue; } It's possible to cause a denial of service here if a RST is sent after the initial SYN to the sendmail smtpd on port 25. If that were to be done, the...
The 2.0.x kernels have a quirk in the TCP implementation that have to do with the accept() call returning after only a syn has been recieved (as opposed to the three way handshake having been completed). Sendmail, which is compiled on many unices, makes the assumption that the three way handshake has been completed and a tcp connection has been fully established. This trust in a standard tcp implementation is seen in the following section of code <src/daemon.c>: t = accept(DaemonSocket, (struct sockaddr *)&RealHostAddr, &lotherend); if (t >= 0 || errno != EINTR) break; } savederrno = errno; (void) blocksignal(SIGALRM); if (t < 0) { errno = savederrno; syserr("getrequests: accept"); /* arrange to re-open the socket next time around */ (void) close(DaemonSocket); DaemonSocket = -1; refusingconnections = TRUE; sleep(5); continue; } It's possible to cause a denial of service here if a RST is sent after the initial SYN to the sendmail smtpd on port 25. If that were to be done, the sendmail smtpd would be caught in a loop (above) accepting, testing the socket [yes, the one which accept returned on listening on port 25], sleeping, and closing the socket for as long as the syns and following rsts are sent. It is also completely possible to do this with spoofed packets.