]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoImport tzdata 2019c. releng/12.0
gordon [Wed, 23 Oct 2019 03:25:32 +0000 (03:25 +0000)]
Import tzdata 2019c.

Approved by: so
Security: FreeBSD-EN-19:18.tzdata

4 years agoBump version information and add UPDATING entries.
gordon [Tue, 20 Aug 2019 17:52:28 +0000 (17:52 +0000)]
Bump version information and add UPDATING entries.

Approved by: so

4 years agoFix reference count overflow in mqueuefs.
gordon [Tue, 20 Aug 2019 17:51:32 +0000 (17:51 +0000)]
Fix reference count overflow in mqueuefs.

Approved by: so
Security: FreeBSD-SA-19:24.mqueuefs
Security: CVE-2019-5603

4 years agoFix kernel memory disclosure from /dev/midistat.
gordon [Tue, 20 Aug 2019 17:50:33 +0000 (17:50 +0000)]
Fix kernel memory disclosure from /dev/midistat.

Approved by: so
Security: FreeBSD-SA-19:23.midi
Security: CVE-2019-5612

4 years agoFix IPv6 remote denial of service.
gordon [Tue, 20 Aug 2019 17:49:33 +0000 (17:49 +0000)]
Fix IPv6 remote denial of service.

Approved by: so
Security: FreeBSD-SA-19:22.mbuf
Security: CVE-2019-5611

4 years agoAdd bhyve instruction emulation improvements (opcode 03H and F7H).
gordon [Tue, 20 Aug 2019 17:45:44 +0000 (17:45 +0000)]
Add bhyve instruction emulation improvements (opcode 03H and F7H).

Approved by: so
Security: FreeBSD-EN-19:16.bhyve

4 years agoBump version information and add UPDATING entries.
gordon [Tue, 6 Aug 2019 17:14:09 +0000 (17:14 +0000)]
Bump version information and add UPDATING entries.

Approved by: so

4 years agoFix insufficient validation of guest-supplied data (e1000 device).
gordon [Tue, 6 Aug 2019 17:13:17 +0000 (17:13 +0000)]
Fix insufficient validation of guest-supplied data (e1000 device).

Approved by: so
Security: FreeBSD-SA-19:21.bhyve
Security: CVE-2019-5609

4 years agoFix insufficient message length validation in bsnmp library.
gordon [Tue, 6 Aug 2019 17:12:17 +0000 (17:12 +0000)]
Fix insufficient message length validation in bsnmp library.

Approved by: so
Security: FreeBSD-SA-19:20.bsnmp
Security: CVE-2019-5610

4 years agoFix ICMPv6 / MLDv2 out-of-bounds memory access.
gordon [Tue, 6 Aug 2019 17:11:17 +0000 (17:11 +0000)]
Fix ICMPv6 / MLDv2 out-of-bounds memory access.

Approved by: so
Security: FreeBSD-SA-19:19.mldv2
Security: CVE-2019-5608

4 years agoFix multiple vulnerabilities in bzip2.
gordon [Tue, 6 Aug 2019 17:09:47 +0000 (17:09 +0000)]
Fix multiple vulnerabilities in bzip2.

Approved by: so
Security: FreeBSD-SA-19:18.bzip2
Security: CVE-2016-3189
Security: CVE-2019-12900

4 years agoFix incorrect exception handling.
gordon [Tue, 6 Aug 2019 17:08:30 +0000 (17:08 +0000)]
Fix incorrect exception handling.

Approved by: so
Security: FreeBSD-EN-19:15.libunwind

4 years agoFix incorrect locking in epoch(9).
gordon [Tue, 6 Aug 2019 17:07:43 +0000 (17:07 +0000)]
Fix incorrect locking in epoch(9).

Approved by: so
Security: FreeBSD-EN-19:14.epoch

4 years agoBump version information and update UPDATING.
gordon [Wed, 24 Jul 2019 12:58:21 +0000 (12:58 +0000)]
Bump version information and update UPDATING.

Approved by: so

4 years agoFix file descriptor reference count leak.
gordon [Wed, 24 Jul 2019 12:57:49 +0000 (12:57 +0000)]
Fix file descriptor reference count leak.

Approved by: so
Security: FreeBSD-SA-19:17.fd
Security: CVE-2019-5607

4 years agoFix byhve out-of-bounds read in XHCI device.
gordon [Wed, 24 Jul 2019 12:56:06 +0000 (12:56 +0000)]
Fix byhve out-of-bounds read in XHCI device.

Approved by: so
Security: FreeBSD-SA-19:16.bhyve
Security: CVE-2019-5604

4 years agoFix reference count overflow in mqueuefs.
gordon [Wed, 24 Jul 2019 12:55:16 +0000 (12:55 +0000)]
Fix reference count overflow in mqueuefs.

Approved by: so
Security: FreeBSD-SA-19:15.mqueuefs
Security: CVE-2019-5603

4 years agoFix pts write-after-free.
gordon [Wed, 24 Jul 2019 12:53:06 +0000 (12:53 +0000)]
Fix pts write-after-free.

Approved by: so
Security: FreeBSD-SA-19:13.pts
Security: CVE-2019-5606

