summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-05kbind(2): disable system call if not initialized before first __tfork(2)Scott Soule Cheloha
To unlock kbind(2) we need to protect ps_kbind_addr and ps_kbind_cookie. The simplest way to do this is to disallow kbind(2) initialization after the first __tfork(2) call. If the first thread does not initialize the kbind(2) variables before __tfork(2) then we disable kbind(2) during that first __tfork(2) call. This is guenther@'s patch, I'm just committing it. Discussed with guenther@, deraadt@, kettenis@, and mpi@. ok kettenis@, positive response from mpi@, "I am busy" guenther@
2021-12-05Add test case for policy matching on responder with multiple policies thatTobias Heider
only differ by srcid.
2021-12-05libpcap parser uses a memory tracker to only free all objects at the end.Theo de Raadt
this code was slicing up large mallocs with sys/param.h ALIGN(). such a scheme loses the many overflow/damage checking benefits of malloc per object. Change the code to track independent allocations, rather than slicing. ok gnezdo claudio
2021-12-05elf64_checkum->elf64_checksum; adapted from changes by saitoh masanobuJason McIntyre
2021-12-05sytle -> style; adapted from changes by saitoh masanobuJason McIntyre
2021-12-05add missing mtx_leave() calls in error pathsJonathan Gray
ok anton@
2021-12-05fix use after freeJonathan Gray
ok tb@
2021-12-05Allow libradius tests to compile with opaque HMAC_CTX.Theo Buehler
2021-12-05Simplify DH_check_params a bit.Theo Buehler
It makes no sense to allocate an entire BN_CTX if we only use it to get a single BIGNUM, from which we subtract 1 to compare it to g. We can just use a plain BIGNUM and delete a bunch of lines. ok inoguchi jsing
2021-12-05Add initial regress for CT.Joel Sing
This provides test coverage for SCT encoding/decoding.
2021-12-05fix unintended sizeof pointer in debug pathJonathan Gray
ok markus@
2021-12-05fix unintended sizeof pointerJonathan Gray
ok claudio@
2021-12-05Defer rtm_80211info() call from ieee80211_set_link_state() to a task context.Stefan Sperling
Sending routing messages requires a socket lock which may sleep. ieee80211_set_link_state() is called from interrupts and timeouts where sleeping is not allowed. mvs@ pointed out that if_link_state_change() is already using a task for this reason. Should fix a witness-related panic reported by cheloha@ ok mvs@ tobhe@ florian@
2021-12-05Add RCS markersTheo Buehler
2021-12-04vmm(4): reload vmcs after possible sleep pointsDave Voutila
Guests running on Intel hosts that sleep on a lock might have their process moved to another cpu core by the scheduler. If this happens, the VMCS needs to be remotely cleared and locally loaded otherwise vmx instructions will fail. vmd(8) will receive a failure code and abort the guest. This change stores the current (last) cpu the process was on before attempting a function call that may sleep (e.g. uvm_fault(9)). Upon function return, perform the VMCS dance if needed. Tested with help from Mischa Pieters. OK mlarkin@
2021-12-04gross trailing whitespaceTheo Buehler
2021-12-04List subdirectories as a simple list. Avoids a source of many mergeTheo Buehler
conflicts in my work on making much of libcrypto opaque. discussed with jsing
2021-12-04Annotate the structs to be moved to bn_lcl.h in the next bumpTheo Buehler
ok inoguchi jsing
2021-12-04Use BN_is_negative(p) instead of p->neg in one place.Theo Buehler
2021-12-04Add #include "bn_lcl.h" to the files that will soon need it.Theo Buehler
ok inoguchi jsing
2021-12-04Previous diff was incomplete, we also need to do DMA translation forMark Kettenis
bus_dmamap_load_raw(9). This fixes xhci(4) on the rpi4 with the U-Boot from ports that is installed on the arm64 installation media. ok mglocker@, patrick@
2021-12-04Implement the BN_to_montgomery() macro as a functionTheo Buehler
ok inoguchi jsing
2021-12-04Implement the BN_is_negative macro as a functionTheo Buehler
ok inoguchi jsing
2021-12-04Provide function implementations for various BN_* macrosTheo Buehler
BN_abs_is_word, BN_is_{zero,one,word,odd}, BN_one, BN_zero_ex are now implemented as functions for internal use. They will be exposed publicly to replace the macros reaching into BIGNUM in the next bump. ok inoguchi jsing
2021-12-04Provide replacement functions for the BN_{get,set,with}_flags() macros.Theo Buehler
ok inoguchi jsing
2021-12-04Provide replacement functions for the BN_GENCB_set{,_old}() macrosTheo Buehler
The function implementations are necessary to make BIGNUM opaque. They will be used in libcrypto internally until they will replace the macro implementations with the next bump. ok inoguchi jsing
2021-12-04Consolidate {d2i,i2d}_{pr,pu}.cJoel Sing
Currently there are two files for private key ASN.1 (d2i_pr.c, i2d_pr.c) and two files for public key ASN.1 (d2i_pu.c, i2d_pu.c). All of the other ASN.1 code has d2i and i2d in the same per-object file. Consolidate d2i_pr.c/i2d_pr.c into a_pkey.c and consolidate d2i_pu.c/i2d_pu.c into a_pubkey.c before making any further changes to this code. ok tb@
2021-12-04Clean up and refactor server side DHE key exchange.Joel Sing
Provide ssl_kex_generate_dhe_params_auto() which handles DHE key generation based on parameters determined by the specified key bits. Convert the existing DHE auto parameter selection code into a function that just tells us how many key bits to use. Untangle and rework the server side DHE key exchange to use the ssl_kex_* functions. ok inoguchi@ tb@
2021-12-04Move the minimum DHE key size check into ssl_kex_peer_params_dhe()Joel Sing
ok inoguchi@ tb@
2021-12-04Check DH public key in ssl_kex_peer_public_dhe().Joel Sing
Call DH_check_pub_key() after decoding the peer public key - this will be needed for the server DHE key exchange, but also benefits the client. ok inoguchi@ tb@
2021-12-04Send out dstid as initiator if configured. This makes it easier forTobias Heider
the responder to match the correct policy if multiple are available. ok patrick@
2021-12-04Free cert, key and ocsp_staple on exit of do_keypair_test().Theo Buehler
Reported by Ilya Shipitsine, discussed with jsing
2021-12-04Convert main into single exit to appease asan.Theo Buehler
2021-12-04Explicitly free EVP_MD_CTX to appease asan. Reported by Ilya Shipitsin.Theo Buehler
2021-12-04list backup files created by adduser; from leon fischerJason McIntyre
adjust list width to make it all fit
2021-12-04update the firmware file list, helped by stsp;Jason McIntyre
2021-12-04Consolidate error paths in usbd_new_device, shaving of 14 lines.Anton Lindqvist
ok bluhm@
2021-12-04Do not setup pipes between SERVER processes, they don't talk to eachFlorian Obser
other. Since this generates a full mesh, the amount of filedescriptors needed grows quadratically with the amount of configured prefork processes. Might fix an out of filedescriptor bug that beck is seeing. OK benno
2021-12-04Add regress for ECPKParameters ASN.1 encoding/decoding.Joel Sing
2021-12-04RSA/SHA-1 is not used by default anymore on the serverChristian Weisgerber
2021-12-03add Allwinner H6 supportSASANO Takayoshi
ok kettenis@
2021-12-03support AXP805 PMICSASANO Takayoshi
ok kettenis@
2021-12-03- support I2C connected PMIC, add "early 1" to sxitwi.SASANO Takayoshi
- support axppmic via iic ok kettenis@
2021-12-03Add tdb_delete_locked() to replace duplicate tdb deletion code inTobias Heider
pfkey_flush(). ok bluhm@ mvs@
2021-12-03Perform DMA address translation if required.Mark Kettenis
ok patrick@
2021-12-03Replace asn1_tlc_clear and asn1_tlc_clear_nc macros with a function.Joel Sing
Call the replacement asn1_tlc_invalidate() since it does not actually clear the ASN1_TLC. While here, name the ASN1_TLC variables consistently as ctx, remove a pointless comment and simplify ASN1_item_d2i() slightly. ok inoguchi@ tb@
2021-12-03Group and sort includes.Joel Sing
2021-12-03Call asn1_item_ex_d2i() directly from ASN1_item_d2i()Joel Sing
ASN1_item_ex_d2i() is just a wrapper around the internal asn1_item_ex_d2i() function, so call asn1_item_ex_d2i() directly. ok inoguchi@ tb@
2021-12-03Add TDB reference counting to ipsp_spd_lookup(). If an outputAlexander Bluhm
pointer is passed to the function, it will return a refcounted TDB. The ref happens when ipsp_spd_inp() copies the pointer from ipo->ipo_tdb. The caller of ipsp_spd_lookup() has to unref after using it. tested by Hrvoje Popovski; OK mvs@ tobhe@
2021-12-03Convert ASN1_PCTX_new() to calloc().Joel Sing
Rather than using malloc() and then initialising all struct members to zero values, use calloc(). ok schwarze@ tb@