Commit graph

381 commits

Author SHA1 Message Date
gordon
116e406d37 Fix TLB shootdown for Xen based guests. [EN-18:07.pmap]
Approved by:	so
Security:	FreeBSD-EN-18:07.pmap
2018-06-21 08:37:13 +02:00
gordon
a766ecf05f Fix Lazy FPU information disclosure. [SA-18:07.lazyfpu]
Bump newvers.sh and UPDATING for today's patches.

Approved by:	so
Security:	CVE-2018-3665
Security:	FreeBSD-SA-18:07.lazyfpu
Sponsored by:	The FreeBSD Foundation
2018-06-21 08:37:11 +02:00
gordon
8a77f4f059 Fix multiple small kernel memory disclosures. [EN-18:05.mem]
Approved by:	so
Security:	CVE-2018-6920
Security:	CVE-2018-6921
Security:	FreeBSD-EN-18:05.mem
2018-05-08 21:24:24 +02:00
gordon
6cc832a30e Fix mishandling of x86 debug exceptions. [SA-18:06.debugreg]
Bump newvers.sh and UPDATING for today's patches.

Approved by:	so
Security:	CVE-2018-8897
Security:	FreeBSD-SA-18:06.debugreg
Sponsored by:	The FreeBSD Foundation
2018-05-08 21:24:23 +02:00
gordon
e86703e307 Fix multiple small kernel memory disclosures. [EN-18:04.mem]
Reported by:	Ilja van Sprundel
Approved by:	so
Security:	CVE-2018-6919
Security:	FreeBSD-EN-18:04.mem

(cherry picked from commit 104e4674c6)
2018-04-04 08:53:34 +02:00
gordon
e535c28816 Fix ipsec crash or denial of service. [SA-18:05.ipsec]
Reported by:	Maxime Villard
Approved by:	so
Security:	CVE-2018-6918
Security:	FreeBSD-SA-18:05.ipsec

(cherry picked from commit 8edef52201)
2018-04-04 08:53:30 +02:00
gordon
3412de73f3 Fix vt console memory disclosure. [SA-18:04.vt]
Bump newvers.sh and UPDATING for today's patches.

Submitted by:	emaste
Reported by:	Dr Silvio Cesare of InfoSect
Approved by:	so
Security:	CVE-2018-6917
Security:	FreeBSD-SA-18:04.vt
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit ec50e7cb61)
2018-04-04 08:53:28 +02:00
Franco Fichtner
7f3d1cf1a3 ipfw: correctly restore shared forwarding info
PR: https://github.com/opnsense/core/issues/1900

(cherry picked from commit d1cb3383d6)
(cherry picked from commit d59de14736)
(cherry picked from commit 529bbe68b3)
2018-03-31 11:08:42 +02:00
Shawn Webb
76d691b366 HBSD: Enable IBRS by default when PAX option enabled
Signed-off-by:	Shawn Webb <shawn.webb@hardenedbsd.org>
Sponsored-by:	SoldierX
MFC-to:		11-STABLE
(cherry picked from commit eb13d9283e6f38243fb5004745e6728f516fa4ec)
(cherry picked from commit f97867c8c9)
2018-03-14 12:34:36 +01:00
Oliver Pinter
0751bf4cdb HBSD: enable the AMD64 Page Tabe Isolation by default when option PAX is defined in kernel configuration
Default the enable the recent PTI mitigation against Intel's Meltdown
bug. So in general, HardenedBSD always comes with enabled mitigation,
since in our kernel always enabled the PAX.

For more detail see: c35d24e497ef2fa5d08a59ddb20123e9d9f58cc4

Discussed-with: Shawn Webb
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>

(cherry picked from commit 25b11e7bcfb13d7e8f24148af7374769e25166da)

HBSD: enable PTI by default, when option PAX specified

This is a follow up commit to 1cf1c6c06d2f9cc2a208d17d610064cbc621e01a
and 25b11e7bcfb13d7e8f24148af7374769e25166da .

Suggested-by: noptrix
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>

(cherry picked from commit 502559de8775002d1e6ba07f725a1fb40d77893d)
(cherry picked from commit 62f297a550)
2018-03-14 12:34:34 +01:00
gordon
e0b413d1b3 Add mitigations for two classes of speculative execution vulnerabilities
on amd64. [FreeBSD-SA-18:03.speculative_execution]

Approved by:	so
Security:	FreeBSD-SA-18:03.speculative_execution
Security:	CVE-2017-5715
Security:	CVE-2017-5754
2018-03-14 06:59:23 +01:00
gordon
84c3c5261f Fix ipsec validation and use-after-free. [SA-18:01.ipsec]
Approved by:	so
Security:	FreeBSD-SA-18:01.ipsec
Security:	CVE-2018-6916
2018-03-07 08:53:38 +01:00
ae
a01634b003 Reinitialize IP header length after checksum calculation. It is used
later by TCP-MD5 code.

This fixes the problem with broken TCP-MD5 over IPv4 when NIC has
disabled TCP checksum offloading.

PR:		223835
MFC after:	1 week
2018-03-07 08:53:24 +01:00
Franco Fichtner
6621d681e5 vlan: do not protect PCP write with the sysctl
pf will unconditionally "set prio", so this will fail if the
sysctl is off.  The sysctl, however, introduces a side-effect
so we would rather keep the default behaviour.  The allocation
slowdown is already taking place, so this in the worst case
only adds a list traversal / lookup.

PR: https://forum.opnsense.org/index.php?topic=6714.0
(cherry picked from commit dabc3cf4ef)
2018-01-15 15:22:56 +01:00
Shawn Webb
fc5ba17e78
HBSD+OPNsense: Set hardening.pax.disallow_map32bit.status=1 by default
LuaJIT creates 32-bit memory maps in a 64-bit execution environment,
which is disabled by default in HardenedBSD. We never ported the
MAP_32BIT disallow logic over from HardenedBSD to OPNsense prior to
18.1. The merge of HardenedBSD's ASLR implementation for 18.1 also
brought in the new logic.

Instead of removing disallow_map32bit, simply set it to 1 by default.
This will allow those who don't use LuaJIT applications to set it to 2
in /boot/loader.conf.local.

Note that this commit is specific to OPNsense. OPNsense ships without
the PAX_SYSCTLS kernel option, thus it's impossible to toggle via
sysctl.conf(5) and must be set via loader.conf.local.

Signed-off-by:	Shawn Webb <shawn@opnsense.org>
github-issue:	opnsense/plugins#466
(cherry picked from commit 5a1bbae356)
2018-01-12 02:37:06 -05:00
gordon
5c70e2a2a8 Fix multiple OpenSSL vulnerabilities.
Approved by:	so
Security:	CVE-2017-3737
Security:	CVE-2017-3738
Security:	FreeBSD-SA-17:12.openssl
2017-12-09 08:07:33 +01:00
delphij
c99c72c88b Fix multiple vulnerabilities of OpenSSL.
Security:	FreeBSD-SA-17:11
Approved by:	so
2017-11-29 08:35:04 +01:00
gordon
af3a9f78da Properly bzero kldstat structure to prevent information leak. [SA-17:10]
Approved by:	so
Security:	FreeBSD-SA-17:10.kldstat
Security:	CVE-2017-1088
2017-11-19 07:19:34 +01:00
gordon
5a57ffec3f Fix kernel data leak via ptrace(PT_LWPINFO). [SA-17:08]
Approved by:	so
Security:	FreeBSD-SA-17:08.ptrace
Security:	CVE-2017-1086
2017-11-19 07:19:12 +01:00
gordon
0111378690 Update timezone database information. [EN-17:09]
Approved by:	so
2017-11-19 07:19:12 +01:00
gordon
c967ed3742 Fix WPA2 protocol vulnerability. [SA-17:07]
Approved by:	so
2017-10-17 21:50:40 +02:00
Franco Fichtner
2e39d7d273 re: update to vendor version 1.94 2017-10-13 07:39:43 +02:00
Franco Fichtner
cc41ac08f1 pf: remove compile knob for default sysctl value 2017-10-08 11:23:09 +02:00
Franco Fichtner
716683127c pf: unclog reply-to to avoid network stack default route 2017-10-07 11:26:17 +02:00
Shawn Webb
1e959783f5
HBSD: Bring the Stack Clash mitigation up-to-date.
This brings us in line with both upstream HardenedBSD and FreeBSD.
2017-09-29 18:51:13 -04:00
Shawn Webb
9210b7788b
HBSD: Reimport HardenedBSD innovations
Please note that this is a work-in-progress and may not be complete,
yet. Initial testing shows success. More thorough testing needed.
2017-09-29 18:08:41 -04:00
kp
8d786ad073 pf: port extended DSCP support from OpenBSD
Ignore the ECN bits on 'tos' and 'set-tos' and allow to use
DCSP names instead of having to embed their TOS equivalents
as plain numbers.