4 years agoFix multiple telnet client vulnerabilities.
gordon [Wed, 24 Jul 2019 12:51:52 +0000 (12:51 +0000)]
Fix multiple telnet client vulnerabilities.

Approved by: so
Security: FreeBSD-SA-19:12.telnet
Security: CVE-2019-0053

4 years agoFix panic from Intel CPU vulnerability mitigation.
gordon [Wed, 24 Jul 2019 12:50:46 +0000 (12:50 +0000)]
Fix panic from Intel CPU vulnerability mitigation.

Approved by: so
Security: FreeBSD-EN-19:13.mds

4 years agoUpdate UPDATING and bump newvers.sh
gordon [Wed, 3 Jul 2019 00:04:50 +0000 (00:04 +0000)]
Update UPDATING and bump newvers.sh

Approved by: so
Approved by: re (implicit)

4 years agoFix privilege escalation in cd(4) driver.
gordon [Wed, 3 Jul 2019 00:03:55 +0000 (00:03 +0000)]
Fix privilege escalation in cd(4) driver.

Approved by: so
Approved by: re (implicit)
Security: FreeBSD-SA-19:11.cd_ioctl
Security: CVE-2019-5602

4 years agoFix kernel stack disclosure in UFS/FFS.
gordon [Wed, 3 Jul 2019 00:02:16 +0000 (00:02 +0000)]
Fix kernel stack disclosure in UFS/FFS.

Approved by: so
Security: FreeBSD-SA-19:10.ufs
Security: CVE-2019-5601

4 years agoFix iconv buffer overflow.
gordon [Wed, 3 Jul 2019 00:00:39 +0000 (00:00 +0000)]
Fix iconv buffer overflow.

Approved by: so
Approved by: re (implicit)
Security: FreeBSD-SA-19:09.iconv

4 years agoImport tzdata 2019b.
gordon [Tue, 2 Jul 2019 23:59:45 +0000 (23:59 +0000)]
Import tzdata 2019b.

Approved by: so
Approved by: re (implicit)
Security: FreeBSD-EN-19:12.tzdata

4 years agoAdd UPDATING entries for today's release. Bump patch version.
gordon [Wed, 19 Jun 2019 16:44:07 +0000 (16:44 +0000)]
Add UPDATING entries for today's release. Bump patch version.

Also fix the previous UPDATING entry. MDS was an SA, not an EN.

Approved by: so

4 years agoAdd ability to limit split map entries to prevent resource
gordon [Wed, 19 Jun 2019 16:43:05 +0000 (16:43 +0000)]
Add ability to limit split map entries to prevent resource
exhaustion in non-default RACK TCP stack.

Approved by: so
Security:  FreeBSD-SA-19:08.rack
Security:  CVE-2019-5599

4 years agoFix incorrect locking in networking stack.
gordon [Wed, 19 Jun 2019 16:41:18 +0000 (16:41 +0000)]
Fix incorrect locking in networking stack.

Approved by: so
Security: FreeBSD-EN-19:11.net

4 years agoBump patch revision for updated mds patches.
gordon [Wed, 15 May 2019 21:25:44 +0000 (21:25 +0000)]
Bump patch revision for updated mds patches.

Approved by: so

4 years agoFix mismerge.
kib [Wed, 15 May 2019 20:44:27 +0000 (20:44 +0000)]
Fix mismerge.

Pointy hat to: kib
Tested by: so (emaste, gtetlow)
Approved by: so (emaste, gtetlow)

4 years agoBump newvers.sh and add UPDATING block.
gordon [Tue, 14 May 2019 23:22:30 +0000 (23:22 +0000)]
Bump newvers.sh and add UPDATING block.

Approved by: so

4 years agoMitigations for Microarchitectural Data Sampling.
gordon [Tue, 14 May 2019 23:19:08 +0000 (23:19 +0000)]
Mitigations for Microarchitectural Data Sampling.

Approved by: so
Security: FreeBSD-SA-19:07.mds
Security: CVE-2018-12126
Security: CVE-2018-12127
Security: CVE-2018-12130
Security: CVE-2019-11091

4 years agoFix ICMP/ICMP6 packet filter bypass in pf.
gordon [Tue, 14 May 2019 23:12:22 +0000 (23:12 +0000)]
Fix ICMP/ICMP6 packet filter bypass in pf.

Approved by: so
Security: FreeBSD-SA-19:06.pf
Security: CVE-2019-5598

4 years agoFix IPv6 fragment reassembly panic in pf
gordon [Tue, 14 May 2019 23:10:21 +0000 (23:10 +0000)]
Fix IPv6 fragment reassembly panic in pf

Approved by: so
Security: FreeBSD-SA-19:05.pf
Security: CVE-2019-5597

4 years agoUpdate ntpd to 4.2.8p13 to fix authenticated denial of service.
gordon [Tue, 14 May 2019 23:02:56 +0000 (23:02 +0000)]
Update ntpd to 4.2.8p13 to fix authenticated denial of service.

Approved by: so
Security: FreeBSD-SA-19:04.ntp
Security: CVE-2019-8936

