midad 0.2.1
generated from midad spec --json at build time; not edited by hand
Install 0.2.1
Download the archive for your machine from this release, check it, and put the binary on your path:
$ curl -LO https://github.com/mdexec/midad/releases/download/v0.2.1/midad-x86_64-unknown-linux-gnu.tar.gz
$ curl -LO https://github.com/mdexec/midad/releases/download/v0.2.1/midad-x86_64-unknown-linux-gnu.tar.gz.sha256
$ sha256sum -c midad-x86_64-unknown-linux-gnu.tar.gz.sha256
$ tar xzf midad-x86_64-unknown-linux-gnu.tar.gz
$ install -m 0755 midad ~/.local/bin/midadThe two macOS archives are in the same release, midad-aarch64-apple-darwin.tar.gz
and midad-x86_64-apple-darwin.tar.gz. With cargo, cargo install midad
--locked builds the latest published crate; add --version 0.2.1 to pin this
one. Every install path is on the install page.
What changed
Summary: Four ways a program could reach past its permissions: block are closed, and a runaway recursion now stops at a limit the stack can hold instead of taking the server down.
Security fixes. Most of these are a way a program got something its
permissions: block did not name, and two are a program or one request taking
the process down; 0.2.0 is public and carries all of them, so this release
exists before any other work.
static:is a filesystem read, so it needs anfs_readgrant that covers the directory it serves, or*(E0305).static: "/"with only alistengrant served the whole machine andmidad checksaid ok. What to do: addfs_read: ["<the directory>/"]to the program's frontmatter.- A
dbgrant is a file grant, decided on real paths likefs_read, and the connection refusesATTACHandDETACH. Before this, one line of SQL created and wrote a database at any path the process could reach, and a symlink at the granted path was opened as its target. - A native build enforces its grants at run time: a symlink standing at a granted path is refused, and so is a granted directory that is a symlink. A compiled binary used to follow both, while the interpreter refused them.
- A symlink at a granted path whose target does not exist yet is refused too,
for
fs_writeas well as for reads: resolving the target failed, and the fallback then compared the link against itself. - Recursion stops at a depth the stack can hold. The depth limit was 10,000 against a stack that holds a few hundred debug frames, so it could never fire: a self-recursive program died with "has overflowed its stack" and exit 134, and one request to a route that recursed took the whole server with it. The limit and the stack are one number now, the refusal names the limit and the flag that raises it, and a server sizes each worker's stack the same way, so a recursive handler answers with a diagnostic and the process keeps serving. Compiled handlers are not covered yet: their recursion runs on the C stack with no counter. A long flat expression no longer overflows the checker's stack either; it checks.
- docs/SCOREBOARD.md is recounted from the repository: 91 error codes (89 asserted), 561 tests, and a total of 86/100 rather than the stale 84.
midad-bench is not published with this release or any later one; it stays a
development harness. See docs/RELEASING.md.