Reject receive transfers whose descriptor frame length exceeds the data
actually transferred. The descriptor carries a 12-bit frame length and
the chip accepts frames up to 4095 bytes, but a receive transfer only has
MCLBYTES minus the descriptor for frame data.
Trusting the descriptor produced an mbuf extending past its cluster.
A fragmented IPv4 datagram then carried it into m_cat(), where a default
kernel panics on a DIAGNOSTIC assertion.
Report and diff from Acts1631.
ok miod@ claudio@ kettenis@
Remove support for "fpu disabled" traps in the kernel. This used to be needed
to allow VIS instructions to be used in the kernel, but the last use of them
was removed in 2003.
ok claudio@
fix comment in uhid_xb360gp_report_descr, erroneously stating REPORT SIZE when it is REPORT COUNT. from Lucas de Sena ( lucas () seninha ! org ). No functional change.
uhidev_intr: reject payloads that exceed their declared input report
sizes. Lower priority bug where a malicious/compromised USB device can
overwrite memory.
Report and diff from Acts1631. ok deraadt@
Sometimes a specific address family will be broken or have sub-optimal
connectivity, and require manual overrides.
Allow -4 and -6 to specify using IPv4 or IPv6. Defaults don't change and
use whatever your system is configured to use first.
OK sthen@ kn@
rpki-client: reject URIs with // except at the start of the authority
This way each CA repo can only be addressed by a single URI, fixing a
bypass of the recently introduced counters.
Reported by Ties de Kock
discussed with job
ok claudio
In publish_done() check for MIN_FILE_SIZE after base64 decoding the input.
The base64 decoding function ignore any space character and so the
final length of the decoded blob can be smaller then expected if the
input string contains many spaces. Doing the check after is safe since
the base64 decode works even with an empty input.
On top of this fix a memory leak of the pctx in all error paths.
OK tb@
Activate linker relaxation on riscv64
Now that ld.lld and the rest of the ecosystem (eg lang/go) copes with
it, enable linker relaxation in clang. This lets ld.lld rewrite branches
to produce smaller and faster code.
Reminded by Brad, ok kettenis@
relayd: add "glob" and "glob ignorecase" matching keywords
In addition to the recent "pattern", the cookie, header, path, query and url
keys and values now accept "glob" and "glob ignorecase". The keywords can also
be given before "file" and then apply to every key read from it.
Without a keyword the old type defaults stay as they were. Header names are
case-insensitive (RFC 9110), so "glob" on a header name is treated as "glob
ignorecase". The "pattern" stays case-sensitive. The defaults are now clearly
documented.
The parser is stricter now! The following are errors now:
- a matching keyword together with "set" or "append"
- a matching keyword without a key or file, except with "log"
- "file" without a preceding lookup type
- a duplicate lookup type in the same rule
Valid configs keep working, configs that were silently misinterpreted before
are now rejected.
[3 lines not shown]
Remove amountpipekva variable and related computations. This variable used
to matter until rev 1.19 27 years ago, when the "direct write" code was
removed.
rpki-client: drop some redundant parentheses in return statements
Almost all of the code omits them, so be consistent. The remaining
two are special: to_encode() is rather complicated and CBS_strdup()
is upstream code.
ok job