4 years agoUpdate hostapd/wpa_supplicant to 2.8 to fix multiple vulnerabilities.
gordon [Tue, 14 May 2019 22:57:29 +0000 (22:57 +0000)]
Update hostapd/wpa_supplicant to 2.8 to fix multiple vulnerabilities.

Approved by: so
Security: FreeBSD-SA-19:03.wpa
Security: CVE-2019-9494
Security: CVE-2019-9495
Security: CVE-2019-9496
Security: CVE-2019-9497
Security: CVE-2019-9498
Security: CVE-2019-9499
Security: CVE-2019-11555

4 years agoFix insufficient filename validation in scp client
gordon [Tue, 14 May 2019 22:54:17 +0000 (22:54 +0000)]
Fix insufficient filename validation in scp client

Approved by: so
Security: FreeBSD-EN-19:10.scp

4 years agoFix partially matching relative paths in xinstall.
gordon [Tue, 14 May 2019 22:51:49 +0000 (22:51 +0000)]
Fix partially matching relative paths in xinstall.

Approved by: so
Security: FreeBSD-EN-19:09.xinstall

4 years agoImport tzdata 2019a.
gordon [Tue, 14 May 2019 22:48:36 +0000 (22:48 +0000)]
Import tzdata 2019a.

Approved by: so
Security: FreeBSD-EN-19:08.tzdata

5 years agoUPDATING and newvers entries for 12.0-p3
emaste [Tue, 5 Feb 2019 18:20:34 +0000 (18:20 +0000)]
UPDATING and newvers entries for 12.0-p3

Approved by: so
Security: FreeBSD-SA-19:01.syscall
Security: FreeBSD-SA-19:02.fd
Security: FreeBSD-EN-19:06.dtrace
Security: FreeBSD-EN-19:07.lle

5 years agoMFS12 r343785: Avoid leaking fp references when truncating SCM_RIGHTS
emaste [Tue, 5 Feb 2019 18:11:15 +0000 (18:11 +0000)]
MFS12 r343785: Avoid leaking fp references when truncating SCM_RIGHTS

control messages.

Submitted by: markj
Approved by: so
Security: CVE-2019-5596

5 years agoMFS12 r343781: amd64: clear callee-preserved registers on syscall exit
emaste [Tue, 5 Feb 2019 18:05:05 +0000 (18:05 +0000)]
MFS12 r343781: amd64: clear callee-preserved registers on syscall exit

Submitted by: kib
Approved by: so
Security: CVE-2019-5595
Security: FreeBSD-SA-19:01.syscall

5 years agoMFS12 r343454: Fix an LLE lookup race
emaste [Tue, 5 Feb 2019 17:59:50 +0000 (17:59 +0000)]
MFS12 r343454: Fix an LLE lookup race

PR: 234296
Submitted by: markj
Approved by: so

5 years agoMFS12 r342267: dtrace: fix userspace access on boxes with SMAP
emaste [Tue, 5 Feb 2019 17:54:09 +0000 (17:54 +0000)]
MFS12 r342267: dtrace: fix userspace access on boxes with SMAP

Approved by: so
Sponsored by: The FreeBSD Foundation

5 years agoUPDATING and newvers entries for 12.0-p2
emaste [Wed, 9 Jan 2019 19:10:13 +0000 (19:10 +0000)]
UPDATING and newvers entries for 12.0-p2

Approved by: so
Security: FreeBSD-EN-19:01.cc_cubic
Security: FreeBSD-EN-19:02.tcp
Security: FreeBSD-EN-19:03.sqlite
Security: FreeBSD-EN-19:04.tzdata

5 years agoMFS12 r342667: Import tzdata 2018h, 2018i
emaste [Wed, 9 Jan 2019 18:53:35 +0000 (18:53 +0000)]
MFS12 r342667: Import tzdata 2018h, 2018i

Approved by: so
Security: FreeBSD-EN-19:04.tzdata

5 years agoMFS12 r342291: Update sqlite3-3.23.1 --> sqlite3-3.26.0 (3260000)
emaste [Wed, 9 Jan 2019 18:47:10 +0000 (18:47 +0000)]
MFS12 r342291: Update sqlite3-3.23.1 --> sqlite3-3.26.0 (3260000)

PR: 234113
Approved by: so
Security: FreeBSD-EN-19:03.sqlite

5 years agoMFS12 r342378: Fix a regression in the TCP handling of received segments.
emaste [Wed, 9 Jan 2019 18:42:40 +0000 (18:42 +0000)]
MFS12 r342378: Fix a regression in the TCP handling of received segments.

When receiving TCP segments the stack protects itself by limiting
the resources allocated for a TCP connections. This patch adds
an exception to these limitations for the TCP segement which is the next
expected in-sequence segment. Without this patch, TCP connections
may stall and finally fail in some cases of packet loss.

Approved by: so
Security: FreeBSD-EN-19:02.tcp

5 years agoMFS12 r342181: Revert CC Cubic: fix underflow for cubic_cwnd()
emaste [Wed, 9 Jan 2019 18:38:35 +0000 (18:38 +0000)]
MFS12 r342181: Revert CC Cubic: fix underflow for cubic_cwnd()

This change is causing TCP connections using cubic to hang. Need to dig
more to find exact cause and fix it.

Approved by: so
Security: FreeBSD-EN-19:01.cc_cubic

5 years ago12.0-RELEASE-p1 UPDATING
emaste [Wed, 19 Dec 2018 18:32:32 +0000 (18:32 +0000)]
12.0-RELEASE-p1 UPDATING

Approved by: so
Security: FreeBSD-SA-18:15.bootpd

5 years agoMFS12 r342228: bootpd: validate hardware type
emaste [Wed, 19 Dec 2018 18:21:07 +0000 (18:21 +0000)]
MFS12 r342228: bootpd: validate hardware type

Due to insufficient validation of network-provided data it may have been
possible for a malicious actor to craft a bootp packet which could cause
a stack buffer overflow.

admbugs: 850
Reported by: Reno Robert
Reviewed by: markj
Approved by: so
Security: FreeBSD-SA-18:15.bootpd
Sponsored by: The FreeBSD Foundation

5 years ago- Switch releng/12.0 from RC3 to RELEASE.
gjb [Fri, 7 Dec 2018 00:00:12 +0000 (00:00 +0000)]
- Switch releng/12.0 from RC3 to RELEASE.
- Add the anticipated 12.0-RELEASE date to UPDATING.
- Set a static __FreeBSD_version.
- This one goes to 12.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoMFS12 r341490, r341493:
gjb [Wed, 5 Dec 2018 19:16:12 +0000 (19:16 +0000)]
MFS12 r341490, r341493:

 r341490 (markj):
  MFC r341442, r341443:
  Plug memory disclosures via ptrace(2).

 r341493 (garga):
  MFC r341464:
  Restore /var/crash permissions to 0750, as declared in mtree file.
  After r337337 it changed to 0755.

As this would have otherwise been resolved as a post-release EN/SA
from so@, this does not warrant adding RC4 to the 12.0 schedule.

Approved by: re (implicit), so
Sponsored by: The FreeBSD Foundation

5 years agoFix insufficient bounds checking in bhyve(8) device model. [SA-18:14.bhyve]
gordon [Tue, 4 Dec 2018 18:38:03 +0000 (18:38 +0000)]
Fix insufficient bounds checking in bhyve(8) device model. [SA-18:14.bhyve]

Submitted by: jhb
Reported by: Reno Robert
Approved by: so
Approved by: re (implicit)
Security: FreeBSD-SA-18:14.bhyve
Security: CVE-2018-17160

5 years agoUpdate releng/12.0 from RC2 to RC3 as part of the 12.0-RELEASE
gjb [Fri, 30 Nov 2018 00:00:51 +0000 (00:00 +0000)]
Update releng/12.0 from RC2 to RC3 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoMFV: r341039, MFC: r341041, MF12: r341264
marius [Thu, 29 Nov 2018 22:00:20 +0000 (22:00 +0000)]
MFV: r341039, MFC: r341041, MF12: r341264

Import CK as of 21d3e319407d19dece16ee317c757ffc54a452bc, which makes its
sparcv9 atomics compatible with the FreeBSD kernel by using instructions
which access the appropriate address space.
Atomic operations within the kernel must access the nucleus address space
instead of the default primary one. Without this change but the increased
use of CK in the kernel, machines started to panic after some minutes of
uptime due to an unresolvable fault in ck_pr_cas_64_value().

Approved by: re (gjb)

5 years agoMFC: r341016, MF12: r341261
marius [Thu, 29 Nov 2018 21:59:09 +0000 (21:59 +0000)]
MFC: r341016, MF12: r341261

- Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in r339338.
- Likewise, add ixlv.4.gz to OLD_FILES,
- and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the transition.

Approved by: re (gjb)

5 years agoMFstable/12 r341259:
markj [Thu, 29 Nov 2018 20:59:18 +0000 (20:59 +0000)]
MFstable/12 r341259:
Add some additional length checks to the IPv4 fragmentation code.

Approved by: re (gjb)

5 years agoMFstable/12 r341250:
markj [Thu, 29 Nov 2018 18:02:35 +0000 (18:02 +0000)]
MFstable/12 r341250:
Fix age_old_log() after r337468.

PR: 233633
Approved by: re (gjb)

5 years agoMFstable/12 r341249:
markj [Thu, 29 Nov 2018 17:54:03 +0000 (17:54 +0000)]
MFstable/12 r341249:
Update the free page count when blacklisting pages.

Approved by: re (gjb)

5 years agoMFstable/12 r341238:
markj [Thu, 29 Nov 2018 15:58:14 +0000 (15:58 +0000)]
MFstable/12 r341238:
Plug routing sysctl leaks.

Approved by: re (gjb)

5 years agoMFS r341139:
oleg [Thu, 29 Nov 2018 15:26:07 +0000 (15:26 +0000)]
MFS r341139:
MFC r340724:

Unbreak kernel build with VLAN_ARRAY defined.

Approved by: re (gjb)

5 years agoMFS12 r341168:
yuripv [Thu, 29 Nov 2018 01:31:12 +0000 (01:31 +0000)]
MFS12 r341168:
MFC r340974:
bectl: sync usage with man page, removing stray multibyte characters
in the process.

