LWN.net Logo

Re: TCP sequence number inference attack on Linux

From:  Eric Dumazet <erdnetdev-AT-gmail.com>
To:  Zhiyun Qian <zhiyunq-AT-umich.edu>
Subject:  Re: TCP sequence number inference attack on Linux
Date:  Fri, 21 Dec 2012 16:01:21 -0800
Message-ID:  <1356134481.21834.8090.camel@edumazet-glaptop>
Cc:  netdev-AT-vger.kernel.org
Archive-link:  Article, Thread

On Fri, 2012-12-21 at 18:52 -0500, Zhiyun Qian wrote:

> It seems that it is not straightforward to simply move tcp_ack()
> before tcp_validate_incoming() as tcp_ack() currently assumes the tcp
> sequence number is already validated and it may adjust certain states
> purely depending on the ACK number. I guess the solution is to extract
> all safety checks out and put at the very beginning. The rest of the
> code in tcp_validate_incoming() and tcp_ack() may still need to
> perform the redundant checks since if some state changes are dependent
> on the sequence number or ACK number (e.g., window update).
> 
> I'm willing to help on this. Perhaps I can draft an initial patch and
> you can help take a look before I submit it?

I began coding a serie of patches.

Part of the problem comes from a 'fast path' idea that was nice 20 years
ago but no longer a real killer these days.

So some tests are duplicated, others are not correctly done.

For example, the fast path misses the more complete tests done in
tcp_ack()

Its a big mess.





(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds