GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — HAProxyMessage: decode TLVs with an empty value at the end of the header by yawkat · Pull Request #17835 · netty/netty Conversation
|
|
Could not create auto-port PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Port for 5.0: #17874 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Could not create auto-port PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…of the header (#17835) Motivation: A TLV consists of a 1 byte type, a 2 byte length and a value that may be empty. HAProxyMessage.readNextTLV requires at least 4 readable bytes, so it ignores a TLV with an empty value at the end of the header or at the end of a PP2_TYPE_SSL TLV. Such a TLV is also lost when a decoded message is encoded and decoded again. Modification: - Read a TLV when at least 3 bytes are readable. - Add unit tests. Result: TLVs with an empty value are decoded. Three trailing bytes that declare a non-zero length are now rejected instead of ignored, while one or two trailing bytes are still ignored. One or two trailing bytes cannot form a TLV header; they are left as is on purpose to stay compatible with lenient or padding senders, and rejecting them could be a separate change. This change depends on #17834 ("HAProxyMessage: validate the length of all TLV types"), which makes such a TLV fail with a HAProxyProtocolException. This branch is based on that PR, so it also contains its commit. Discovered by fuzzing.
|
Port for 4.1 #17877 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…of the header (#17835) (#17874) Motivation: A TLV consists of a 1 byte type, a 2 byte length and a value that may be empty. HAProxyMessage.readNextTLV requires at least 4 readable bytes, so it ignores a TLV with an empty value at the end of the header or at the end of a PP2_TYPE_SSL TLV. Such a TLV is also lost when a decoded message is encoded and decoded again. Modification: - Read a TLV when at least 3 bytes are readable. - Add unit tests. Result: TLVs with an empty value are decoded. Three trailing bytes that declare a non-zero length are now rejected instead of ignored, while one or two trailing bytes are still ignored. One or two trailing bytes cannot form a TLV header; they are left as is on purpose to stay compatible with lenient or padding senders, and rejecting them could be a separate change. This change depends on #17834 ("HAProxyMessage: validate the length of all TLV types"), which makes such a TLV fail with a HAProxyProtocolException. This branch is based on that PR, so it also contains its commit. Discovered by fuzzing. Co-authored-by: Jonas Konrad <[email protected]>
…of the header (#17835) (#17877) Motivation: A TLV consists of a 1 byte type, a 2 byte length and a value that may be empty. HAProxyMessage.readNextTLV requires at least 4 readable bytes, so it ignores a TLV with an empty value at the end of the header or at the end of a PP2_TYPE_SSL TLV. Such a TLV is also lost when a decoded message is encoded and decoded again. Modification: - Read a TLV when at least 3 bytes are readable. - Add unit tests. Result: TLVs with an empty value are decoded. Three trailing bytes that declare a non-zero length are now rejected instead of ignored, while one or two trailing bytes are still ignored. One or two trailing bytes cannot form a TLV header; they are left as is on purpose to stay compatible with lenient or padding senders, and rejecting them could be a separate change. This change depends on #17834 ("HAProxyMessage: validate the length of all TLV types"), which makes such a TLV fail with a HAProxyProtocolException. This branch is based on that PR, so it also contains its commit. Discovered by fuzzing. Co-authored-by: Jonas Konrad <[email protected]>
…of the header (netty#17835) (netty#17877) Motivation: A TLV consists of a 1 byte type, a 2 byte length and a value that may be empty. HAProxyMessage.readNextTLV requires at least 4 readable bytes, so it ignores a TLV with an empty value at the end of the header or at the end of a PP2_TYPE_SSL TLV. Such a TLV is also lost when a decoded message is encoded and decoded again. Modification: - Read a TLV when at least 3 bytes are readable. - Add unit tests. Result: TLVs with an empty value are decoded. Three trailing bytes that declare a non-zero length are now rejected instead of ignored, while one or two trailing bytes are still ignored. One or two trailing bytes cannot form a TLV header; they are left as is on purpose to stay compatible with lenient or padding senders, and rejecting them could be a separate change. This change depends on netty#17834 ("HAProxyMessage: validate the length of all TLV types"), which makes such a TLV fail with a HAProxyProtocolException. This branch is based on that PR, so it also contains its commit. Discovered by fuzzing. Co-authored-by: Jonas Konrad <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.