PR:             233526
Submitted by:   tigersharke@gmail.com (original version)
Reviewed by:    kevans
Approved by: re (gjb)
Differential revision:  https://reviews.freebsd.org/D18335

5 years agoMFS12 r341167:
gjb [Thu, 29 Nov 2018 01:02:52 +0000 (01:02 +0000)]
MFS12 r341167:
 MFC r340983:
 Fix NTP query on GCE due to unresolved hostname.

PR: 232456
Submitted by: Lucas Kanashiro
Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation

5 years agoMFstable/12 r341082:
markj [Wed, 28 Nov 2018 18:06:16 +0000 (18:06 +0000)]
MFstable/12 r341082:
Ensure that knotes do not get registered when KQ_CLOSING is set.

PR: 228858
Approved by: re (gjb)

5 years agoMFstable/12 r341077:
markj [Wed, 28 Nov 2018 17:40:08 +0000 (17:40 +0000)]
MFstable/12 r341077:
Lock the knlist before releasing the in-flux state in knote_fork().

PR: 228858
Approved by: re (gjb)

5 years agoMFstable/12 r341075:
markj [Wed, 28 Nov 2018 17:31:34 +0000 (17:31 +0000)]
MFstable/12 r341075:
Plug some kernel memory disclosures via kevent(2).

Approved by: re (gjb)

5 years agoMFS r341147
vangyzen [Wed, 28 Nov 2018 16:58:35 +0000 (16:58 +0000)]
MFS r341147

MFC r340995

Prevent kernel stack disclosure in signal delivery

On arm64 and riscv platforms, sendsig() failed to zero the signal
frame before copying it out to userspace.  Zero it.

On arm, I believe all the contents of the frame were initialized,
so there was no disclosure.  However, explicitly zero the whole frame
because that fact could inadvertently change in the future,
it's more clear to the reader, and I could be wrong in the first place.

Approved by: re (gjb)
Security: similar to FreeBSD-EN-18:12.mem and CVE-2018-17155
Sponsored by: Dell EMC Isilon

5 years agoMFS r341146
vangyzen [Wed, 28 Nov 2018 16:20:04 +0000 (16:20 +0000)]
MFS r341146

MFC r340994

Prevent kernel stack disclosure in getcontext/swapcontext

Expand r338982 to cover freebsd32 interfaces on amd64, mips, and powerpc.

Approved by: re (gjb)
Security: FreeBSD-EN-18:12.mem
Security: CVE-2018-17155
Sponsored by: Dell EMC Isilon

5 years agoMFstable/12 r340970:
markj [Tue, 27 Nov 2018 17:58:25 +0000 (17:58 +0000)]
MFstable/12 r340970:
Ensure that directory entry padding bytes are zeroed.

Approved by: re (gjb)

5 years agoMFstable/12 r340921:
markj [Mon, 26 Nov 2018 16:36:38 +0000 (16:36 +0000)]
MFstable/12 r340921:
Plug some networking sysctl leaks.

Approved by: re (gjb)

5 years agoMFstable/12 r340903:
markj [Mon, 26 Nov 2018 15:46:46 +0000 (15:46 +0000)]
MFstable/12 r340903:
Avoid unsynchronized updates to kn_status.

Approved by: re (gjb)

5 years agoMFS12 r340849, r340850, r340851:
emaste [Fri, 23 Nov 2018 21:08:11 +0000 (21:08 +0000)]
MFS12 r340849, r340850, r340851:

MFC r340661 (rmacklem):

r304026 added code that started statistics gathering for an operation
before the operation number (the variable called "op") was sanity checked.
This patch moves the code down to below the range sanity check for "op".

MFC r340662 (rmacklem):

nfsm_advance() would panic() when the offs argument was negative.
The code assumed that this would indicate a corrupted mbuf chain, but
it could simply be caused by bogus RPC message data.
This patch replaces the panic() with a printf() plus error return.

MFC r340663 (rmacklem):

Improve sanity checking for the dircount hint argument to
NFSv3's ReaddirPlus and NFSv4's Readdir operations. The code
checked for a zero argument, but did not check for a very large value.
This patch clips dircount at the server's maximum data size.

Approved by: re (kib)

5 years ago- Update releng/12.0 from RC1 to RC2 as part of the 12.0-RELEASE
gjb [Fri, 23 Nov 2018 16:32:27 +0000 (16:32 +0000)]
- Update releng/12.0 from RC1 to RC2 as part of the 12.0-RELEASE
  cycle.
- Update the dvd1.iso pkg(8) configuration to use the release_0
  package set to populate the dvd.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoMFstable/12 r340788:
markj [Fri, 23 Nov 2018 01:07:12 +0000 (01:07 +0000)]
MFstable/12 r340788:
Clear pad bytes in the struct exported by kern.ntp_pll.gettime.

Approved by: re (gjb)

5 years agoMF12 r340697: Introduce src.conf knob to build userland with retpoline
emaste [Thu, 22 Nov 2018 18:59:05 +0000 (18:59 +0000)]
MF12 r340697: Introduce src.conf knob to build userland with retpoline

MFC r339511: Introduce src.conf knob to build userland with retpoline

WITH_RETPOLINE enables -mretpoline vulnerability mitigation in userland
for CVE-2017-5715.

MFC r340099: libcompat: disable retpoline when building build tools

These are built with the host toolchain which may not support retpoline.
While here, move the MK_ overrides to a separate line and sort them
alphabetically to support future changes.

MFC r340650: Avoid retpolineplt with static linking

Statically linked binaries linked with -zretpolineplt crash at startup
as lld produces a broken PLT.

MFC r340652: rescue: set NO_SHARED in Makefile

The rescue binary is built statically via the Makefile generated by
crunchgen, but that does not trigger other shared/static logic in
bsd.prog.mk - in particular

PR: 233336
Reported by: Peter Malcom (r339511), Charlie Li (r340652)
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

5 years agoMFC: r340656, MF12: r340759
marius [Thu, 22 Nov 2018 16:27:30 +0000 (16:27 +0000)]
MFC: r340656, MF12: r340759

Given that the idea of D15374 was to "make memmove a first class citizen",
provide a _MEMMOVE extension of _MEMCPY that deals with overlap based on
the previous bcopy(9) implementation and use the former for bcopy(9) and
memmove(9). This addresses my D15374 review comment, avoiding extra MOVs
in case of memmove(9) and trashing the stack pointer.

Approved by: re (kib)

5 years agoMFS r340757:
tijl [Thu, 22 Nov 2018 13:12:17 +0000 (13:12 +0000)]
MFS r340757:

Fix another user address dereference in linux_sendmsg syscall.

This was hidden behind the LINUX_CMSG_NXTHDR macro which dereferences its
second argument.  Stop using the macro as well as LINUX_CMSG_FIRSTHDR.  Use
the size field of the kernel copy of the control message header to obtain
the next control message.

PR: 217901
Approved by: re (marius)

5 years agoMFS r340755:
tijl [Thu, 22 Nov 2018 13:09:42 +0000 (13:09 +0000)]
MFS r340755:

Do proper copyin of control message data in the Linux sendmsg syscall.

Instead of calling m_append with a user address, allocate an mbuf cluster
and copy data into it using copyin.  For the SCM_CREDS case, instead of
zeroing a stack variable and appending that to the mbuf, zero part of the
mbuf cluster directly.  One mbuf cluster is also the size limit used by
the FreeBSD sendmsg syscall (uipc_syscalls.c:sockargs()).

PR: 217901
Reviewed by: kib
Approved by: re (marius)

5 years agoMFC r340507-r340508, r340592-r340594, r340635-r340636: bectl(8) fixes
kevans [Thu, 22 Nov 2018 04:39:06 +0000 (04:39 +0000)]
MFC r340507-r340508, r340592-r340594, r340635-r340636: bectl(8) fixes

r340507:
libbe(3): rewrite init to support chroot usage

libbe(3) currently uses zfs_be_root and locates which of its children is
currently mounted at "/". This is reasonable, but not correct in the case of
a chroot, for two reasons:

- chroot root may be of a different zpool than zfs_be_root
- chroot root will not show up as mounted at "/"

Fix both of these by rewriting libbe_init to work from the rootfs down.
zfs_path_to_zhandle on / will resolve to the dataset mounted at the new
root, rather than the real root. From there, we can derive the BE root/pool
and grab the bootfs off of the new pool. This does no harm in the average
case, and opens up bectl to operating on different pools for scenarios where
one may be, for instance, updating a pool that generally gets re-rooted into
from a separate UFS root or zfs bootpool.

While here, I've also:
- Eliminated the check for /boot and / to be on the same partition. This
  leaves one open to a setup where /boot (and consequently, kernel/modules)
  are not included in the boot environment. This may very well be an
  intentional setup done by someone that knows what they're doing, we should
  not kill BE usage because of it.

- Eliminated the validation bits of BEs and snapshots that enforced
  'mountpoint' to be "/" -- this broke when trying to operate on an imported
  pool with an altroot, but we need not be this picky.

Reported by: philip
Reviewed by: philip, allanjude (previous version)
Tested by: philip
Differential Revision: https://reviews.freebsd.org/D18012

r340508:
libbe(3): Rewrite be_unmount to stop mucking with getmntinfo(2)

Go through the ZFS layer instead; given a BE, we can derive the dataset,
zfs_open it, then zfs_unmount. ZFS takes care of the dirty details and
likely gets it more correct than we did for more interesting setups.

r340592:
bectl(3)/libbe(3): Allow BE root to be specified

Add an undocumented -r option preceding the bectl subcommand to specify a BE
root to operate out of. This will remain undocumented for now, as some
caveats apply:

- BEs cannot be activated in the pool that doesn't contain the rootfs
- bectl create cannot work out of the box without the -e option right now,
  since it defaults to the rootfs and cross-pool cloning doesn't work like
  that (IIRC)

Plumb the BE root through to libbe(3) so that some things -can- be done to
it, e.g.

bectl -r tank/ROOT create -e default upgrade
bectl -r tank/ROOT mount upgrade /mnt

this aides in some upgrade setups where rootfs is not necessarily ZFS, and
also makes it easier/possible to regression-test bectl when combined with a
file-backed zpool.

Differential Revision: https://reviews.freebsd.org/D18029

r340593:
libbe(3): Properly account for altroot when creating new BEs

Previously we would blindly copy the 'mountpoint' property, which includes
the altroot. The altroot needs to be snipped off prior to setting it on the
new BE, though, or you'll end up with a new BE and a mountpoint of /mnt with
altroot=/mnt

r340594:
bectl(8): Add some regression tests

These tests operate on a file-backed zpool that gets created in the kyua
temp dir. root and ZFS support are both required for these tests. Current
tests cover create, destroy, export/import, jail, list (kind of), mount,
rename, and jail.

List tests should later be extended to cover formatting and the different
list flags, but for now only covers basic "are create/destroy actually
reflected properly"

r340635:
libbe(3): Handle non-ZFS rootfs better

If rootfs isn't ZFS, current version will emit an error claiming so and fail
to initialize libbe. As a consumer, bectl -r (undocumented) can be specified
to operate on a BE independently of whether on a UFS or ZFS root.

Unbreak this for the UFS case by only erroring out the init if we can't
determine a ZFS dataset for rootfs and no BE root was specified. Consumers
of libbe should take care to ensure that rootfs is non-empty if they're
trying to use it, because this could certainly be the case.

Some check is needed before zfs_path_to_zhandle because it will
unconditionally emit to stderr if the path isn't a ZFS filesystem, which is
unhelpful for our purposes.

This should also unbreak the bectl(8) tests on a UFS root, as is the case in
Jenkins' -test runs.

r340636:
bectl(8) tests: attempt to load the ZFS module

Observed in a CI test image, bectl_create test will run and be marked as
skipped because the module is not loaded. The first zpool invocation will
automagically load the module, but bectl_create is still skipped. Subsequent
tests all pass as expected because the module is now loaded and everything
is OK.

Approved by: re (gjb)

5 years agoMFC: r340495, MF12: r340739
marius [Wed, 21 Nov 2018 19:49:21 +0000 (19:49 +0000)]
MFC: r340495, MF12: r340739

- Restore setting the clock for devices which support the default/legacy
  transfer mode only (lost with r321385). [1]
- Similarly, don't try to set the power class on MMC devices that comply
  to version 4.0 of the system specification but are operated in default/
  legacy transfer or 1-bit bus mode as no power class is specified for
  these cases. Trying to set a power class nevertheless resulted in an -
  albeit harmless - error message.

PR: 231713 [1]
Approved by: re (gjb)

5 years agoMFstable/12 r340728:
markj [Wed, 21 Nov 2018 17:47:40 +0000 (17:47 +0000)]
MFstable/12 r340728:
Change dumpon(8)'s handling of -g.

Approved by: re (gjb)

5 years agoMFS r340729:
shurd [Wed, 21 Nov 2018 17:33:19 +0000 (17:33 +0000)]
MFS r340729:

Prevent POLA violation with TSO/CSUM offload

Ensure that any time CSUM_IP_TSO or CSUM_IP6_TSO is set that the corresponding
CSUM_IP6?_TCP / CSUM_IP flags are also set.

Approved by: re (gjb)
Sponsored by: Limelight Networks

5 years agoMFstable/12 r340727:
markj [Wed, 21 Nov 2018 17:22:31 +0000 (17:22 +0000)]
MFstable/12 r340727:
dumpon.8: Significantly revamp page

Approved by: re (gjb)

5 years agoMFC r340108 and r340149
mjg [Wed, 21 Nov 2018 03:22:37 +0000 (03:22 +0000)]
MFC r340108 and r340149
hwpmc: limit wait for user callchain collection to 1 tick
Add aditional counter descriptions to AMD 0x17

Approved by: re (rgrimes)

5 years agoMFC: r340714
jkim [Wed, 21 Nov 2018 00:16:43 +0000 (00:16 +0000)]
MFC: r340714

Revert r340708.  Some files became symlinks and vice versa.

Approved by: re (gjb)

5 years agoMFC: r340705, r340708
jkim [Tue, 20 Nov 2018 23:07:45 +0000 (23:07 +0000)]
MFC: r340705, r340708

Merge OpenSSL 1.1.1a.

Approved by: re (gjb)

5 years agoMFC r340439,r340440
garga [Tue, 20 Nov 2018 20:31:23 +0000 (20:31 +0000)]
MFC r340439,r340440

Fix /etc/ntp permissions. According to mtree it must be 0700

Approved by: re (gjb)
Sponsored by: Rubicon Communications, LLC (Netgate)

5 years agoMFC r339531,r339579,r340252,r340463,r340464,340472,r340587
mjg [Tue, 20 Nov 2018 18:14:30 +0000 (18:14 +0000)]
MFC r339531,r339579,r340252,r340463,r340464,340472,r340587

amd64: tidy up memset to have rax set earlier for small sizes
amd64: finish the tail in memset with an overlapping store
amd64: align memset buffers to 16 bytes before using rep stos
amd64: convert libc bzero to a C func to avoid future bloat
amd64: sync up libc memset with the kernel version
amd64: handle small memset buffers with overlapping stores
Fix -DNO_CLEAN amd64 build after r340463

Approved by: re (gjb)

5 years agoMFstable/12 r340680:
markj [Tue, 20 Nov 2018 17:43:24 +0000 (17:43 +0000)]
MFstable/12 r340680:
Handle kernel superpage mappings in pmap_remove_l2().

PR: 233088
Approved by: re (gjb)

5 years agoMFS r340643:
brooks [Tue, 20 Nov 2018 00:43:14 +0000 (00:43 +0000)]
MFS r340643:

MFC r340489-r340490

r340489:
Fix freebsd32 support for PCIOCGETCONF.

This fixes regresssions in pciconf -l and some ports as reported on
freebsd-current:

https://lists.freebsd.org/pipermail/freebsd-current/2018-November/072144.html

Reported by: jbeich
Reviewed by: kib (also proposed an idential patch)
Tested by: jbeich
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D18011

r340490:
Fix stray tab.

Reported by: jbeich
MFC with: r340489
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D18011

Approved by: re (gjb)

5 years agoMFS r340629
shurd [Mon, 19 Nov 2018 16:40:19 +0000 (16:40 +0000)]
MFS r340629

r340434:
Fix leaks caused by ifc_nhwtxqs never being initialized (broken by r333502)
and clear the last ring in the case where isc_nfl != isc_nrxqs

r340445:
Clear RX completion queue state variables in iflib_stop()

Approved by: re (gjb)
Sponsored by: Limelight Networks

5 years agoMFS12 r340630:
gjb [Mon, 19 Nov 2018 15:49:39 +0000 (15:49 +0000)]
MFS12 r340630:
 Remove debugging options from amd64 MINIMAL [1] and riscv GENERIC
 kernel configuration files.  This should have been turned off when
 stable/12 branched.

Submitted by:   Harry Schmalzbauer [1]
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

5 years agoMFS r340603:
kib [Mon, 19 Nov 2018 14:19:27 +0000 (14:19 +0000)]
MFS r340603:
Allow set ether/vlan PCP operation from the VNET jails.

Approved by: re (gjb)

5 years agoMFS r340605:
kib [Mon, 19 Nov 2018 13:59:11 +0000 (13:59 +0000)]
MFS r340605:
Align IA32_ARCH_CAP MSR definitions and use with SDM rev. 068.

Approved by: re (gjb)

5 years agoMFstable/12 r340498:
markj [Sat, 17 Nov 2018 20:47:41 +0000 (20:47 +0000)]
MFstable/12 r340498:
Hook mac_ntpd.4 up to the build.

PR: 232757
Approved by: re (gjb)

5 years agoMFS12 r340503:
gjb [Sat, 17 Nov 2018 20:11:20 +0000 (20:11 +0000)]
MFS12 r340503:
 Remove debugging options from arm, armv6, armv7 files included by
 GENERIC.  This should have been turned off when stable/12 branched.

Submitted by:   thompsa
Approved by: re (rgrimes)
Sponsored by: The FreeBSD Foundation

5 years ago- Copy stable/12@r340462 to releng/12.0 as part of the 12.0-RELEASE
gjb [Fri, 16 Nov 2018 00:00:59 +0000 (00:00 +0000)]
- Copy stable/12@r340462 to releng/12.0 as part of the 12.0-RELEASE
  cycle.
- Prune svn:mergeinfo from the new branch.
- Update from BETA4 to RC1.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoMFC r340314:
asomers [Thu, 15 Nov 2018 19:06:07 +0000 (19:06 +0000)]
MFC r340314:

libjail: fix handling of allow.mount.fusefs in jailparam_init

fusefs is inconsistently named. The kernel module is named "fuse", but the
mount helper is named "mount_fusefs" and the jail(8) parameter is named
"allow.mount.fusefs". Special case it in libjail.

Reviewed by: jamie
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17929

5 years agoMFC :r340436
vmaffione [Thu, 15 Nov 2018 18:51:37 +0000 (18:51 +0000)]
MFC :r340436

vtnet: fix netmap support

netmap(4) support for vtnet(4) was incomplete and had multiple bugs.
This commit fixes those bugs to bring netmap on vtnet in a functional state.

Changelist:
  - handle errors returned by virtqueue_enqueue() properly (they were
    previously ignored)
  - make sure netmap XOR rest of the kernel access each virtqueue.
  - compute the number of netmap slots for TX and RX separately, according to
    whether indirect descriptors are used or not for a given virtqueue.
  - make sure sglist are freed according to their type (mbufs or netmap
    buffers)
  - add support for mulitiqueue and netmap host (aka sw) rings.
  - intercept VQ interrupts directly instead of intercepting them in txq_eof
    and rxq_eof. This simplifies the code and makes it easier to make sure
    taskqueues are not running for a VQ while it is in netmap mode.
  - implement vntet_netmap_config() to cope with changes in the number of queues.

Sponsored by: Sunny Valley Networks
Differential Revision: https://reviews.freebsd.org/D17916
Approved by: re (gjb)