Skip to content

Commit a15f67a

Browse files
Merge branch 'master' into patch-8
2 parents f1fe446 + d7400d2 commit a15f67a

File tree

3 files changed

+86
-28
lines changed

3 files changed

+86
-28
lines changed

.lint.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env python3
2+
3+
import sys
4+
import argparse
5+
import re
6+
7+
parser = argparse.ArgumentParser(description='Lint markdown drafts.')
8+
parser.add_argument('files', metavar='file', nargs='+', help='Files to lint')
9+
parser.add_argument('-l', dest='maxLineLength', default=80)
10+
parser.add_argument('-f', dest='maxFigureLineLength', default=65)
11+
12+
args = parser.parse_args()
13+
14+
foundError = False
15+
16+
for inputfile in args.files:
17+
insideFigure = False
18+
beforeAbstract = True
19+
with open(inputfile, 'U') as draft:
20+
linecounter = 1
21+
lines = draft.readlines()
22+
23+
abstract = re.compile('^--- abstract')
24+
table = re.compile('^\s*(?:\||{:)')
25+
figure = re.compile('^[~`]{3,}')
26+
27+
for line in lines:
28+
line = line.rstrip('\r\n')
29+
linenumber = linecounter
30+
linecounter += 1
31+
32+
# Skip everything before abstract
33+
if beforeAbstract:
34+
matchObj = abstract.match(line)
35+
if matchObj:
36+
beforeAbstract = False
37+
continue
38+
39+
# Skip tables
40+
matchObj = table.match(line)
41+
if matchObj:
42+
continue
43+
44+
# Toggle figure state
45+
matchObj = figure.match(line)
46+
if matchObj:
47+
insideFigure = not insideFigure
48+
continue
49+
50+
# Check length
51+
length = len(line)
52+
limit = args.maxFigureLineLength if insideFigure else args.maxLineLength
53+
if length > limit:
54+
foundError = True
55+
sys.stderr.write("{0}: Line is {1} characters; limit is {2}\n".format(
56+
linenumber, length, limit))
57+
sys.stderr.write("{0}\n".format(line))
58+
59+
sys.exit(1 if foundError else 0)

Makefile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ endif
1414

1515
latest:: lint
1616
.PHONY: lint
17+
18+
PYTHON := $(shell which python3)
19+
ifeq ($(PYTHON),)
20+
PYTHON := $(shell which python)
21+
endif
22+
23+
ifneq ($(PYTHON),)
1724
lint::
18-
@err=0; for f in draft-*.md ; do \
19-
if cat "$$f" | (l=0; while read -r a; do l=$$(($$l + 1)); echo -E "$$l:$$a"; done) | \
20-
sed -e '1,/--- abstract/d;/^[0-9]*: *|/d' | tr -d '\r' | grep '^[0-9]*:.\{81\}'; then \
21-
echo "$$f contains a line with >80 characters"; err=1; \
22-
fi; \
23-
if cat "$$f" | (l=0; while read -r a; do l=$$(($$l + 1)); echo -E "$$l:$$a"; done) | \
24-
sed -e '/^[0-9]*:~~~/,/^[0-9]*:~~~/p;/^[0-9]*:```/,/^[0-9]*:```/p;d' | \
25-
tr -d '\r' | grep '^[0-9]*:.\{66\}'; then \
26-
echo "$$f contains a figure with >65 characters"; err=1; \
27-
fi; \
28-
done; [ "$$err" -eq 0 ]
25+
@$(PYTHON) ./.lint.py draft-*.md
26+
endif

draft-ietf-quic-transport.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ language from Section 3 of {{!I-D.ietf-tls-tls13}}.
10931093
case new_session_ticket:
10941094
struct {};
10951095
};
1096-
TransportParameter parameters<30..2^16-1>;
1096+
TransportParameter parameters<22..2^16-1>;
10971097
} TransportParameters;
10981098
~~~
10991099
{: #figure-transport-parameters title="Definition of TransportParameters"}
@@ -2740,24 +2740,24 @@ that it sends.
27402740
Strategies and implications of the frequency of generating acknowledgments are
27412741
discussed in more detail in {{QUIC-RECOVERY}}.
27422742

2743-
27442743
## Packet Size {#packet-size}
27452744

27462745
The QUIC packet size includes the QUIC header and integrity check, but not the
27472746
UDP or IP header.
27482747

2749-
Clients MUST ensure that any Initial packet it sends has a QUIC packet size of
2750-
least 1200 octets.
2751-
2752-
An Initial packet MUST be padded to at least 1200 octets unless the client knows
2753-
that the Path Maximum Transmission Unit (PMTU) supports the size that it
2754-
chooses. Sending an Initial packet of this size ensures that the network path
2755-
supports an MTU of this size and helps reduce the amplitude of amplification
2756-
attacks caused by server responses toward an unverified client address.
2748+
Clients MUST pad any Initial packet it sends to have a QUIC packet size of at
2749+
least 1200 octets. Sending an Initial packet of this size ensures that the
2750+
network path supports a reasonably sized packet, and helps reduce the amplitude
2751+
of amplification attacks caused by server responses toward an unverified client
2752+
address.
27572753

2758-
A server MUST NOT allow receipt of a packet that is smaller than 1200 octets to
2759-
start a new connection.
2754+
An Initial packet MAY exceed 1200 octets if the client knows that the Path
2755+
Maximum Transmission Unit (PMTU) supports the size that it chooses.
27602756

2757+
A server MAY send a CONNECTION_CLOSE frame with error code PROTOCOL_VIOLATION in
2758+
response to an Initial packet smaller than 1200 octets. It MUST NOT send any
2759+
other frame type in response, or otherwise behave as if any part of the
2760+
offending packet was processed as valid.
27612761

27622762
## Path Maximum Transmission Unit
27632763

@@ -3644,12 +3644,13 @@ transport to cancel a stream in response to receipt of a STOP_SENDING frame.
36443644

36453645
## Spoofed ACK Attack
36463646

3647-
An attacker receives an STK from the server and then releases the IP address on
3648-
which it received the STK. The attacker may, in the future, spoof this same
3647+
An attacker might be able to receive an address validation token
3648+
({{address-validation}}) from the server and then release the IP address it
3649+
used to acquire that token. The attacker may, in the future, spoof this same
36493650
address (which now presumably addresses a different endpoint), and initiate a
3650-
0-RTT connection with a server on the victim's behalf. The attacker then spoofs
3651-
ACK frames to the server which cause the server to potentially drown the victim
3652-
in data.
3651+
0-RTT connection with a server on the victim's behalf. The attacker can then
3652+
spoof ACK frames to the server which cause the server to send excessive amounts
3653+
of data toward the new owner of the IP address.
36533654

36543655
There are two possible mitigations to this attack. The simplest one is that a
36553656
server can unilaterally create a gap in packet-number space. In the non-attack

0 commit comments

Comments
 (0)