Subject: [quicwg/base-drafts] Handling of Frames Inappropriate for Unidirectional Streams (#1047)

From: martinduke <[email-masked]>
Date: Tue, 09 Jan 2018 12:39:21 -0800

Something I can't seem to find in the transport doc: if I have a unidirectional stream, various frame types don't make any sense.

Send-only streams shouldn't see STREAM, STREAM_BLOCKED, or RST_STREAM frames.
Receive-only streams shouldn't see MAX_STREAM_DATA, STOP_SENDING

There are several courses of action here:
- blow up the connection with error code XXXX*
- blow up the stream with error code XXXX*
- drop the whole containing packet as somehow compromised, and continue
- ignore the frame and continue.

* I think there's a decent case for STREAM_DIRECTION_ERROR or something similar.

Early responders on the mailing list thought it should be a fatal connection error. I don't have a strong opinion but we should document the correct behavior.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047

---

From: ianswett <[email-masked]>
Date: Tue, 09 Jan 2018 20:44:08 +0000 (UTC)

I'm happy with blowing up.  I slightly prefer blowing up the whole connection.

Dropping is dangerous and creates more complexity than is warranted.  Ignoring the frame is really bad, because it violates the rule that if a packet is acknowledged, all frames were processed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047#issuecomment-356408253

---

From: MikkelFJ <[email-masked]>
Date: Tue, 09 Jan 2018 21:16:37 +0000 (UTC)

Yes, close the connection. Anything that is an entirely avoidable protocol error should be fatal.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047#issuecomment-356416593

---

From: MikkelFJ <[email-masked]>
Date: Tue, 09 Jan 2018 21:19:59 +0000 (UTC)

Anything during handshake is not entirely avoidable because an attacker may inject packets, and here dropping is better, but this is not the case here, in general.

However, it rasises the question: what should be done with stream violations during handshake? I presume there is already some text about this somewhere, otherwise this should be considered a separate case.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047#issuecomment-356417580

---

From: Martin Thomson <[email-masked]>
Date: Wed, 10 Jan 2018 03:28:47 +0000 (UTC)

There used to be a statement to the effect that unless explicitly permitted, frames were not allowed.  RFC 7540 had that, and we copied it into the drafts, but I think that it got lost.  We should put it back.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047#issuecomment-356489460

---

From: janaiyengar <[email-masked]>
Date: Fri, 12 Jan 2018 23:14:32 +0000 (UTC)

+1 to closing the connection with PROTOCOL_VIOLATION. I prefer text that explicitly disallows frames on particular stream types, since I would find it convenient to have a list when implementing this return on error.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047#issuecomment-357380294

---

From: Martin Thomson <[email-masked]>
Date: Mon, 15 Jan 2018 04:16:05 +0000 (UTC)

Maybe we should just tabulate frames against states.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047#issuecomment-357579314

---

From: martinduke <[email-masked]>
Date: Sun, 14 Jan 2018 22:10:42 -0800

The editorial issue is that we added unidirectional streams, and there should be some text here talking about errors related to unidirectional streams. Right now, debugging in prep for the interop is my priority, but I'll generate a PR in a week or so if no one else wants to do it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047#issuecomment-357591117

---

From: janaiyengar <[email-masked]>
Date: Wed, 17 Jan 2018 20:58:07 +0000 (UTC)

@martinduke : PRs are always welcome :-)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1047#issuecomment-358442723