Commit Graph

266781 Commits

Author SHA1 Message Date
kamil 894a43424d Fix CVS Id
NFCI
2019-04-11 11:40:58 +00:00
kamil e041eb47de Fix a typo in a comment
NFCI
2019-04-11 11:26:13 +00:00
kamil f0e5d8d3d5 Fix a typo in a comment 2019-04-11 11:23:51 +00:00
kamil 80a0f04c44 Rely on volatile operations in KCOV data types
Extra atomicity isn't needed and makes maintenance burden between CPUs.

Fixes build issue on NetBSD/i386 reported by <msaitoh>
2019-04-11 11:20:46 +00:00
sevan bc3d9c27b1 s/ifnets/ifaddrs 2019-04-11 10:17:21 +00:00
maya 2cdcd0ba27 the drivers we dlopen need pthread.
I'm not sure about the exact scenario causing failure, but using the
libc pthread stubs isn't sufficient.

fixes one of the glmark2 crashes (at startup with llvmpipe)
2019-04-11 10:15:53 +00:00
sevan d421b01773 Revert previous & just use the inets function to handle both address families.
Heads up by <leot>
2019-04-11 09:59:24 +00:00
simonb 991dc94f90 Fix tyop. 2019-04-11 09:18:55 +00:00
msaitoh 922f383fc4 Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.
2019-04-11 09:16:56 +00:00
msaitoh a62c5ff057 KNF. No functional change. 2019-04-11 09:14:07 +00:00
msaitoh 80082ddb9c Simplify. No functional change. 2019-04-11 09:00:34 +00:00
msaitoh 430e9a94b1 Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.
2019-04-11 08:50:59 +00:00
msaitoh fa35121f1a Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set. Same as a part of
FreeBSD r217413.
2019-04-11 08:50:20 +00:00
uki 9b084d16c2 Fix "build.sh syspkgs" error when creating base-util-root package 2019-04-11 08:34:19 +00:00
wiz 6bd7c569be Avoid marking up semicolons. 2019-04-11 06:18:43 +00:00
mrg e2983d0f1a regen. 2019-04-11 05:06:53 +00:00
mrg f7fa2ddd6d fix a couple of errors in the previous. 2019-04-11 04:59:49 +00:00
mrg 5269e8cbd1 add a bunch of PCI devices on my systems, and a bunch of similar
ones found in the same sources online (mostly, Intel, AMD, Nvidia
and ASMedia web sites.)  this includes:

- bunch of xeon e5 v3 devices
- bunch of radeon chipsets
- bunch of nvidia chipsets
- bunch of marvell chipsets
- bunch of asmedia chipsets

be more consistent with device naming within some groups.
2019-04-11 04:56:54 +00:00
msaitoh aa50192d26 Fix yet another fiber mediachange fix. Not tested.
- Don't clear bits other than IFM_[FH]DX.
- Always reset PCS when any IFM_[FH]DX bit is changed.
2019-04-11 04:50:47 +00:00
msaitoh 207c6b8a34 Restore sys/ioccom.h. 2019-04-11 04:43:40 +00:00
msaitoh 93496269b0 Remove unused macro definitions. OK'd by pgoyette. 2019-04-11 04:42:08 +00:00
simonb 7924423e1f Generate SREC kernels that YAMON can load. 2019-04-11 04:28:17 +00:00
msaitoh 4f0d5c60d3 Remove inclusion of compat/sys/socket.h. It's not required anymore. 2019-04-11 03:07:11 +00:00
simonb 4b084a9ecc Be consistent with file^I and include^I. 2019-04-11 02:01:53 +00:00
simonb 83b02d4246 Force all devices to IPL_VM. For some reason serial interrupts at
SPL_SERIAL (SPL_HIGH) wedge.  Gets sbmips to ~multiuser (usually with
a bunch of segfaults).