Obtained from:	OpenBSD
Sponsored by:	OPNsense
Differential Revision:	https://reviews.freebsd.org/D8165
2017-09-15 19:17:10 +02:00
Shawn Webb
2588e256bd HBSD: Introducing SafeStack
Compile world with SafeStack from clang/llvm. Right now, only
applications are compiled with SafeStack, not libraries. clang 3.9.0
does not support compiling shared libraries with SafeStack, though a
patch has been proposed that would enable support.

Note that with clang's current implementation of SafeStack, ASLR and W^X
are prerequisites. SafeStack currently requires ASLR and W^X in order to
be effective.
2017-09-15 19:17:08 +02:00
Shawn Webb
511f9c9af6 HBSD: Introduce PIE base
Enabled for amd64, i386, and aarch64.
2017-09-15 19:16:42 +02:00
Franco Fichtner
b349ba1521 pf/ipfw/netinet[6]: IP forwarding rework, fixes IPv4 in pf(4)
Based on feedback by countless users, this removes the if_output
calls in the pf code that escape pfil processing in IPv4 by going
the long way.

In our 11.1 iteration ip_tryforward() is easy to port and while
we are at it we shall also tackle IPv6.  :)

Many thanks to Andrey V. Elsukov (ae@) for giving this direction
and review.

Also see: https://reviews.freebsd.org/D8877

pf: add ipv6 shared forwarding
2017-09-14 21:32:31 +02:00
Franco Fichtner
05dbf872ab re: update to vendor driver version 1.93 2017-09-14 21:32:30 +02:00
Franco Fichtner
1511b8ac7b netgraph/pppoe: fix panic in session lookup
Submitted by: Alex Dupre <ale@FreeBSD.org>
PR:           https://forum.opnsense.org/index.php?topic=5697.0
See also:     https://reviews.freebsd.org/D9270
2017-08-25 08:59:15 +02:00
ae
d79ea8f7ee MFC r321779:
Add inpcb pointer to struct ipsec_ctx_data and pass it to the pfil hook
  from enc_hhook().

  This should solve the problem when pf is used with if_enc(4) interface,
  and outbound packet with existing PCB checked by pf, and this leads to
  deadlock due to pf does its own PCB lookup and tries to take rlock when
  wlock is already held.

  Now we pass PCB pointer if it is known to the pfil hook, this helps to
  avoid extra PCB lookup and thus rlock acquiring is not needed.
  For inbound packets it is safe to pass NULL, because we do not held any
  PCB locks yet.

  PR:		220217
  Sponsored by:	Yandex LLC

(cherry picked from commit 4683f93d198d5dc926b2d73beb0b4c09ff8646f4)
2017-08-21 13:29:51 +02:00
Franco Fichtner
4732a44b6a netgraph/pppoe: user-supplied Host-Uniq tag and PADM messages
Taken from: https://reviews.freebsd.org/D9270
PR: https://forum.opnsense.org/index.php?topic=5307.0
2017-08-20 15:23:55 +02:00
sbruno
0ea13b0728 Add Intel Atom Cherryview SOC HSUART support
PR:	207910
Submitted by:	johannes@brilliantservice.co.jp
MFC after:	1 week
2017-08-20 15:23:06 +02:00
Franco Fichtner
c1e3838d95 run: add AE3000 and AE6000; closes #17 2017-08-20 15:17:15 +02:00
loos
97287480ab The stf(4) interface name does not conform with the default naming
convention for interfaces, because only one stf(4) interface can exist
in the system.

