Skip to content

server media: a host with more addresses than the lookup's queue holds resolves - #3035

Merged
ashhart merged 2 commits into
mainfrom
security/media-host-lookup
Nov 13, 2026
Merged

ashhart merged 2 commits into
mainfrom
security/media-host-lookup

Conversation

@ashhart

@ashhart ashhart commented Nov 12, 2026

Copy link
Copy Markdown
Owner

What this changes

Before: the lookup for a media URL filled a 32-slot queue that only its own thread read, so a host with 33 or more addresses blocked the request for good and held its connection slot. After: the lookup runs beside its reader, an answer of any length is read to the end, every address must still be public, and the connection still goes to the first.

  • Issue: n/a. SECURITY.md asks for private reports, so there is no public issue.
  • Stacked on: main.
  • atc overlap --json: not run.

Checks on this head

  • Head commit: 6d11acde777337be406879d17e38b0dd5291c2f8
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 345 on the base, 345 on this head, 0 new.
  • Tests run, with the command and pass, fail and skip counts:
    • zig fmt --check on 1 files: passes
    • git diff --check: passes
    • zig build test-server-cpu test-media-request-ownership-host: 12/12 steps succeeded; 2062/2069 tests passed (7 skipped)
    • zig build check-native-cuda-host compile-flashnext-mtp-parity-host compile-glm-native-open: 11/11 steps succeeded
    • zig build test-golden test-server-security test-pull-security: 76/76 steps succeeded; 32/32 tests passed
  • New tests:
    • security: a host with more addresses than the lookup's queue holds resolves, each address still checked
  • CI: runs on this push.
  • Not run, and why: Not run on Linux or Windows, and not inside a running server. On the earlier base the file's tests compiled for Linux (musl and glibc) and Windows. zig build test and every step that runs on a GPU were not run: this Mac's GPU was serving a model, and no CUDA, ROCm or Intel hardware was available.

Receipt

n/a. This change cannot reach inference: it is the fetch of a media URL before the request is admitted, and only with --vision --vision-urls.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. Each new test was shown to fail without its fix on the earlier base b38a4dd02. On this base only the passing side was rerun.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

Notes for the reviewer

  • The lookup still has no deadline of its own, as on main.

Suggested changelog line

Server: a media URL whose host has more than 32 addresses no longer hangs the request.

…s resolves

The lookup for a media URL filled a 32-slot queue that only its own thread read, so a 33rd address
waited forever and held the request's connection slot. The lookup now runs beside its reader. Every
address must still be public and the connection still goes to the first.
@ashhart
ashhart force-pushed the security/media-host-lookup branch from 6d11acd to d6ef665 Compare November 13, 2026 00:02
@ashhart
ashhart merged commit a57d75e into main Nov 13, 2026
2 of 10 checks passed
@ashhart
ashhart deleted the security/media-host-lookup branch November 13, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant