vio(4): check for csum offload before using TSO
We need a double check here for this illegal behavior,
cause not all Hypervisor follow the VirtIO specification.
And Linux has this check, too.
Report and diff from Ali Raheem.
ok stsp@
pf: compute the /0 IPv4 source-limiter mask without a 32-bit shift
prefix 0 keeps the zeroed mask: every address in one bucket.
A shift by 32 is UB.
OK kn@
pf_rule_free needs to pf_tag_unref
pf_rule_copyin() may have taken tag references before the
caller bailed out; drop them like pf_rm_rule() does for rules
that made it into a ruleset.
OK henning
Limit TCP reassembly list walks.
To prevent CPU exhaustion by a remote TCP peer, limit the t_segq
queue length. The segment at rcv_nxt is still accepted, so the
missing data can drain a full queue. Large windows on a high
bandwidth connection may hit a strict 100 segment maximum in
legitimate cases, so also make the limit depend on the socket buffer
size. Introduce a specific TCP counter for a full reassembly queue.
from Acts1631; OK claudio@
rpki-client: reject rsync hosts starting with '.' as well
Not all calls to rsync_base_uri() pass through valid_uri(), so reject '.'
at the start here as well.
ok claudio job
rpki-client: validate first host character
After refactoring to normalize the uri scheme, a check that a host must
not start with a '.' was missed, which enabled path traversal on systems
that don't have unveil(). Reject zero-length hosts as well.
Pointed out by Ties de Kock
ok claudio job
Stop setting pr_protocol to PF_UNIX for unix domain sockets.
This reverts the rev 1.3 commit from 1998:
Allow PF_LOCAL as the proto arg in socketpair(2). Previously, only
PF_UNSPEC would work. Needed for general sanity as well as XPG4.2.
PF_LOCAL and AF_LOCAL is dead. So is the idea of passing any value other
than 0 to socketpair's protocol argument. Set pr_protocol explicitly to
0 to show that this is intentional.
This fixes an unexpected return value of 1 for
getsockopt(fd, SOL_SOCKET, SO_PROTOCOL, ...) calls.
Reported by robert@
OK millert@
Use the correct pr_domain->dom_family == AF_UNIX check in SO_PEERCRED.
Using pr_protocol instead of checking the pr_domain dom_family field
will stop working for AF_UNIX.
OK millert@
www/mozilla/mozilla.port.mk: add support to drive the build with 'mach'
since #2038789 we've seen that the 'legacy' method of running
CONFIGURE_SCRIPT and MAKE is a bit less tested, and will eventually be
completely unsupported/deprecated in the coming year.
add MOZILLA_USE_MACH knob, that if defined will:
- set do-{configure,build,install} targets to run the steps via ${WRKSRC}/mach,
passing various CONFIGURE_ARGS/MAKE_FLAGS/PARALLEL_MAKE_FLAGS/MAKE_ENV/etc.
- add MOZBUILD_STATE_PATH=${WRKDIR} to MAKE_ENV/CONFIGURE_ENV so that
mach stores it state in a throwaway dir that _pbuild can write
- adds MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none to MAKE_ENV so that
mach doesnt try running pip (and horribly blow)
if MOZILLA_USE_MACH isnt defined (eg default), set
CONFIGURE_STYLE=simple and CONFIGURE_SCRIPT?=configure.py, as it's
already defined this way in all consumers.
inconditionally add MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none to
CONFIGURE_ENV while here, its required since #2026497. and already set
[7 lines not shown]
Rework aspath_verify error handling and expand what AS_ERR_SOFT covers
Instead of AS_ERR_SOFT as a catchall for various soft errors split
the aspath_verify error into negative and positive errors. Negative
errors are hard errors and reset the session. Positive errors are
soft errors and use treat-with-withdraw.
Introduce AS_IS_HARD_ERROR() macro to quickly check for hard errors.
Treat AS_ERR_MAX as a soft-error to prevent a reset in this specific
case. The path is valid but too large and could cause downstream issues.
Reported by Özgün Kültekin
OK tb@