aboutsummaryrefslogtreecommitdiff
path: root/core/net/dns.odin
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused importJeroen van Rijn7 days1-1/+0
|
* More conflicts during rebaseJeroen van Rijn7 days1-1/+1
|
* net: implement OpenBSD and NetBSD support & add stubs for other targets & ↵Laytan Laats2026-01-111-92/+90
| | | | cleanup
* Change Odin's LICENSE to zlib from BSD 3-clausegingerBill2025-10-281-1/+1
| | | | This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
* Allow `core:net` to be imported with `-default-to-panic-allocator`.Jeroen van Rijn2025-06-171-26/+30
|
* Replace core:posix usage in core:os/os2Jeroen van Rijn2025-06-131-24/+2
|
* Fix multiple vulnerabilities in the resolverChristiano Haesbaert2025-02-231-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | This fixes some vulnerabilities in the resolver that make spoofing DNS queries somewhat trivial due to the code failing to randomize xid, as well as match the reply xid with the query, and the origin of the packet: - xid of the query was fixed at zero - xid from the reply was never checked - source address of the reply was never checked This means anyone can flood the host with a fake reply with xid 0, guessing the source port is trivial as it's less than 16bits (2^16 - 1024), which would cause odin to resolve a hostname to whatever an attacker wanted. While here also plug in two memory leaks. Since this is CVE material, I've contacted @kelimion before hand which instructed to put it in a PR. There are also more bugs as the code conflates answer section, authority section and aditional section into one, while in reality only the anwer section should be taken into consideration.
* Merge pull request #4814 from haesbaert/dns-cleanupJeroen van Rijn2025-02-091-0/+3
|\ | | | | Cleanup allocated dns runtime data
| * Cleanup allocated dns runtime dataChristiano Haesbaert2025-02-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | While harmless, the runtime should clean up non-user allocated data. On the same veign of: https://github.com/odin-lang/Odin/pull/4680 I'm kinda new to Odin and wrote netcat, in order to get a clean valgrind run, one has to manually destroy dns_configuration: https://github.com/haesbaert/learn-odin/blob/main/netcat/netcat.odin#L168-L169 While here unexport the destroy procedure and make destruction idempotent.
* | Fix some compression bugs in dns.Christiano Haesbaert2025-02-091-8/+15
|/ | | | | | | | | | | | - 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.
* Simplify *nix mDNSJeroen van Rijn2025-01-271-79/+2
|
* Add mDNS for *nix.Jeroen van Rijn2025-01-271-2/+87
|
* Moved all packages in core, base, vendor, tests and examples to use new #+ ↵Karl Zylinski2024-09-141-1/+1
| | | | file tag syntax.
* Add new contribution notes to `core:net`Feoramund2024-08-051-0/+2
|
* Port `core:net` to FreeBSDFeoramund2024-06-261-2/+2
|
* More std lib fixesAndreas T Jonsson2024-04-191-2/+2
| | | | Just selecting the same codepath as other BSD's for the most part.
* correct newly found vetsLaytan Laats2024-04-031-1/+0
|
* Use `or_break` and `or_continue` where appropriate in the core librarygingerBill2023-09-301-29/+17
|
* Remove `switch in` in favour of `switch _ in`gingerBill2023-08-081-3/+3
|
* fix parse_address can return nilLaytan Laats2023-05-191-0/+4
|
* Fix #2471Jeroen van Rijn2023-04-211-3/+5
|
* Preserve port when calling `net.resolve` with hostname:port.Jeroen van Rijn2023-04-181-1/+2
|
* Don't try to check core:net on the BSDs.Jeroen van Rijn2023-03-031-6/+8
|
* Make more private.Jeroen van Rijn2023-03-031-12/+24
|
* Alignment + unnecessary allocator param.Jeroen van Rijn2023-03-031-7/+7
|
* ripple bill-suggestionsColin Davidson2023-03-021-16/+10
|
* Update commentsJeroen van Rijn2023-03-021-14/+5
|
* more test cleanupColin Davidson2023-03-011-10/+1
|
* more manual type carryoverColin Davidson2023-03-011-1/+1
|
* manually start merging core_netColin Davidson2023-03-011-0/+873