https://portswigger.net/research/http-desync-attacks-request...
https://portswigger.net/research/http-desync-attacks-request...
The best way to exploit an HTTP/2 server is to exploit the HTTP/1.1 server behind it [1].
The exploit mentioned is the http/2 front end getting confused by the amount of responses it gets because it never checked how many http/1.1 messages it was forwarding, it just assumed that the http/1.1 headers where matching the http/2 headers. Now in defense of http/2 this was completely expected, called out in the spec. as requiring validation in case of tunneling and ignored by every implementation.
Quoting your link it describes this politely, "By itself, this is harmless. However, modern websites are composed of chains of systems, all talking over HTTP. This multi-tiered architecture takes HTTP requests from multiple different users and routes them over a single TCP/TLS connection [...]"
Lax whitespace rules, lax repeating header rules, no advanced integrity checks like checksums, etc. I see these as signs of simplicity.
If you have a shared secret to support doing an hmac then you can certainly set up tls correctly.
TLS does not obviate application layer checks it can only compliment them.
Not sure what that means precisely, but if you're stretching definitions that far, the same is probably also true of your application checksums/hmacs
> Additionally the TLS connection may not even be between the server and client but a proxy between the server and client, client and server, or both server and client.
So its the same as your hmac check. That can also be processed at any layer.
> While TCP and TLS can get a message over the Internet correctly and securely they can't make any guarantees about the contextual validity of that message.
Can anything at the http protocol layer provide that?
You have to ask yourself "How would this get corrupted"? If the concern is that the data ends up somehow mangled from an external source like a bad router or a lose cable, then the data simply won't decrypt correctly and you'll end up with garbage.
So that leaves you with an application bug. However, an app is just as likely to add a checksum for an invalid body as they are to add one for a valid body.
So, the only fault I could see this fixing is an application which, through corrupt memory or something else, manages to produce a garbage body which fails it's checksum but... somehow... is encrypted correctly. I've never seen that sort of problem.
The following is an excerpt from Performance of Checksums and CRCs over Real Data[0].
The TCP checksum is a 16-bit ones-complement sum of the data. This sum will catch any burst error of 15bits or less[8], and all 16-bit burst errors except for those which replace one 1’s complement zero with another (i.e., 16 adjacent 1 bits replaced by 16 zero bits, or vice-versa). Over uniformly distributed data, it is expected to detect other types of errors at a rate proportional to 1 in 2^16.
If you're deeply interested in this topic then I would recommend Jonathan Stone's Phd thesis.
[0] https://www.researchgate.net/publication/3334567_Performance...