• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug in TCP stack: RST has wrong sequence number?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in TCP stack: RST has wrong sequence number?


  • Subject: Re: Bug in TCP stack: RST has wrong sequence number?
  • From: Axel Rau <email@hidden>
  • Date: Mon, 19 Feb 2007 21:26:04 +0100


Am 19.02.2007 um 20:43 schrieb Justin C. Walker:


On Feb 19, 2007, at 09:31 , Axel Rau wrote:

Hi,

while trying to analyze a problem with hanging Mail.app, which talks to an IMAP server through an OpenBSD firewall, I got some interesting diagnose from Daniel Hartmeier (email@hidden) from the OpenBSD project:
I quote from his posting in the OpenBSD pf list:
http://marc.theaimsgroup.com/?l=openbsd-pf&m=117176062511692&w=2


and sends a RST. But the sequence number (th_seq) used in the
RST is not valid. It should be 2634574290 (past the last segment the
client sent), not 2634574252 (past the second-to-last segment, not including
the payload in the FIN+PSH).


This looks like a bug in the client's TCP/IP stack, and how to fix it
depends on the client's OS. IMO, the RST is invalid, and pf is right in
blocking it.

This is perhaps a corner case in the protocol spec. I'm not sure I buy the conclusion above, but it would be good to hear from the experts.


As I read 793, the reset is generated with the current state of the window as the sequence number. From your trace, it looks like the sender (.106) sent data and then immediately reset the connection. The last ack from the receiver (.20) was ...252, so using ...252 seems right to me (the sender can't assume that the ...290 segment was/will be received). Judging from the following resets, the stack will use the last-acked sequence number.
Any comments, Daniel?

I'd file a bug report, but I'm not convinced the behavior you see is incorrect (from the standard).
Bug ID# 5008062.

Axel
---------------------------------------------------------------------
Axel Rau, ☀Frankfurt , Germany                       +49 69 9514 18 0


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Bug in TCP stack: RST has wrong sequence number?
      • From: Daniel Hartmeier <email@hidden>
References: 
 >Bug in TCP stack: RST has wrong sequence number? (From: Axel Rau <email@hidden>)
 >Re: Bug in TCP stack: RST has wrong sequence number? (From: "Justin C. Walker" <email@hidden>)

  • Prev by Date: Re: Bug in TCP stack: RST has wrong sequence number?
  • Next by Date: Re: Bug in TCP stack: RST has wrong sequence number?
  • Previous by thread: Re: Bug in TCP stack: RST has wrong sequence number?
  • Next by thread: Re: Bug in TCP stack: RST has wrong sequence number?
  • Index(es):
    • Date
    • Thread