751 Commits

Author SHA1 Message Date
Jason A. Donenfeld
a94099639e wireguard: upgrade to 0.0.20190123
* tools: curve25519: handle unaligned loads/stores safely

This should fix sporadic crashes with `wg pubkey` on certain architectures.

* netlink: auth socket changes against namespace of socket

In WireGuard, the underlying UDP socket lives in the namespace where the
interface was created and doesn't move if the interface is moved. This
allows one to create the interface in some privileged place that has
Internet access, and then move it into a container namespace that only
has the WireGuard interface for egress. Consider the following
situation:

1. Interface created in namespace A. Socket therefore lives in namespace A.
2. Interface moved to namespace B. Socket remains in namespace A.
3. Namespace B now has access to the interface and changes the listen
port and/or fwmark of socket. Change is reflected in namespace A.

This behavior is arguably _fine_ and perhaps even expected or
acceptable. But there's also an argument to be made that B should have
A's cred to do so. So, this patch adds a simple ns_capable check.

* ratelimiter: build tests with !IPV6

Should reenable building in debug mode for systems without IPv6.

* noise: replace getnstimeofday64 with ktime_get_real_ts64
* ratelimiter: totalram_pages is now a function
* qemu: enable FP on MIPS

Linux 5.0 support.

* keygen-html: bring back pure javascript implementation

Benoît Viguier has proofs that values will stay well within 2^53. We
also have an improved carry function that's much simpler. Probably more
constant time than emscripten's 64-bit integers.

* contrib: introduce simple highlighter library

This is the highlighter library being used in:
- https://twitter.com/EdgeSecurity/status/1085294681003454465
- https://twitter.com/EdgeSecurity/status/1081953278248796165

It's included here as a contrib example, so that others can paste it into
their own GUI clients for having the same strictly validating highlighting.

* netlink: use __kernel_timespec for handshake time

This readies us for Y2038. See https://lwn.net/Articles/776435/ for more info.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-23 14:50:55 +01:00
Ilya Dmitrichenko
872a92849b Use latest stable release of ZFS
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2019-01-19 10:04:34 +00:00
Rolf Neugebauer
ffd8d19cfd kernel: Update to 4.20.3/4.19.16/4.14.94/4.9.151
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-17 19:51:32 +00:00
Rolf Neugebauer
3b4f70dd76 kernel: Update to 4.20.2/4.19.15/4.14.93/4.9.150
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-16 22:28:57 +00:00
Tiejun Chen
ef9302bc01 update -rt to 4.14.87-rt50
Signed-off-by: Tiejun Chen <tiejunc@vmware.com>
2019-01-14 20:49:28 -08:00
Rolf Neugebauer
be99dbcda2 kernel: Adjust the 4.20/4.19 configs for x86 and arm64
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-12 13:28:22 +00:00
Rolf Neugebauer
d9504a7904 kernel: Update to 4.20.1/4.19.14/4.14.92/4.9.149
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-12 11:55:36 +00:00
Tiejun Chen
e7481213e4 update -rt to 4.14.87-rt49
Signed-off-by: Tiejun Chen <tiejunc@vmware.com>
2019-01-06 13:29:54 -08:00
Rolf Neugebauer
77422d26c0 kernel/arm64: Enable ENA driver
The new AWS A1 instances use the ENA network driver.
Enable it.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-02 22:17:36 +00:00
Rolf Neugebauer
ae1f2dd6af kernel/x86_64,arm64: Enable STACKLEAK GCC plugin
Enable the STACKLEAK GCC plugin which erases the
kernel stack before returning from system calls.
This security options has a reported performance
hit of around 1% which seem like a reasonable amount.

For more details see: https://outflux.net/blog/archives/2018/12/24/security-things-in-linux-v4-20/

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-02 22:17:36 +00:00
Rolf Neugebauer
ce3dc79509 kernel: Add support for 4.20.x kernels
The kernel config was derived from the 4.19.13 kernel config
run through the 'make oldconfig' with all defaults accepted,
except for:
- NET_VENDOR_MICROCHIP (defauly 'y', set to 'n')

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-02 22:17:36 +00:00
Rolf Neugebauer
6c59e083f4 kernel: Simplify perf and bcc build logic
Since we removed the 4.4.x kernel, simply don't build
perf and bcc for 4.9.x kernels.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-02 22:17:36 +00:00
Rolf Neugebauer
2ab3b0a24e Remove 4.4 kernel
We already have 4.9.x, 4.14.x, and 4,19.x as LTS releases.
4.9.x has a longer lifetime as 4.4.x as well and fewer security
fixes can be backported to 4.4.x. Remove it.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-01 17:06:06 +00:00
Rolf Neugebauer
8ba5e2416d kernel: Update to 4.19.13/4.14.92/4.9.148
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-30 21:06:50 +00:00
Rolf Neugebauer
4863059b7e kernels: Enable Netronome drivers for x86/arm64
packet.net will soon have x86 and arm64 machines with NFPs.
Enable the driver for it.

