summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-07Use static functions for EC_GFp_mont_method() implementation.Joel Sing
Move the EC_METHOD to the bottom of the file, which allows all implementation functions to become static. Remove unneeded prototypes. ok tb@
2023-03-07fix memory leak in process_read() path; Spotted by James RobinsonDamien Miller
in GHPR363; ok markus@
2023-03-07Fix formatting of comments.Joel Sing
2023-03-07Consolidate clear code for EC_GFp_mont_method.Joel Sing
Use a fang dangled thing (known as a function) to avoid duplicating the same code in five places. ok tb@
2023-03-07correct size for array argument when changing UMAC_OUTPUT_LENDamien Miller
Coverity CID 291845; ok dtucker@
2023-03-06Delete extraneous trailing blank line.Kenneth R Westerback
2023-03-06Enforce X509v3 SKIs to be the SHA-1 hash of the Subject Public KeyJob Snijders
In the RPKI-context (RFC 6487 section 4.8.2), SKIs are not at all arbitary identifiers: they must be the SHA-1 hash of the 'Subject Public Key'. Add a SPK digest calculation and comparison to the X509v3 extension containing the SKI. OK tb@
2023-03-06Correctly account the number of bytes processed when outputting UTF-8 encodedMiod Vallat
characters.
2023-03-06For conciseness sake' remove non-optional items in references in STANDARDSJob Snijders
Discussed with deraadt@ tb@ claudio@
2023-03-06Clean up ndef_{prefix,suffix}_free()Theo Buehler
These functions are rather similar, so there's no need for the code to be wildly different. Add a missing NULL check to ndef_prefix_free() since that will be needed in a subsequent commit. ok jsing
2023-03-06Remove pointless ":ob#0:pb#0:[tb=swap:]" disktab lines.Kenneth R Westerback
ok miod@
2023-03-06Use GPT_UUID_NBSD_UFS, not GPT_UUID_FBSD_DATA, for NetBSD GPTKenneth R Westerback
partition entries. Add GPT_UUID_LEGACY_MBR entry to list of known partition id's as it is defined in the UEFI Standard.
2023-03-06Define a few more attributes for the sake of the readattr subcommand;Miod Vallat
curated and contributed by Brian Conway, thanks!
2023-03-06In iskmemdev(), do not check for the minor of /dev/io. It has beenMiod Vallat
deprecated more than 25 years ago and removed more than 20. From Crystal Kolipe, thanks!
2023-03-06Replace old'n'wrong UTF-8 logic with a better one borrowed from Citrus;Miod Vallat
issue reported by Crystal Kolipe on tech@
2023-03-06Ensure .cer and .crl outside-TBS signatures are sha256WithRSAEncryptionJob Snijders
Note: there is a potential for confusion in RFC 7935, the specification differentiates between 2 contexts: "in the certificate" and "CMS SignedData". In the CMS context, either rsaEncryption or sha256WithRSAEncryption can appear (and both *do* appear in the wild). However, RFC 7935 section 2 fourth paragraph starting with "In certificates, CRLs, ..." mandates that sha256WithRSAEncryption is used to sign .cer and .crl files: "The Object Identifier (OID) sha256WithRSAEncryption from RFC4055 MUST be used in these products." The above requirement matches observations on existing RPKI deployments. OK tb@
2023-03-06spellingTheo de Raadt
2023-03-06Add check for RSA key pair modulus & public exponentJob Snijders
Both the SPKI inside a CA's .cer TBS section and Signers wrapped in CMS must be RSA, with mod 2048 & (e) 0x10001 OK tb@
2023-03-06Fix URL to RFCJob Snijders
2023-03-06Rename struct ${app}_config to plain cfgTheo Buehler
All the structs are static and we need to reach into them many times. Having a shorter name is more concise and results in less visual clutter. It also avoids many overlong lines and we will be able to get rid of some unfortunate line wrapping down the road. Discussed with jsing
2023-03-06tweak examples/iked.conf bits a little further following comments byStuart Henderson
aisha@ and Crystal Kolipe, ok aisha@ tobhe@
2023-03-06Document ECDSA_SIG_get0_{r,s}()Theo Buehler
2023-03-06Document DH_get0_* for individual DH members.Theo Buehler
2023-03-06Use nitems() of source and destination partition arraysKenneth R Westerback
rather than assuming they are the same size. Zero destination entries when no source partition available. No intentional functional change.
2023-03-06Document DSA_get0_* for individual DSA membersTheo Buehler
2023-03-06Document RSA_get0_* for individual RSA members.Theo Buehler
Loosely based on OpenSSL commit 6692ff77. Prodded by job
2023-03-06Unit test for kex_proposal_populate_entries.Darren Tucker
2023-03-06Refactor creation of KEX proposal.Darren Tucker
This adds kex_proposal_populate_entries (and corresponding free) which populates the KEX proposal array with dynamically allocated strings. This replaces the previous mix of static and dynamic that has been the source of previous leaks and bugs. Remove unused compat functions. With & ok djm@.
2023-03-06Rework asn1_item_flags_i2d()Theo Buehler
Flip the logic of NULL checks on out and *out to unindent, use calloc() instead of malloc() and check on assign. Also drop the newly added len2 again, it isn't needed. ok jsing
2023-03-06Switch all iwx(4) devices to -77 firmware images.Stefan Sperling
New firmware versions address some security issues, as outlined here: https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00621.html https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00699.html Firmware has been available in fw_update for some time so systems which track -current should already have the new -77 images. Tested: ax200: jmc, hrvoje, stsp ax201: Mikhail, Sven Wolf, stsp ax210: lraab, stsp ax211: Mikhail, dv
2023-03-06Make iwx(4) get the primary channel number from AP beacon info, ratherStefan Sperling
than assuming that it always matches our currently configured channel. Should prevent problems on 40/80Mhz channels if there is a mismatch.
2023-03-06fix previous: only ignore request to delete key while doing crypto in hardwareStefan Sperling
2023-03-06Avoid trying to remove keys if the station is not active in iwx firmware.Stefan Sperling
Fixes a firmware panic I encountered while working on firmware upgrades.
2023-03-06ignore iwx DATA_PATH group notification 0xf8Stefan Sperling
Undocumented and ignored by the Linux driver, too. Apparently only used by the Windows driver. Confirmed by Johannes Berg.
2023-03-06always provide a subset of STA info in the MAC context commandStefan Sperling
We used to provide beacon-related information only once our station was associated. New firmware wants to see this information earlier, when are about to send an AUTH frame. Otherwise SYSASSERT 0x2000011A is raised. Problem diagnosed with help from Johannes Berg, thanks!
2023-03-06fix iwx session protection event durationStefan Sperling
Firmware expects time in TU units. Use 900 TU for the session protection timeout, like the linux driver does. verified with Johannes Berg from Linux/Intel, thanks for the support!
2023-03-06support the new iwx SCD_QUEUE_CONFIG commandStefan Sperling
Required for adding/removing Tx queues on new firmware versions. Semantics have changed yet again. Good old iwm(4) required manual removal of related Tx queues when a station is removed from firmware. At some point iwx(4) firmware removed this requirement and demanded that queue removal would be done implicitly by firmware instead. And now the firmware engineers at Intel have again changed their minds about this, and explicit queue removal is required again. It is sad that we are being driven through such a marathon of changes just in order to pick up some firmware security fixes...
2023-03-06add support for the iwx BAID allocation config commandStefan Sperling
This command is required to set up Rx aggregation on new firmware.
2023-03-06implement support for iwx PHY context cmd version 4Stefan Sperling
2023-03-06support the new IWX_STA_MAC_DATA_API_S_VER_2 APIStefan Sperling
MAC context command fields which firmware has been ignoring since the iwm hardware generation have been repurposed for information related to 11ax. Just set these fields to zero. Firmware -71 and up will panic otherwise.
2023-03-06add support for the iwx RLC config commandStefan Sperling
New firmware wants to be told about MIMO antenna configuration via a separate command, rather than via the good old PHY context command.
2023-03-06support iwx rate_n_flags API version 2 and delete fixed Tx rate supportStefan Sperling
As of this commit iwx will ignore 'ifconfig media' commands where the user-specified Tx rate resolves to something other than 'autoselect'. The existing support for forcing a Tx rate was already only partially working in 11n and 11ac modes. I doubt anyone had a serious use case for this. If you really need to force a specific Tx rate for data frames sent by iwx then hack the driver instead of using 'ifconfig media'. The firmware interface was designed for Tx rate selection in firmware. Maintaining support for overriding the Tx rate with ifconfig in face of complicated firmware interface changes such as this rate_n_flags change is just not worth it. While trying to keep forced Tx rates working on top of the new rate_n_flags format I accidentally broke the Tx rate used for managment frames during regular operation, which caused much frustration.
2023-03-06change current iwx rate_n_flag field names to indicate this is API version 1Stefan Sperling
also add some missing bits found in the Linux driver while here
2023-03-06add support for iwx TLC config command v4Stefan Sperling
2023-03-06add support for iwx firmware alive response version 6Stefan Sperling
2023-03-06recognize more iwx ucode TLV sections which are present in newer fw imagesStefan Sperling
2023-03-06Fix commentJob Snijders
2023-03-06Fix some return checks in ecdh_cms_encrypt()Theo Buehler
i2d functions return <= 0 on error, so check for that instead of == 0. The issue with CMS_SharedInfo_encode() was found by Niels Dossche. OpenSSL review overlooked that they had turned penclen into a size_t. In principle the issue with i2d_X509_ALGOR() is purely cosmetic. Why do a strange check when there is an idiomatic check? Then again this is CMS... ok jsing
2023-03-06Fix incorrect RSA_public_decrypt() return checkTheo Buehler
RSA_public_decrypt() returns <= 0 on error. Assigning to a size_t and checking for == 0 is not the right thing to do here. Neither is blindly turning the check into <= 0... Found by Niels Dossche ok jsing
2023-03-06ASN.1 enc: check ASN1_item_ex_i2d() consistencyTheo Buehler
The i2d API design is: call a function first with a pointer to NULL, get the length, allocate a buffer, call the function passing the buffer in. Both calls should be checked since ther are still internal allocations. At the heart of ASN.1 encoding, this idiom is used and the second call is assumed to succeed after the length was determined. This is far from guaranteed. Check that the second call returns the same length and error otherwise. ok jsing