Bump maximum header size to 4096 bytes#144
Conversation
PP2_SUBTYPE_SSL_CLIENT_CERT is typically around 1 or 2 kilobytes.
This is important to check for security purposes: all TLVs are buffered in memory, and we don't want clients to be able to cause a DoS due to ENOMEM.
|
If we want to keep a conservative default, we could perhaps make this an option instead. |
|
This seems to address a similar issue to #123. I think increasing the default buffer is a potentially dangerous thing to do as it will increase the upfront cost of accepting a connection therefore harming scalability, while simultaneously also make it easier for DoS'ing the overlying software. That said, maybe taking a peek, and grow approach that checks the length of the header (if present) and increasing the buffer accordingly is a better approach. WDYT @emersion @bollenberger? UPDATEI have opened #150 as an alternative to statically resizing the buffer as proposed here. |
|
I think there are two separate concerns here:
|
|
I've posted yet another alternative in #155. |
|
Closing in favor of #155. |
PP2_SUBTYPE_SSL_CLIENT_CERT is typically around 1 or 2 kilobytes.