The 4.9 kernel only has support for the NFP VF driver,
so don't enable it there.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-22 11:11:27 +00:00
Rolf Neugebauer
6bda9db3fc kernel: Adjust kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-22 11:04:51 +00:00
Rolf Neugebauer
cdcfcb7347 kernel: Update to 4.19.12/4.14.90/4.9.147/4.4.169
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-22 10:19:45 +00:00
Rolf Neugebauer
4ae342c097 kernel: Update to 4.19.11/4.14.89/4.9.146/4.4.168
Note this skips 4.19.10. The diff is pretty small.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-19 22:28:00 +00:00
Jason A. Donenfeld
4621b91939 wireguard: upgrade to 0.0.20181218
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-18 18:06:35 +01:00
Rolf Neugebauer
65e2c50b88 kernel: Update to 4.19.9/4.14.88/4.9.145/4.4.167
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-13 23:24:01 +00:00
Rolf Neugebauer
a26ff89ce8 kernel: Update to 4.19.8/4.14.87/4.9.144
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-09 13:46:31 +00:00
Rolf Neugebauer
055c0f8403 kernel: Tweak the x86 kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-06 21:55:49 +00:00
Rolf Neugebauer
765cf6c917 kernel: Update to 4.19.7/4.14.86/4.9.143
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-06 20:38:45 +00:00
Rolf Neugebauer
2b6a0e15bb kernel: Update to 4.19.6/4.14.85/4.9.142/4.4.166
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-03 23:51:48 +00:00
Rolf Neugebauer
1d405ae5cf kernel: Update to 4.19.5/4.14.84/4.9.141/4.4.165
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-03 22:03:55 +00:00
Rolf Neugebauer
63cfbb28d2 kernel: Disable ACPI_WMI for x86
WMI is mostly used for laptops and not relevant for
VMs and servers. Disable it.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-23 23:59:15 +00:00
Rolf Neugebauer
70f320db20 kernels: Update to 4.19.4/4,14.83/4.9.140
This skips 4.9.139 which is just two revert commits from
4.9.140.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-23 23:44:34 +00:00
Rolf Neugebauer
28ce2bbdca kernel: Remove support for 4.18.x
4.18.20 was the last 4.18.x release. Remove it.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-23 23:40:44 +00:00
Rolf Neugebauer
1257fd9ce9 kernel: Adjust 4.4 config for x86
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-22 22:42:00 +00:00
Rolf Neugebauer
ab3f4950aa kernel: Adjust arm64 4.14 config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-22 22:06:44 +00:00
Rolf Neugebauer
92d6966307 kernel: Updat to 4.19.3/4.18.20/4.14.82/4.9.138/4.4.164
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-22 20:44:45 +00:00
Jason A. Donenfeld
dfc05c676f wireguard: upgrade to 0.0.20181119
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-19 18:30:34 +01:00
Tiejun Chen
116f9be99b update -rt to 4.14.78-rt47
Signed-off-by: Tiejun Chen <tiejunc@vmware.com>
2018-11-18 15:56:01 -08:00
Rolf Neugebauer
535cbfaf32 kernel: Adjust 4.18.x kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-15 22:54:05 +00:00
Rolf Neugebauer
8b816a87a5 kernel: Adjust 4.19.x kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-15 22:14:28 +00:00
Rolf Neugebauer
9482281f5b kernel: Update to 4.19.2/4.18.19/4.14.81/4.9.137
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-15 22:11:30 +00:00
Jason A. Donenfeld
7494396812 wireguard: upgrade to 0.0.20181115
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-15 12:13:38 -08:00
Rolf Neugebauer
cc544d1cf2 kernel: Update to 4.18.18/4.14.80/4.9.136/4.4.163
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-12 21:49:34 +00:00
Rolf Neugebauer
3c5062ff9b kernel: Update to 4.19.1/4.18.17/4.14.79
Also fix the boolean expression for 'perf' in the Dockerfile.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-10 10:26:22 +00:00
Rolf Neugebauer
077e31c10a kernel: Remove unused config files
A previosu commit removed suppoer for 4.18.x kernels for
arm64 and s390x but did not remove the config files. Fix it.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-11-09 22:51:22 +00:00
Rolf Neugebauer
e90c9a0687 kernel: perf only for LTS and latest stable/disable for arm64
The logic for perf became too complex. Just build for latest LTS
and latest stable.

