summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-17Add regress coverage for BN_lebin2bn().Joel Sing
2024-04-17Revert previous, it breaks IPv6 on loopback interfaces.Florian Obser
Reported by bket & anton
2024-04-17Avoid NULL dereference in EVP_PKEY_paramgen()Theo Buehler
If EVP_PKEY_new() returns NULL, it would be passed to the paramgen() pmeth which would typically dereference it. This is identical to a recent change in keygen(). ok jsing
2024-04-17Only use the first egress interface in $IFIDX and $IFLLADDR. SystemsClaudio Jeker
can have more then one interface. This only works if ther first egress interface is a ethernet interface (P2P interfaces have no LLADDR) but that was already buggy before this. OK bluhm@ martijn@
2024-04-17Use $_disk consistently over $1 in md_installboot(); no functional changeKlemens Nanni
Somehow I did not amend those right away when adding local _disk in r1.43
2024-04-17openssl req: plug obvious leakTheo Buehler
CID 492603
2024-04-16Switch tar(1) write default format to 'pax'Jeremie Courreges-Anglas
Lets us store longer file names, link names, finer grained timestamps, larger archive member files, etc; at the expense of larger uncompressed archives and less widespread support across the ecosystem. If you're unhappy with the new defaults, you can use -F ustar. Or you can help fix bugs / find a better middle ground. Prodding from various including job@ and deraadt@ ok sthen@ caspar@ millert@
2024-04-16Fix reading large pax extended recordsJeremie Courreges-Anglas
512 bytes isn't enough if you want to store rather large but still useful long file names or symbolic links destinations. The best way to size the buffer to read those records is based upon the largest paths pax(1) can handle, and that is PAXPATHLEN. Reported by caspar@, input and ok millert@
2024-04-16Fix pasto: broken storage of symbolic link long destinations in pax formatJeremie Courreges-Anglas
2024-04-16Revert wip patch, not intended for commitJeremie Courreges-Anglas
2024-04-16Add tar(1) -F option to select write formatJeremie Courreges-Anglas
We want to move towards 'pax' as the default format for writing, this option lets users downgrade to -F ustar where the 'pax' format isn't convenient/usable (same as -x <format> in pax(1)). -F <format> is more generic than -o/-O. -H (GNU tar) was already used and we don't want long options so --format (NetBSD/FreeBSD) is excluded too. ok sthen@ caspar@ millert@
2024-04-16Correctly detect 'pax' format archives in append modeJeremie Courreges-Anglas
We expect that existing pax archives start with a global or extended header. If they don't, append operations will be done using ustar format. Fixes append mode on pax archives where pax(1) would bail out when appending to pax archives, falsely detecting a mismatch. Reading was unaffected. Reported by caspar@, ok caspar@ millert@
2024-04-16Fix key share negotiation in HRR caseTheo Buehler
In the ClientHello retrying the handshake after a HelloRetryRequest, the client must send a single key share matching the group selected by the server in the HRR. This is not necessarily the mutually preferred group. Incorrect logic added in ssl_tlsect.c r1.134 would potentially reject such a key share because of that. Instead, add logic to ensure on the server side that there is a single share matching the group we selected in the HRR. Fixes a regress test in p5-IO-Socket-SSL where server is configured with P-521:P-384 and the client with P-256:P-384:P-521. Since the client sends an initial P-256 key share, a HRR is triggered which the faulty logic rejected because it was not the mutually preferred P-384 but rather matching the server-selected P-521. This will need some deduplication in subsequent commits. We may also want to consider honoring the mutual preference and request a key accordingly in the HRR. reported by bluhm, fix suggested by jsing ok beck jsing
2024-04-16Prevent toctu issues in static file serving and auto index generation.Florian Obser
This fixes a problem in passing, reported by matthieu@ where httpd would return 500 Internal Server Error when it could stat(2) but not open(2) a file. The correct error code is 403. testing matthieu ok tobhe, tl;dr ok stsp input & OK deraadt
2024-04-16Update Spleen kernel fonts to version 2.1.0, bringing the followingFrederic Cambus
improvements: - Fix latin small letter 'u' smoothing in the 32x64 version
2024-04-16Destination addresses make no sense on loopback interfaces.Florian Obser
While here use (variable & FLAG) or !(variable & FLAG) consistently in in6_update_ifa(). Discussed with claudio OK denis
2024-04-16Invert BN_BITS2 handling in bn_bin2bn_cbs() and bn_hex2bn_cbs().Joel Sing
This results in simpler code. Suggested by tb@ during review.
2024-04-16Rewrite BN_bin2bn() using CBS.Joel Sing
ok tb@
2024-04-16Provide bn_expand_bytes().Joel Sing
This will be used in an upcoming change. ok tb@
2024-04-16Rename bn_expand() to bn_expand_bits().Joel Sing
Also change the bits type from int to size_t, since that's what the callers are passing and we can avoid unnecessary input validation. ok tb@
2024-04-16Use route cache function in IP input.Alexander Bluhm
Instaed of passing a struct rtentry from ip_input() to ip_forward() and then embed it into a struct route for ip_output(), start with struct route and pass it along. Then the route cache is used consistently. Also the route cache hit and missed counters should reflect reality after this commit. There is a small difference in the code. in_ouraddr() checks for NULL and not rtisvalid(). Previous discussion showed that the route RTF_UP flag should only be considered for multipath routing. Otherwise it does not mean anything. Especially the local and broadcast check in in_ouraddr() should not be affected by interface link status. When doing cache lookups, route must be valid, but after rtalloc_mpath() lookup, use any route that route_mpath() returns. OK claudio@
2024-04-16Run raw IPv6 input in parallel.Alexander Bluhm
Get rip6_input() in the same shape as rip_input(). Call soisdisconnected() from rip6_disconnect(). This means that the raw IP socket cannot be reconnected later. Now raw IPv6 behaves like IPv4 in this regard, KAME code is quite inconsistent here. Also make sure that there is no race between disconnect, input and wakeup. The inpcb fileds inp_icmp6filt and inp_cksum6 are protected by exclusive net lock in icmp6_ctloutput(). With all that, mark raw IPv6 sockets to handle input in parallel. OK mvs@
2024-04-16remove unused functions; ok tb@Jonathan Gray
2024-04-16Call bufq_destroy() in swap_off for the VREG case since swap_on() calledClaudio Jeker
bufq_init(). Similar issue as the use-after-free in mfs. Missing call noticed by jsg@ OK deraadt@ mpi@
2024-04-16Call bufq_destroy() in mfs_reclaim() before freeing the mfsnode.Claudio Jeker
This fixes a use-after-free bug in bufq_quiesce() once a mfs partition was unmounted. OK mpi@ deraadt@
2024-04-16Prevent a NULL dereference in error code path.Martin Pieuchot
Under memory pressure allocating an amap chunk can fail. In such case it is not possible to call amap_wipeout() because the newly allocated amap isn't yet on the global list. Issue reported by bluhm@, ok jsg@
2024-04-16sortTheo Buehler
2024-04-15Amend previous: improve commentCaspar Schutijser
2024-04-15Don't take solock() in soreceive() for udp(4) sockets.Vitaliy Makkoveev
These sockets are not connection oriented, they don't call pru_rcvd(), but they have splicing ability and they set `so_error'. Splicing ability is the most problem. However, we can hold `sb_mtx' around `ssp_socket' modifications together with solock(). So the `sb_mtx' is pretty enough to isspiced() check in soreceive(). The unlocked `so_sp' dereference is fine, because we set it only once for the whole socket life-time and we do this before `ssp_socket' assignment. We also need to take sblock() before splice sockets, so the sosplice() and soreceive() are both serialized. Since `sb_mtx' required to unsplice sockets too, it also serializes somove() with soreceive() regardless on somove() caller. The sosplice() was reworked to accept standalone sblock() for udp(4) sockets. soreceive() performs unlocked `so_error' check and modification. Previously, we have no ability to predict which concurrent soreceive() or sosend() thread will fail and clean `so_error'. With this unlocked access we could have sosend() and soreceive() threads which fails together. `so_error' stored to local `error2' variable because `so_error' could be overwritten by concurrent sosend() thread. Tested and ok bluhm
2024-04-15Delete unused inp_csumoffset define.Alexander Bluhm
OK mvs@
2024-04-15Switch pax(1) to write archives using the 'pax' format by defaultJeremie Courreges-Anglas
ramdisk versions will keep using ustar for writing. ok millert@
2024-04-15Remove workarounds for unprototyped symbolsTheo Buehler
2024-04-15Sync with font module variable namespacing changes.Anthony J. Bentley
ok sthen@
2024-04-15Include the correct headerTheo Buehler
2024-04-15sync libressl bumpTheo Buehler
2024-04-15crank libtls like libcrypto and libsslTheo Buehler
2024-04-15crank libssl major after libcrypto major and symbol removalTheo Buehler
2024-04-15Unexport SSL_version_strTheo Buehler
ok jsing
2024-04-15crank libcrypto major after symbol removalTheo Buehler
2024-04-15Bye, bye, OPENSSL_str{,n}casecmp()Theo Buehler
ok jsing
2024-04-15And a pile of TS ASN.1 stuff becomes internal-only, tooTheo Buehler
ok jsing
2024-04-15X509_NAME_ENTRIES_it and X509_NAME_INTERNAL_it go internalTheo Buehler
It's always good to see something called internal in the public API. ok jsing
2024-04-15And here go {,EC}DSA_SIG_itTheo Buehler
ok jsing
2024-04-15Add scandirat(3); from freebsdFlorian Obser
To be used in httpd(8) shortly to prevent toctu issues. This makes __fdopendir internally accessible to avoid unnecessary syscalls in scandirat(3). Suggested & diff by guenther suggested by & OK millert tweak & OK guenther OK tb, jca This rides the libc crank.
2024-04-15DHparam_it becomes static, tooTheo Buehler
ok jsing
2024-04-15More X9.62 stuff was never used outside of ec_asn1.cTheo Buehler
We only need the ASN.1 items. ok jsing
2024-04-15EC_PRIVATEKEY becomes internal-only, tooTheo Buehler
ok jsing
2024-04-15Unexport the ECPKPARAMETERS APITheo Buehler
ok jsing
2024-04-15Make ECPARAMETERS_{new,free,it} internal-onlyTheo Buehler
ok jsing
2024-04-15Move BIO_CONNECT_{new,free}() to internal-onlyTheo Buehler
ok jsing