This disallow the use of unit numbers different than 0, however, it is
possible to create the clone without specify the unit number (wildcard).

In the wildcard case we must update the interface name before return.

This fix an infinite recursion in pf code that keeps track of network
interfaces and groups:

1 - a group for the cloned type of the interface is added (stf in this
    case);
2 - the system will now try to add an interface named stf (instead of
    stf0) to stf group;
3 - when pfi_kif_attach() tries to search for an already existing 'stf'
    interface, the 'stf' group is returned and thus the group is added
    as an interface of itself;

This will now cause a crash at the first attempt to traverse the groups
which the stf interface belongs (which loops over itself).

Obtained from:	pfSense
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-08-20 15:15:56 +02:00
sbruno
3f77fffb02 Do not initialize the adapter on MTU change when adapter status is down.
This fixes long-standing problems when changing settings of the adapter.

Discussed in:
https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html

Submitted by:	arnaud.ysmal@stormshield.eu
Reviewed by:	erj@freebsd.org
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D7030
2017-08-20 14:12:14 +02:00
Franco Fichtner
c76d7505b7 dummynet: pfil skip for IPv4 and IPv6
Based on a patch originally found in m0n0wall, expanded
to IPv6 and aligned with FreeBSD's IP input path.
2017-08-20 14:05:09 +02:00
Franco Fichtner
00bed2565c netmap: ring size limit not enough for multi-queue em(4)
Also mutes a spammy message.  Bravely going where no man
has gone before.  :)
2017-08-20 14:05:07 +02:00
Franco Fichtner
1b30333825 tmpfs: allow recurse as that does happen when using unionfs 2017-08-20 14:05:06 +02:00
delphij
9e58f370d0 Fix OpenSSH Denial of Service vulnerability. [SA-17:06]
Fix VNET kernel panic with asynchronous I/O. [EN-17:07]

Fix pf(4) housekeeping thread causes kernel panic. [EN-17:08]

Approved by:	so
2017-08-20 13:47:37 +02:00
Franco Fichtner
3c09b4c3de src: clean-cut move to release/11.1.0
Taken from: FreeBSD
Commit ref: 2f4b735c66d
2017-08-20 13:44:58 +02:00
hselasky
1bf5565150 Add new USB ID.
While at it remove some whitespaces.

Submitted by:	Jose Luis Duran <jlduran@gmail.com>
PR:		213110
MFC after:	1 week

(cherry picked from commit 0c22163daba4a8ecc287e6b2f7060383c5e1dcb1)
2017-08-18 18:37:12 +02:00
delphij
abfd592537 Fix OpenSSH Denial of Service vulnerability. [SA-17:06]
Fix VNET kernel panic with asynchronous I/O. [EN-17:07]

Approved by:	so
2017-08-10 09:36:26 +02:00
Franco Fichtner
0de7c3a57f ipsec: pull the next header as well to restore filtering
While here, remove some code that is going away with 11.1 anyway.
2017-07-18 15:20:24 +02:00
loos
391965bde3 Do not update the lagg link layer address when destroying a lagg clone.
This would enqueue an event to send the gratuitous arp on a dying lagg
interface without any physical ports attached to it.

Apart from that, the taskqueue_drain() on lagg_clone_destroy() runs too
late, when the ifp data structure is already freed.  Fix that too.

Obtained from:	pfSense
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-07-12 17:44:05 +02:00
delphij
1f865c0f70 Fix heimdal KDC-REP service name validation vulnerability [SA-17:05]
Approved by:	so
2017-07-12 17:41:42 +02:00
Franco Fichtner
9e853ed1a4 netinet/pf: revert untested patches for 17.7, start fresh 2017-07-11 06:18:07 +02:00
Franco Fichtner
0d95422960 netgraph/pppoe: user-supplied Host-Uniq tag and PADM messages
Taken from: https://reviews.freebsd.org/D9270
PR: https://forum.opnsense.org/index.php?topic=5307.0
2017-07-10 07:06:20 +02:00