Commit Graph
8 Commits
Author SHA1 Message Date
Filippo Valsorda c45ccfd215 age,internal/format: avoid echoing private keys in errors
Reported by Joe Doyle of Trail of Bits.
2026-08-29 19:30:10 +02:00
Filippo Valsorda 27188e780b internal/format: limit header size and memory use
The application has no way to limit the header separately from the body,
so we have to enforce some sanity limits to prevent excessive memory use.

To relax the limits somewhat, make the parsing more efficient.

New limits are:

  * 2 MiB total header size (enough for > 1024 PQ recipients)
  * 1024 recipient stanzas
  * 128 arguments per stanza

Fixes #701
2026-08-29 19:30:10 +02:00
Filippo Valsorda abe371e157 all: run "go fix" 2025-12-25 20:48:28 +01:00
Filippo Valsorda 891be91d42 armor: add FuzzMalleability test 2022-07-03 12:48:48 +02:00
Filippo Valsorda 8023f06ce2 all: build tag tests that require Go 1.18 2022-06-20 22:33:31 +01:00
Filippo Valsorda 4f7bb44386 internal/format: add malleability fuzz test 2022-06-20 01:18:48 +01:00
Filippo Valsorda dfa2052cb7 all: move copyright owners to AUTHORS file 2021-11-24 11:29:15 +01:00
Filippo Valsorda 15df6e2cf7 internal/format: require the last line of stanzas to be short
We are going to reuse the stanza format for IPC in the plugin protocol,
but in that context we need stanzas to be self-closing. Currently they
almost are, but if the body is 0 modulo 48, there is no way to know if
the stanza is over after the last line.

Now, all stanzas have to end with a short line, even if empty.

No ciphertexts generated by age in the past are affected, but 3% of the
ciphertexts generated by rage will now stop working. They are still
supported by rage going forward. If it turns out to be a common issue,
we can add an exception.
2021-02-08 19:55:28 +01:00