RFC 9401
The Addition of the Death (DTH) Flag to TCP
RFC 9401: The Addition of the Death (DTH) Flag to TCP π¦
Request for Comments: 9401 π Author: S. Toyosawa, Independent β¨ Category: Informational π Date: 1 April 2023 πΈ ISSN: 2070-1721 π«Ά Obsoletes / Updates: the header doesn't list anything it obsoletes or updates π
Okay bestie, this is an Independent Submission, so it's not an official Internet Standard. It's published for info only, and the header lists no obsoletes or updates. π
Abstract π€
okay so this memo adds the Death (DTH) flag to TCP π, and DTH uses one bit in the TCP header to do it. The whole point is to make TCP session narratives smooth and attractive. it's giving plot twist energy π¬β¨
Status of This Memo π
This document is not an Internet Standards Track specification. It's published for informational purposes, so it's not a formal standard, just a fun read with main character energy π
This is a contribution to the RFC Series, independent of any other RFC stream. The RFC Editor chose to publish it at their discretion and makes no statement about its value for implementation or deployment. Documents approved for publication by the RFC Editor are not candidates for any level of Internet Standard. (See Section 2 of RFC 7841 if you want the deets π€)
Info about the current status, any errata, and how to give feedback lives at https://www.rfc-editor.org/info/rfc9401 π
Copyright Notice Β©οΈ
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved. π
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stand on the publication date. Please read these carefully, because they describe your rights and restrictions for this document. no skipping the legal stuff bestie π
Table of Contents ποΈ
1. Introduction
2. Requirements Language
3. Specification
3.1. TCP Packet Format
3.2. When to Send
3.3. When Not to Send
3.4. Use with the IP Evil Bit
4. Security Considerations
5. IANA Considerations
6. References
6.1. Normative References
6.2. Informative References
Author's Address
1. Introduction β¨
okay so the proposed Death flag, or DTH for short, uses the fourth flag bit in the TCP header to signal that the TCP session will probably end soon π
The flag lets applications get ready for abrupt session endings. Network engineers find it super helpful for figuring out the one or more root causes of TCP RSTs π. Critical end users can use it to better understand the TCP narratives too πΏ
The name comes from the anime, manga, and light novel custom [NOVEL]. "Death Flags" are hints that a character is going to die soon [CBR-FLAG]. iykyk π
For example, an evil scientist's DTH flag gets set when they're way too confident in their deadly invention. And then guess what? The invention kills them ππ§ͺ. This kind of storyline is also a classic in movies. A notable one is a soldier in a trench. The soldier's flag gets set to 1 right after they show off a photo of their fiancΓ© and talk about the wedding that's happening once they get back from battle π. Another one is a couple sneaking out of an isolated cabin for a late-night adventure. Usually that adventure gets violently ended by somebody with a chainsaw πͺπ
2. Requirements Language π
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read as described in BCP 14 [RFC2119] [RFC8174], but only when they appear in all capitals, as shown here. β¨ the capitals are the whole vibe here π£
3. Specification π
3.1. TCP Packet Format π¦
The DTH flag uses the fourth bit in the Control bits field of the TCP header, as shown in Figure 1 [RFC9293]. The fourth bit was picked on purpose because "four" in Chinese is SΓ¬, which sounds a lot like SΗ, meaning "die" π§§π. That's some serious wordplay energy π
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Acknowledgment Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data |D| |C|E|U|A|P|R|S|F| |
| Offset|T| Rsr |W|C|R|C|S|S|Y|I| Window |
| |H| vd |R|E|G|K|H|T|N|N| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | Urgent Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [Options] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| :
: Data :
: |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note that one tick mark represents one bit position.
Figure 1: TCP Header with the DTH Flag Bit
A TCP session peer SHOULD send a DTH segment when the session will likely end soon π«£. Both the server and the client can send one π€. The application or TCP stack MAY choose not to send DTH segments, even when it knows the session is ending. That gives the peer a dramatic surprise, though end users might find the ending too convenient or overly simple π. Sending a DTH segment that isn't tied to the session ending isn't encouraged, but it's allowed. (This is often called "teasing," or a false-positive DTH flag π)
The DTH flag is informational. TCP software that doesn't implement this feature can safely ignore it. Still, to really appreciate the session, users should notice the subtle signs in the narrative π
The DTH flag doesn't change the sequence or acknowledgment number, and it doesn't require any acknowledgement π
The recipient isn't required to act differently when it gets the flag. However, it is RECOMMENDED that the info gets passed up to the application layer, so the end user can be told about the incident π’. The recipient of a DTH segment SHOULD NOT close the socket right away when it arrives. Instead it SHOULD wait for a RST or FIN segment β³
This spec doesn't set a maximum number of DTH segments allowed in one TCP session. But limiting them to a few is RECOMMENDED to maximize the dramatic effect πβ¨
3.2. When to Send π
DTH can be used any time the sender thinks it's important to signal its inevitable end to the TCP peer π« . The example scenarios below show when to send DTH segments.
A malicious actor can send the flag when it suddenly repents π³. For example, a sender might suddenly regret their part in a DDoS attack and abruptly stop the attack. The archvillain usually ends the sender cruelly and mercilessly soon after that change of heart (or they get killed for protecting the hero) π¦Ή. When the DTH gets sent is up to the implementation. It can go out anytime from the first signs of betrayal to right before the behavior changes βοΈ
The flag can also be sent when the sender stops using cryptographic protections and reveals its plain-text content π. Think of a mysterious character in a mask who often dies right after they reveal their face. In this case, the DTH segment would be sent just before the redirect (30x) from HTTPS to HTTP [RFC9110]. Similarly, the flag can be set when a forged User-Agent or Server HTTP header field gets changed to the real value, which reveals their true identity (like "I am your long-lost twin," "I am a spy," and so on). This sometimes leads to the character's death π
The TCP peer is RECOMMENDED to send the flag when it notices resource issues, like shrinking memory or bandwidth π. An AI bot, a cyborg, or a sorcerer application running forbidden protocols (and so on) SHOULD consider sending the flag when it starts coughing up a lot of error messages π€π§ββοΈ
An application that's less capable of doing its task MAY send the flag from time to time. Sooner or later it'll get killed by the OS (the archvillain) or by CTRL-C (the end user) because it's inefficient π . The same thing is likely to happen to a memory-hogging application. For example, an unscrupulous character who tries to grab all the treasure often dies by accident (like falling off a cliff) ποΈ
An application SHOULD really think twice before accessing a "honeypot" or haunted server π». If your options are limited (say your favorite server breaks down in the middle of nowhere, and the dark server not on DNS is the only shelter around), sending the flag periodically is a good idea. The session is most likely cursed ππ«£
3.3. When Not to Send π«
The DTH flag SHOULD NOT be piggybacked on the FIN flag π ββοΈ. If it's present anyway, the recipient SHOULD silently ignore the DTH flag. The only exception is when the recipient is an expert in Hokuto-Shinken ("Big Dipper Divine Fist") [WIKI-FNS]. In that case the sender is already dead but stays active for a few seconds, which is unofficially called the "half-zombie open" state π₯·π
The DTH flag SHOULD NOT be sent with the URG flag [RFC6093]. The use of the URG flag is not recommended in new implementations [RFC9293].
Using the flag early in a TCP session is NOT RECOMMENDED π. Characters who die early are considered nonessential, so their death doesn't add to the quality of the session. (Obviously there are exceptions π)
3.4. Use with the IP Evil Bit π
Some experimental implementations use the Evil bit [RFC3514] in the IP header to indicate whether the session portrays an evil character π. The DTH flag isn't meant to characterize a TCP session. It's meant to show the fate of the session no matter what kind of session it is. When both the Evil bit and the DTH flag are present, they MUST be interpreted independently π
4. Security Considerations π¨
Precursors to the inevitable death (often violent) of a TCP session are useful for upper-layer applications and end users π§ . However, the security vs. usability balance should also be considered βοΈ. Since DTH flags may expose the internal state of the TCP session, attackers can exploit them. Think naming the murderer before the detective points at the suspect π΅οΈββοΈπͺ. Spoilers are an act of evil π€. Anyone who wants to keep the story secret should use the flag mildly π€«
5. IANA Considerations πΈ
This document defines the behavior of the one of the currently reserved (Rsrvd) control bits in the TCP header π. It's used as an informative indicator of the fate of a TCP session. The fourth bit (counting from the beginning of the thirteenth octet in a TCP header) was intentionally chosen to signify its meaning. A change in the bit position doesn't cause any functional problems, though π§©
This feature may already be implemented in different ways in Hollywood and/or Japanese animation studio networks π¬π―π΅. To the author's knowledge, though, the technology isn't patented yet π¦
β¨ Part 1 ends here. Part 2 picks up with Section 6 (References) and Author's Address β¨
6. References β¨
6.1. Normative References π
Okay bestie, these are the must-read receipts π§Ύπ Each one comes with its own DOI and link so you can check the source yourself.
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997,
https://www.rfc-editor.org/info/rfc2119. - [RFC3514] Bellovin, S., "The Security Flag in the IPv4 Header", RFC 3514, DOI 10.17487/RFC3514, April 2003,
https://www.rfc-editor.org/info/rfc3514. - [RFC6093] Gont, F. and A. Yourtchenko, "On the Implementation of the TCP Urgent Mechanism", RFC 6093, DOI 10.17487/RFC6093, January 2011,
https://www.rfc-editor.org/info/rfc6093. - [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017,
https://www.rfc-editor.org/info/rfc8174. - [RFC9293] Eddy, W., Ed., "Transmission Control Protocol (TCP)", STD 7, RFC 9293, DOI 10.17487/RFC9293, August 2022,
https://www.rfc-editor.org/info/rfc9293.
6.2. Informative References πΈ
These ones are just for fun and background, so no pressure to memorize them π but they're all here, I promise.
- [CBR-FLAG] Stalberg, A., "10 Death Flags That Mean An Anime Character is Probably Going To Die", 2023,
https://www.cbr.com/anime-death-hints-signs/. - [NOVEL] Wikipedia, "Light novel", February 2023,
https://en.wikipedia.org/w/index.php?title=Light_novel&oldid=1136814877. - [RFC9110] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110, June 2022,
https://www.rfc-editor.org/info/rfc9110. - [WIKI-FNS] Wikipedia, "List of Fist of the North Star characters", March 2023,
https://en.wikipedia.org/w/index.php?title=List_of_Fist_of_the_North_Star_characters&oldid=1145633265.
Author's Address π¦
Satoshi Toyosawa Independent Email: s2.toyosawa@gmail.com
Thanks for reading all the way to the end, bestie π you're literally the best π«Ά
π¦ where this page comes from
- ietf: rfc9401 2023-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms