128 points · by signa11 · 8y ago · 40 comments
Isn’t this just like a type system? You specify what you want in types, and the type checker complains if there are implementation bugs (the inferred type doesn’t match the specified type).
Of course, this just means that the hard part is now correctly expressing all the invariants (and combinations hereof) of your program as a type/proposition.
By "implementation bugs" we mean _any_ bug that could cause the NAT to not satisfy its spec, which is a formalized version of RFC 3022.
This includes bugs that a type system would catch, such as improper use of void pointers, as well as lack of crashes (e.g. Out-of-bounds indexing, division by zero...); but most importantly, it includes _semantic_ bugs, such as forwarding a packet to the wrong port, incorrectly modifying a packet, not updating the internal state properly (so that future packets are handled correctly), etc.
The main contribution here is that only the data structures (which are reusable) need to be proven by hand; for a new NF, you only need a specification - which is, as you point out, not always easy to do.
It's definitely a strong statement, and thanks for the qualification.
When I saw the words on the page I began to wonder about all the other things that could go wrong. e.g. There could be bug in software that does the code analysis, or the compiler, or underlying libraries or operating system, or (sigh) in the CPU.
Also, there could be unexpected behavior when the machine its running on is under load. It would also be interesting to see it subjected to some of the fuzz-testing software out there.
Overall, I think it's a great approach and worth pursuing. Thank you for releasing the source.
Paper link: http://dslab.epfl.ch/pubs/formally-verified-nat-stack.pdf
> The main contribution here is that only the data structures (which are reusable) need to be proven by hand; for a new NF, you only need a specification - which is, as you point out, not always easy to do.
I guess my main point is that not only is it not easy to do, but writing the spec is also an error-prone process (just like writing the implementation), and errors in the spec cannot be caught by any machinery.
Not to say that this makes the process meaningless — not at all — but simply to say that “formally verified” doesn’t mean “bug-free”, it means going from the challenge being writing a correct implementation to writing a correct specification.
Testing with garbage is still effective testing for exploits or figuring bottlenecks that could cause denial of service or exploits due to race conditions.
Either way, don't trust anything or anyone. Test it before someone else does.
Hopefully your project leads to more work like this -- practical, fast, and verified for everyone to use.
I suspect that other languages seem even better as subjects for this kind of formal verification. Haskell and Rust come to mind. For the same reasons, Go and Smalltalk strike me as less suitable. (For those people who think I'm just a Go and Smalltalk partisan.)
This problem is chosen because it matters to some people. I agree, it's not a good thing.
ISPs in my area assign a prefix per customer; If you know the ISP, you know the length of the prefix, and can thus pinpoint the exact ISP customer with every connection.
On ISPv4+CGNAT, the common deployment, they can't do that.
Most ISPs charge extra for a fixed IPv4; and many default to CGNAT which makes it impossible to correlate even within a 10 minute period.
yay !
It's a must for p2p communication
There's not a chance that BGP is going to get set up or that their own IP allocation is going to happen.
How do you propose they implement multi-homing for their entire network? How do you propose they balance their link utilization?
Why not? There's no restrictions on V6, unlike V4 where a small biz might not be able to afford even a /24.