diff options
| author | Christiano Haesbaert <haesbaert@haesbaert.org> | 2025-02-08 23:54:56 +0100 |
|---|---|---|
| committer | Christiano Haesbaert <haesbaert@haesbaert.org> | 2025-02-09 00:00:11 +0100 |
| commit | 605527f9db6275b296b43428e4ae8440fd782241 (patch) | |
| tree | cde3fbb8101c68d46a06b84a31647cddcc1239ec /src/types.cpp | |
| parent | 0683a3d67296c3b8dfdef8b730e0543e7eb4385b (diff) | |
Fix some compression bugs in dns.
- A compression pointer is when the two higher bits are set, the code was
considering only 0xC0 as a pointer, where in reality anything from 0xC0-0xFF is
a pointer, probably went unnoticed since you need big packets to have long pointers.
- Make sure we can access the lower byte of the pointer by checking len, the
code was careful to not access past the first byte, but ignored the second.
- As per RFC9267 make sure a pointer only points backwards, this one is not so
bad, as the code had a iteration_max that ended up guarding against infinite jumps.
Lightly tested, some eyes are welcome, but these are remote DOSable.
Diffstat (limited to 'src/types.cpp')
0 files changed, 0 insertions, 0 deletions