Possibly a gross hack, but not sure the current code ever worked...
2019-04-11 01:53:41 +00:00
mrg b73d549731 be sure to keep cc1_cpu the CC1*_SPEC.
fixes x86 -mtune=native without killing -cxx-isystem.
2019-04-11 00:17:44 +00:00
jakllsch eeb3f2edfc Revert RockPro64 dts changes made for rk3399_pcie. This will need to
be re-done differently so as to avoid contention between dts upstream
and our driver.
2019-04-10 23:30:28 +00:00
sevan ef38acce77 typo 2019-04-10 23:14:46 +00:00
sevan 3689214e37 Use a separate variable for IPv6.
Found with npfctl validate.
2019-04-10 23:13:02 +00:00
sevan 4dcf217b7e Switch out deprecated keywords.
Found with npfctl validate.
2019-04-10 23:00:43 +00:00
maya 0757802169 Use the equivalent FUSE_VERSION. Probably a more adequately named macro for this 2019-04-10 21:42:52 +00:00
maya 090799ffb6 provide fuse_version 2019-04-10 21:38:02 +00:00
joerg 65f351a725 Extend LLVM link.mk to handle librt. Use it in Gallium. 2019-04-10 20:32:56 +00:00
maya 7845a6d414 revert previous 2019-04-10 20:06:26 +00:00
skrll dfb99727ca Print bootargs from the environment
Pass the enironment boot args if none are provided by the boot command
2019-04-10 19:36:04 +00:00
skrll 443282f6c6 Fixup EFIBOT_DEBUG output for non-_LP64 case 2019-04-10 19:11:42 +00:00
maxv fbb489fb52 Add the NVMM_CTL ioctl, always privileged regardless of the permissions of
/dev/nvmm. We'll use it to provide a way for an admin to control the
registered VMs in the kernel.

Add an associated wrapper in libnvmm.
2019-04-10 18:49:04 +00:00
christos 3214df8653 Try to avoid showing externally visible timing or memory access
differences regardless of whether the derived pwd-value is smaller than
the group prime.

This is related to CVE-2019-9494.
2019-04-10 18:01:08 +00:00
christos a1e04891bb This is an initial step towards making the FFC case use strictly
constant time operations similarly to the ECC case.
sae_test_pwd_seed_ffc() does not yet have constant time behavior,
though.
2019-04-10 18:00:45 +00:00
christos 64e3f4ec46 These groups have significant probability of coming up with pwd-value
that is equal or greater than the prime and as such, need for going
through the PWE derivation loop multiple times. This can result in
sufficient timing different to allow an external observer to determine
how many rounds are needed and that can leak information about the used
password.

Force at least 40 loop rounds for these MODP groups similarly to the ECC
group design to mask timing. This behavior is not described in IEEE Std
802.11-2016 for SAE, but it does not result in different values (i.e.,
only different timing), so such implementation specific countermeasures
can be done without breaking interoperability with other implementation.

Note: These MODP groups 22, 23, and 24 are not considered sufficiently
strong to be used with SAE (or more or less anything else). As such,
they should never be enabled in runtime configuration for any production
use cases. These changes to introduce additional protection to mask
timing is only for completeness of implementation and not an indication
that these groups should be used.

This is related to CVE-2019-9494.
2019-04-10 18:00:21 +00:00
christos 058fe5fa7e Make the non-failure path in the function proceed without branches based
on r_odd and in constant time to minimize risk of observable differences
in timing or cache use. (CVE-2019-9494)
2019-04-10 17:59:35 +00:00
christos 5f2ccbb7ce The QR test result can provide information about the password to an
attacker, so try to minimize differences in how the
sae_test_pwd_seed_ecc() result is used. (CVE-2019-9494)

Use heap memory for the dummy password to allow the same password length
to be used even with long passwords.

Use constant time selection functions to track the real vs. dummy
variables so that the exact same operations can be performed for both QR
test results.
2019-04-10 17:59:07 +00:00
christos fa9eb5850c This algorithm could leak information to external observers in form of
timing differences or memory access patterns (cache use). While the
previous implementation had protection against the most visible timing
differences (looping 40 rounds and masking the legendre operation), it
did not protect against memory access patterns between the two possible
code paths in the masking operations. That might be sufficient to allow
an unprivileged process running on the same device to be able to
determine which path is being executed through a cache attack and based
on that, determine information about the used password.

Convert the PWE finding loop to use constant time functions and
identical memory access path without different branches for the QR/QNR
cases to minimize possible side-channel information similarly to the
changes done for SAE authentication. (CVE-2019-9495)
2019-04-10 17:57:15 +00:00
christos cdc62bfef8 Get rid of the branches that depend on the result of the Legendre
operation. This is needed to avoid leaking information about different
temporary results in blinding mechanisms.

This is related to CVE-2019-9494 and CVE-2019-9495.
2019-04-10 17:56:43 +00:00
christos b2272152c1 These functions can be used to help implement constant time operations
for various cryptographic operations that must minimize externally
observable differences in processing (both in timing and also in
internal cache use, etc.).

This is related to CVE-2019-9494 and CVE-2019-9495.
2019-04-10 17:56:13 +00:00
christos e070c9e1bb This helps in reducing measurable timing differences in operations
involving private information. BoringSSL has removed BN_FLG_CONSTTIME
and expects specific constant time functions to be called instead, so a
bit different approach is needed depending on which library is used.

The main operation that needs protection against side channel attacks is
BN_mod_exp() that depends on private keys (the public key validation
step in crypto_dh_derive_secret() is an exception that can use the
faster version since it does not depend on private keys).

crypto_bignum_div() is currently used only in SAE FFC case with not
safe-prime groups and only with values that do not depend on private
keys, so it is not critical to protect it.

crypto_bignum_inverse() is currently used only in SAE FFC PWE
derivation. The additional protection here is targeting only OpenSSL.
BoringSSL may need conversion to using BN_mod_inverse_blinded().

This is related to CVE-2019-9494 and CVE-2019-9495.
2019-04-10 17:55:31 +00:00
christos e6520c418d Explicitly verify that own and peer commit scalar/element are available
when trying to check SAE confirm message. It could have been possible to
hit a NULL pointer dereference if the peer element could not have been
parsed. (CVE-2019-9496)
2019-04-10 17:52:46 +00:00
christos 924a752579 This adds an explicit check for 0 < x,y < prime based on RFC 5931,
2.8.5.2.2 requirement. The earlier checks might have covered this
implicitly, but it is safer to avoid any dependency on implicit checks
and specific crypto library behavior. (CVE-2019-9498 and CVE-2019-9499)

Furthermore, this moves the EAP-pwd element and scalar parsing and
validation steps into shared helper functions so that there is no need
to maintain two separate copies of this common functionality between the
server and peer implementations.
2019-04-10 17:50:27 +00:00
christos c2cadbd97b When processing an EAP-pwd Commit frame, the server's scalar and element
(elliptic curve point) were not validated. This allowed an adversary to
bypass authentication, and act as a rogue Access Point (AP) if the
crypto implementation did not verify the validity of the EC point.

Fix this vulnerability by assuring the received scalar lies within the
valid range, and by checking that the received element is not the point
at infinity and lies on the elliptic curve being used. (CVE-2019-9499)

The vulnerability is only exploitable if OpenSSL version 1.0.2 or lower
is used, or if LibreSSL or wolfssl is used. Newer versions of OpenSSL
(and also BoringSSL) implicitly validate the elliptic curve point in
EC_POINT_set_affine_coordinates_GFp(), preventing the attack.
2019-04-10 17:49:59 +00:00
christos 9ea1d486ef When processing an EAP-pwd Commit frame, verify that the peer's scalar
and elliptic curve element differ from the one sent by the server. This
prevents reflection attacks where the adversary reflects the scalar and
element sent by the server. (CVE-2019-9497)

The vulnerability allows an adversary to complete the EAP-pwd handshake
as any user. However, the adversary does not learn the negotiated
session key, meaning the subsequent 4-way handshake would fail. As a
result, this cannot be abused to bypass authentication unless EAP-pwd is
used in non-WLAN cases without any following key exchange that would
require the attacker to learn the MSK.
2019-04-10 17:49:26 +00:00