Disable for arm64 for now as it is broken for 4.19 due to a header
mismatch:

In file included from /linux/tools/arch/arm64/include/uapi/asm/unistd.h:20:0,
                 from libbpf.c:36:
/linux/tools/include/uapi/asm-generic/unistd.h:754:0: error: "__NR_fcntl" redefined [-Werror]

In file included from /usr/include/sys/syscall.h:4:0,
                 from /linux/tools/perf/perf-sys.h:7,
                 from libbpf.c:35:
/usr/include/bits/syscall.h:26:0: note: this is the location of the previous definition

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-28 21:46:14 +00:00
Rolf Neugebauer
1467a70b44 kernel: Compile bcc for 4.19 instead of 4.18 (x86_64 only)
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-27 12:37:51 +01:00
Rolf Neugebauer
936d47fd2f kernel: Remove 4.18.x for arm64 and s390x
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-27 12:37:16 +01:00
Rolf Neugebauer
2d483ca898 kernel: Add support for the 4.19 kernel
The kernel configs were constructed by running the 4.18.x config
through the 4.19 oldconfig process.

The 4.19.x has a new option, RANDOM_TRUST_CPU, which indicates
if the CPUs random instruction is to be trusted. It defaults to
"no" and this default was accepted.

Most of the defaults were accepted, except for:
BLK_CGROUP_IOLATENCY=y
NFT_TUNNEL=y
NFT_OSF=y
NFT_TPROXY=y
NETFILTER_XT_MATCH_SOCKET=y
NET_VENDOR_CADENCE=n
NET_VENDOR_NETERION=n
NET_VENDOR_PACKET_ENGINES=n

We also disallow CIFS for insecure legacy servers:
CIFS_ALLOW_INSECURE_LEGACY=n

For arm64, the following changes were made to the default:
SENSORS_RASPBERRYPI_HWMON=y
CRYPTO_DEV_QCOM_RNG=m
CRYPTO_DEV_HISI_SEC=m

For s390x, the additional changes were made to the default:
KERNEL_BZIP2 (default is gzip)
GCC_PLUGINS=y
GCC_PLUGIN_STRUCTLEAK=y
GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
GCC_PLUGIN_RANDSTRUCT=y
GCC_PLUGIN_RANDSTRUCT_PERFORMANCE=y

Running the 4.18 and 4.19 kernel config through
./scripts/kconfig-split.py yields the following 4.19.x
only config options for x86_64:

The x86_64 kernel difference to 4.18 for

CONFIG_ARCH_SUPPORTS_ACPI=y
CONFIG_BLK_CGROUP_IOLATENCY=y
CONFIG_BNXT_HWMON=y
CONFIG_BUILD_SALT=""
CONFIG_CONSOLE_LOGLEVEL_QUIET=4
CONFIG_CRASH_CORE=y
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
CONFIG_HAVE_RELIABLE_STACKTRACE=y
CONFIG_MEMCG_KMEM=y
CONFIG_MLX5_EN_ARFS=y
CONFIG_MLX5_EN_RXNFC=y
CONFIG_NETFILTER_NETLINK_OSF=y
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
CONFIG_NFT_OSF=y
CONFIG_NFT_TPROXY=y
CONFIG_NFT_TUNNEL=y
CONFIG_NF_SOCKET_IPV4=y
CONFIG_NF_SOCKET_IPV6=y
CONFIG_XEN_SCRUB_PAGES_DEFAULT=y

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-27 12:23:52 +01:00
Rolf Neugebauer
35a72cc63c kernel: Update to 4.18.16/4.14.78/4.9.135/4.4.162
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-21 13:04:44 +01:00
Rolf Neugebauer
6b7b64fb08 kernel: Update to 4.18.15/4.14.77/4.9.134/4.4.161
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-20 14:16:28 +01:00
Rolf Neugebauer
40d223b654 kernel: Update to 4.18.14/4.14.76/4.9.133/4.4.160
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-20 11:40:30 +01:00
Rolf Neugebauer
4ed9e4f0d3 kernel: Adjust 4.18.x kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-20 01:27:15 +01:00
Rolf Neugebauer
564a2e85d0 kernel: Update to 4.18.13/4.14.75/4.9.132
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-20 01:08:53 +01:00
Rolf Neugebauer
5b2bdd3ef7 kernel: Print unified diff if kernel config does not match
After 'make oldconfig' we check that that the kernel config
is as we expect and error if they don't. We used to print
the default 'diff' output on a mismatch but a unified diff
is easier to read.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-10-20 01:05:05 +01:00