Support out-of-band comet keys#2
Closed
bonbud-macryg wants to merge 6 commits into
Closed
Conversation
d88c855 to
66fd9bb
Compare
bonbud-macryg
pushed a commit
that referenced
this pull request
Feb 23, 2026
On develop, if a malformed scry URL is queried, we get a leak that ASAN
can detect. For example, after hitting F5 ten times at
`http://localhost:8080/_~_/=` and then pressing ctrl-D:
```
Direct leak of 240 byte(s) in 10 object(s) allocated from:
#0 0x798dcccf6cbf in malloc (/usr/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.so+0xf6cbf) (BuildId: 4cd39e6608b20f2f5a148a941cd434e0cadcd3dc)
#1 0x1cd2706 in _http_req_dispatch /home/kirill/work/urbit-repos/vere/pkg/vere/io/http.c:983:29
#2 0x1cd0dc6 in _http_rec_accept /home/kirill/work/urbit-repos/vere/pkg/vere/io/http.c:1676:7
#3 0x1ce0378 in call_handlers /home/kirill/.cache/zig/p/N-V-__8AAJ2XqALM9jST2Gu4TIdjPNY2QB8rnmKeepeqr076/lib/core/request.c:155:13
#4 0x1ea55ca in handle_incoming_request /home/kirill/.cache/zig/p/N-V-__8AAJ2XqALM9jST2Gu4TIdjPNY2QB8rnmKeepeqr076/lib/http1.c:470:13
#5 0x1bdd68e in uv__read /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/stream.c:1148:7
#6 0x1bdb3b7 in uv__stream_io /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/stream.c:1208:5
#7 0x1bcfc3c in uv__io_poll /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/linux.c:1565:11
#8 0x1bca927 in uv_run /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/core.c:460:5
#9 0x1bbe425 in u3_king_commence /home/kirill/work/urbit-repos/vere/pkg/vere/king.c:1061:3
#10 0x1323f4e in main /home/kirill/work/urbit-repos/vere/pkg/vere/main.c:3320:5
#11 0x798dcc829d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
```
This PR factors out scry-over-HTTP handling into a separate function
`_http_peek_dispatch` with semitransfer semantics for `req_u->peq_u` and
the contained noun.
Contributor
Author
|
Stale PR; we get equivalent functionality with comet_miner and a Vere built with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously any attempt to boot a comet would begin mining a comet under one of five whitelisted stars, even if the user supplied a keyfile with the
-Gor-kflag for a comet under a different star.This PR skips mining if the user has supplied a valid key with
-Gor-k. This regularises the behaviour of these boot flags and enables Groundwire developers to boot comets under specific Groundwire testnet stars.To test, try booting a comet with a
-Gor-kkey with various combinations of-c,-F, and-wflags.