Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1540029
| From | "Jason A. Donenfeld" <Jason@zx2c4.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Misalignment, MIPS, and ip_hdr(skb)->version |
| Date | 2016-12-11 16:00 +0100 |
| Message-ID | <sNdLA-mT-13@gated-at.bofh.it> (permalink) |
| References | <sLPii-3H9-21@gated-at.bofh.it> <sLUUF-7mL-5@gated-at.bofh.it> <sLZ7Y-1LZ-3@gated-at.bofh.it> <sMYjw-7Ui-5@gated-at.bofh.it> <sN6Ap-4DD-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hey guys, Thanks for the extremely detailed answers. The main take-away from this is that passing unaligned packets to the networking stack kills kittens. So now it's a question of mitigation. I have three options: 1. Copy the plaintext to three bytes before the start of the cipher text, overwriting parts of the header that aren't actually required. Pros: no changes required, MTU stays small. Cons: scatterwalk's fast paths aren't hit, which means two page table mappings are taken instead of one. I have no idea if this actually matters or will slow down anything relavent. 2. Add 3 bytes to the plaintext header, set to zero, marked for future use. Pros: satisfies IETF mantras and makes unaligned in-place decryption straightforward. Cons: lowers MTU, additional unauthenticated cleartext bits in the header are of limited utility in protocol. 3. Add 3 bytes of padding, set to zero, to the encrypted section just before the IP header, marked for future use. Pros: satisfies IETF mantras, can use those extra bits in the future for interesting protocol extensions for authenticated peers. Cons: lowers MTU, marginally more difficult to implement but still probably just one or two lines of code. Of these, I'm leaning toward (3). Anyway, thanks a lot for the input. "Doing nothing" is no longer under serious consideration, thanks to your messages. Thanks, Jason
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Misalignment, MIPS, and ip_hdr(skb)->version "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-07 19:40 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Dave Taht <dave.taht@gmail.com> - 2016-12-07 19:50 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-07 20:00 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version David Miller <davem@davemloft.net> - 2016-12-07 21:00 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-08 01:40 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version David Miller <davem@davemloft.net> - 2016-12-08 01:40 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-08 23:30 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version David Miller <davem@davemloft.net> - 2016-12-09 00:20 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Willy Tarreau <w@1wt.eu> - 2016-12-11 09:10 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Måns Rullgård <mans@mansr.com> - 2016-12-11 11:50 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Felix Fietkau <nbd@nbd.name> - 2016-12-10 13:30 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Måns Rullgård <mans@mansr.com> - 2016-12-10 14:30 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Felix Fietkau <nbd@nbd.name> - 2016-12-10 21:20 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Felix Fietkau <nbd@nbd.name> - 2016-12-10 21:40 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Måns Rullgård <mans@mansr.com> - 2016-12-10 21:40 +0100
RE: Misalignment, MIPS, and ip_hdr(skb)->version David Laight <David.Laight@ACULAB.COM> - 2016-12-12 17:20 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Måns Rullgård <mans@mansr.com> - 2016-12-12 17:40 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version David Miller <davem@davemloft.net> - 2016-12-07 20:00 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-12-08 01:40 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Daniel Kahn Gillmor <dkg@fifthhorseman.net> - 2016-12-08 06:10 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Jiri Benc <jbenc@redhat.com> - 2016-12-09 12:30 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Dan Lüdtke <mail@danrl.com> - 2016-12-10 23:30 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Greg KH <gregkh@linuxfoundation.org> - 2016-12-11 08:20 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-11 16:00 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-11 16:40 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Andrew Lunn <andrew@lunn.ch> - 2016-12-11 16:40 +0100
Re: Misalignment, MIPS, and ip_hdr(skb)->version Willy Tarreau <w@1wt.eu> - 2016-12-11 17:50 +0100
csiph-web