Fix signed overflow in ieee80211_40mhz_valid_secondary_below().
The secondary_chan variable should be uint8_t instead of int8_t,
matching ieee80211_40mhz_valid_secondary_above().
ok phessler@ stsp@
Update libexpat to version 2.8.0
Relevant for OpenBSD are other changes #1201 #1189 #1203 #1204 #1194
#1202 #1187 #1192 #1171 #1170. Minor library bump is necessary as
XML_SetHashSalt16Bytes() has been added. Security fixes have been
backported in previous commit.
OK tb@
Impose the same MAX_ASPA_SPAS_COUNT limit onto the merged APSA sets that
are sent to the RDE.
The merged ASPA table could in theory become so big that the imsg framework
fails. So limit the merged ASPA set to the same MAX_ASPA_SPAS_COUNT as
the aspa-set { } in the main config and the RTR ASPA PDUs.
Log a warning when a ASPA entry is skipped because of this limit.
There is nothing persisted so the warning will be repeated whenever there
is an update. Since it is highly unlikly that such an big ASPA will ever
exists this is good enough for now.
OK tb@
In merge_aspa_set() do the MAX_ASPA_SPAS_COUNT check the same way it is
done in the rest of the code and by doing so fix a harmless off by one
error.
OK tb@
Track the number of elements in the array instead of the highest possible bit.
The bitmap code tracked the maximum number of bits allowed but that could
trigger an overflow in BITMAP_ROUNDUP() for very big bitmaps.
Move the max from tracking bits to tracking the number of elements in the
array covering the bitmap.
Add extra casts in BITMAP_SETPTR() and BITMAP_GETPTR() to stop 32bit archs
warning about a pointer to int case of different size.
OK tb@
move bpf for outgoing packets later in the transmit path.
the convention in openbsd is to have the bpf handling as close to
the "wire" as possible so you can see what ends up being send to
the network. wg was showing outgoing packets to bpf really early,
before the wgaip peer selection was checked and before the packet
was queued for transmission, so it gave a false impression about
what it was doing.
this moves the outgoing bpf stuff after the ifq dequeue. it could
be moved a bit later still (after encryption), but this is an easy
win for now.
based on a discussion with sashan@ and mvs@
ok mvs@ sashan@ sthen@ deraadt@
Almost 26 years ago, when sti(4) was rewritten as an MI driver, some of
the pci-related defines for the "bus support" field in the rom information
were incorrectly defined. This was not noticed as there was no pci attachment
for sti devices yet.
Replace these with the correct values, as documented in the sti spec and also
in stirom.h found in HP-UX 11i.
While there, rework and simplify the logic deciding whether we need to make
a ram copy of the rom on pci devices.
No functional change, FireGL-UX still won't work.
Slightly adjust BUGS section for X509_addr_add_range()
Since x509_addr.c r1.95 X509_addr_add_range() clears the unused bits in
the maximum, so this is is only true in some implementations.
usr.sbin/httpd: inherit gzip-static in locations
Location configuration inherited most server level options but dropped
gzip-static, so requests matching a location skipped static gzip lookup
even when the parent server enabled it.
Add an explicit no gzip-static state and inherit the gzip flag pair only
when the location has not set either form, preserving location specific
overrides.
Reported by and OK: job@
While technically allowed, shared libraries without PT_LOAD segments
don't really make any sense. Bail out early to avoid the bits of code
that assume that we have a PT_LOAD sagment. This avoids a NULL pointer
dereference on i386 (which uses library_mquery.c) or bogus mmap calls
on other architectures (which use library.c).
The potential NULL pointer dereference in library_mquery.c was found by
Frank Denis.
ok guenther@
The regression fix in rev. 1.271 was still incomplete.
While the fchdir(2) in main() is indeed needed such that the mparse_open()
in process_onefile() finds local files, there is a second, smaller
issue purely inside check_xr(): As the ultimate fallback, fs_search()
looks for cross-referenced manual pages in the current directory,
which is typically used for working on software under development
that is not yet installed. Consequently, a second fchdir(2) is needed
inside check_xr() between mansearch(), which typically changes directory,
and the subsequent fs_search().
This makes sure that "mandoc -T lint" on a manual page that contains
an .Xr link to another manual page that is not installed but present
in the current directory does not complain about that link.
Again reported by anton@.
The fix is slightly awkward because the directory file descriptor
needs to be passed down through multiple layer of subroutines, but i
fear that cannot be helped because it is needed both in the main program
and in the low-level function check_xr().
Add kernel support for the vector extension on riscv64.
The V extension (where supported) adds an additional 32 vector registers
that are variable length (up to 65,536 bits, but more commonly 2048 bits).
In order to support the use of the V extension (and additional vector
extensions) we need to enable the vector extension and save/restore the
vector registers.
ok kettenis@
openssl s_client: avoid two out of bounds writes
A NUL termination after an unchecked BIO_read() call in XMSS mode could
lead to a write one byte before the start of sbuf or one past its end.
Add an error check to avoid the former and read one byte less to avoid the
latter.
Found by Frank Denis