199794 Commits

Author SHA1 Message Date
delphij
d3ecbb9019 Fix patch(1) shell injection vulnerability. [SA-15:14]
Fix resource exhaustion in TCP reassembly. [SA-15:15]

Fix OpenSSH multiple vulnerabilities. [SA-15:16]
2015-07-28 19:58:44 +00:00
cem
87ad559404 MFC r285483: pipe_direct_write: Fix mismatched pipelock/unlock
If a signal is caught in pipelock, causing it to fail, pipe_direct_write
should not try to pipeunlock.

Approved by:	markj (mentor)
Sponsored by:	EMC / Isilon Storage Division
2015-07-28 18:37:23 +00:00
kib
07af41892f MFC r284956:
Do not calculate the stack's bottom address twice.
2015-07-28 17:12:41 +00:00
kib
3205c5b7b0 MFC r285039:
Remove asserts which might reference freed memory.
2015-07-28 17:08:32 +00:00
kib
9368084956 MFC r285173:
Document the locking context for the directly dispatched callouts.
Cross-reference timeout(9).
2015-07-28 17:06:13 +00:00
kib
8a59bb0b0a MFC r285134 (by mjg):
fd: de-k&r-ify functions + some whitespace fixes

MFC r285269:
Handle copyout for the fcntl(F_OGETLK) using oflock structure.
2015-07-28 16:39:36 +00:00
gjb
87b74142db Fix the description for r274486.
Submitted by:	glebius
Sponsored by:	The FreeBSD Foundation
2015-07-28 15:03:56 +00:00
emaste
c94b5252c8 MFC r285248: lldb: use .PATH to find man page instead of symlinking it 2015-07-28 12:46:37 +00:00
emaste
c18b3c3a79 MFC r285246: Avoid creating invalid UEFI device path
The UEFI loader on the 10.1 release install disk (disc1) modifies an
existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to
truncate the device path.  In doing so it creates an invalid device
path.

Perform the equivalent action without modification of structures
allocated by firmware.

PR:		197641
Submitted by:	Chris Ruffin <chris.ruffin at intel.com>
2015-07-28 12:45:08 +00:00
emaste
dfe95dcde5 MFC r201289: mfiutil: increase buffer size to accommodate sprintf string
PR:		201289
2015-07-28 12:40:41 +00:00
glebius
70de52445f Merge r283106:
During module unload unlock rules before destroying UMA zones, which
  may sleep in uma_drain(). It is safe to unlock here, since we are already
  dehooked from pfil(9) and all pf threads had quit.
2015-07-28 09:21:19 +00:00
dim
859189d7ec MFC r285340:
Fix swapped copyin(9) arguments in cxgb's iwch_arm_cq() function.
Detected by clang 3.7.0 with the warning:

sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c:309:18: error: variable
'rptr' is uninitialized when used here [-Werror,-Wuninitialized]
		chp->cq.rptr = rptr;
			       ^~~~
2015-07-28 09:19:04 +00:00
glebius
c3133372cb Merge r283061, r283063: don't dereference NULL is pf_get_mtag() fails.
PR:		200222
2015-07-28 09:16:54 +00:00
glebius
2a5be58b24 Merge 280169: always lock the hash row of a source node when updating
its 'states' counter.

PR:		182401
2015-07-28 09:13:55 +00:00
glebius
93ef51db74 Merge r271458:
- Provide a sleepable lock to protect against ioctl() vs ioctl() races.
  - Use the new lock to protect against simultaneous DIOCSTART and/or
    DIOCSTOP ioctls.
2015-07-28 09:09:01 +00:00
ae
76b23ad923 MFC r285735:
lseek() allows an offset to be set beyond the end of file. Using
  it to check that partition has enough space to write bootcode doesn't
  work. Use the known size of provider instead.

  PR:		201504
2015-07-28 08:22:50 +00:00
bapt
76e00b9ec3 make ctdladm(8) return 0 is everything was ok.
retval is used to test the return of XML_Parse function which is ok if 1 is
returned and retval it directly returned to the main function and used as an
exit value.

if all the parsing part is done reset retval to 0 so that the command return 0
if everything ok

Differential Revision:	https://reviews.freebsd.org/D3102
Reviewed by:	trasz
Sponsored by:	gandi.net
2015-07-28 05:48:58 +00:00
whu
c78f4c18f7 MFC r285785 Do not enable UDP checksum offloading when running on the
Hyper-V on Windows Server 2012 and earlier hosts.

Submitted by: whu
Reviewed by: royger
Approved by: royger
Relnotes: No
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D3217
2015-07-28 05:46:37 +00:00
jimharris
bc6d158afc MFC r285816:
nvme: ensure csts.rdy bit is cleared before returning from nvme_ctrlr_disable

Sponsored by:	Intel
2015-07-27 15:37:02 +00:00
jimharris
6f14ca5382 MFC r285815:
nvme: properly handle case where pci_alloc_msix does not alloc all vectors

Sponsored by:	Intel
2015-07-27 15:35:36 +00:00
jimharris
c7ba7d86bd MFC r285796:
nvmecontrol: read controller identify data before any log page operations

Sponsored by:	Intel
2015-07-27 15:34:02 +00:00
jimharris
6e669fcd5f MFC r285767:
nvd: set d_delmaxsize to full capacity of NVMe namespace

  The NVMe specification has no ability to specify a maximum delete size
  that is less than the full capacity of the namespace - so just using the
  namespace size is the correct value here.

  This fixes reported issues where ZFS trim on init looked like it was
  hanging the system - previously the default I/O max size (128KB on
  Intel NVMe controllers) was used for delete operations which worked out
  to only about 8MB/s.  With this patch I can add an 800GB DC P3700
  drive to a ZFS pool in about 15-20 seconds.

Sponsored by:	Intel
2015-07-27 15:32:37 +00:00
rmacklem
9c93ec1f0b MFC: r285066
Alex Burlyga reported a POLA violation for the new NFS client as
compared to the old NFS client via email to the freebsd-fs@ mailing list.
For the new client, when multiple clients attempted to create a symbolic
link concurrently, more that one client would report success instead of
EEXIST. This was caused by code in the new client that mapped EEXIST to
OK assuming it was caused by a retried RPC request.
Since the old client did not do this, the patch defaults to the old
behaviour and permits the new behaviour to be enabled via a sysctl.
2015-07-27 00:28:51 +00:00
gjb
d8cc27b9d0 Further refine the PAE_TABLES entry, based on feedback from
alc.

Sponsored by:	The FreeBSD Foundation
2015-07-26 17:57:35 +00:00
jhb
dc79e09c5b Partially revert r284034. In particular, revert the final change in this
MFC (281874).  It broke suspend and resume on several Thinkpads (though not
all) in 10 even though it works fine on the same laptops in HEAD.

PR:		201239
Reported by:	Kevin Oberman and several others
2015-07-25 00:14:02 +00:00
delphij
b3775fddfb MFC r285701:
Use fixed date/time (the time choosen was the time the import was done
on -HEAD) in libntp so we can make reproducible build.

PR:		bin/201661
Differential Revision:	https://reviews.freebsd.org/D3122

While I'm there also remove libmd from linkage as reported in bin/201738

PR:		bin/201738
Submitted by:	John Marshall
2015-07-24 19:51:51 +00:00
pfg
179248cffd MFC r285719:
snmp_hostres(3): Fix buffer overflow.

Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches.

CID:		1007594
2015-07-24 19:21:48 +00:00
emaste
099a5eb8d8 MFC r277485 by rrs: Fix minor errors found by coverity.
PR:		201594
Sponsored by:	The FreeBSD Foundation
2015-07-24 19:09:11 +00:00
gjb
27addd8a72 - Reset stable/10 back to -PRERELEASE status now that releng/10.2
has been branched.
- Update __FreeBSD_version to reflect the new -STABLE branch.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-23 23:35:20 +00:00
hrs
979a1cd315 MFC r285261, r285279:
- Fix offset calculation in variable substitution
  in jail.conf.  The following did not work correctly:

 A="A_${B}_C_${D}"
 B="BBBBB"
 D="DDDD_${E}_FFFFF"
 E="EEEEE"

- Implement PF_IMMUTABLE flag and apply it to "name" and "jid" in
  jail.conf parameters.  This flag disallows redefinition of the parameter.

  "name" and/or "jid" are automatically defined in jail.conf by using
  the jail names at the front of jail parameter definitions.  However,
  one could override them by using a variable with the same name like
  $name = "foo".  This confused the parser and could end up with SIGSEGV.

  Note that this change also affects a case when all of parameters are
  defined in the command line arguments, not in jail.conf.  Specifically,
  "jail -c name=j1 name=j2" no longer works.  This should be harmless.

Approved by:	re (gjb)
2015-07-23 20:01:56 +00:00
hrs
881bea3791 MFC r284636:
- Add SOCK_SEQPACKET support in UNIX-domain socket.
- Display zoneid using % notation in an IPv6 address.
- Use nitems().
- Use sstos{in,in6,un} macros to simplify casts.
- style(9).

Approved by:	re (gjb)
2015-07-23 20:00:20 +00:00
hrs
b037e0b55c MFC r282805:
- Remove ND6_IFF_IGNORELOOP.  This functionality was useless in practice
  because a link where looped back NS messages are permanently observed
  does not work with either NDP or ARP for IPv4.

- draft-ietf-6man-enhanced-dad is now RFC 7527.

Approved by:	re (gjb)
2015-07-23 19:58:56 +00:00
hrs
123cf5c769 MFC r279538:
Fix group membership of cloned interfaces when one is moved by
if_vmove().

In if_vmove(), if_detach_internal() and if_attach_internal() were
called in series to detach and reattach the interface.  When
detaching, if_delgroup() was called and the interface leaves all of
the group membership.  And then upon attachment, if_addgroup(ifp,
IFG_ALL) was called and it joined only "all" group again.

This had a problem. Normally, a cloned interface automatically joins
a group whose name is ifc_name of the cloner in addition to "all"
upon creation.  However, if_vmove() removed the membership and did
not restore upon attachment.

Approved by:	re (gjb)
2015-07-23 19:57:47 +00:00
hrs
91dc3e4cd8 MFC r274841
Remove examples of gif_interfaces and gifconfig.  These have already been
marked as deprecated in rc.conf(5) manual page but these examples
were still here.

Approved by:	re (gjb)
2015-07-23 19:55:46 +00:00
hrs
1bf10917ef MFC r273992:
Fix a bug which prevented ND6_IFF_IFDISABLED flag from clearing when
the newly-added IPv6 address was /128.

Approved by:	re (gjb)
2015-07-23 19:54:42 +00:00
hrs
12f61d8213 MFC r273201, r273301:
Add support of "/{udp,tcp,proto}" suffix into $firewall_myservices, which
interpreted the listed items as port numbers of TCP services.

A service with no suffix still works and recognized as a TCP service for
backward compatibility.  It should be updated with /tcp suffix.

Approved by:	re (gjb)
2015-07-23 19:53:49 +00:00
hrs
c20172e5e8 MFC r271910, r273211:
* Add -x waittime and -X timeout options for feature parity.  These are
  equivalent to -W and -t options of ping(8).  Different letters are used
  because both have already been used for another purposes in ping6(8).

* Fix a problem that reply packets are not received when -i T option is set
  and (T < RTT).

 - Use select(2) for timeout instead of interval timer. Remove poll(2) support.
 - Use sigaction(2) instead of signal(3).
 - Exit in SIGINT handler when two signals are received and doing reverse DNS
   lookup as ping(8) does.
 - Remove redundant variables used for getaddrinfo(3).

Approved by:	re (gjb)
2015-07-23 19:52:03 +00:00
gjb
b55b825a16 Refine the PAE_TABLES entry based on feedback from kib
and jhb.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-23 18:11:52 +00:00
gjb
e8cb2fb1da MFC r285722, r285733:
r285722 (brd):
  Add support for building VirtualBox Vagrant images.
  Abstract the build, package and upload to handle building
  either type.

 r285733
  Fix an out-of-order execution issue regarding pkg(8):
  - pkg(8) cannot be removed before subsequent reinvocations
  - The PKG_CACHEDIR cannot be cleaned after the repo*.sqlite
    has been removed
  - pkg(8) cannot be removed as a precursor to any of the other
    steps involved here

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-23 15:32:58 +00:00
arybchik
d5e30036e4 MFC r285798
sfxge: added fallbacks for pre 4.2.1 firmware support

Driver must be able to start against older firmware that is missing
recently added MCDI calls, otherwise firmware upgrade will not be
possible.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    re (gjb)
2015-07-23 15:08:21 +00:00
brueffer
d85d061a9a MFC: r285628
Actually recognize all Intel Lynx Point devices we have device IDs for.

PR:		195851
Submitted by:	ftigeot@wolfpond.org
Approved by:	re (gjb)
2015-07-23 13:22:13 +00:00
scottl
ab97a72940 Merge driver for PMC Sierra's range of SAS/SATA HBAs.
Submitted by:   Achim Leubner <Achim.Leubner@pmcs.com>
Approved by: re
2015-07-23 05:26:09 +00:00
gjb
784290aa55 Document FreeBSD-SA-15:13.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-22 16:38:07 +00:00
brueffer
2de7e645f9 MFC: r285543
Add a missing break statement, which made the code default to IPv6.

PR:		201285
Submitted by:	David Binderman
Approved by:	re (gjb)
2015-07-22 15:39:41 +00:00
hiren
141df3ac09 MFC r284941:
Avoid a situation where we do not set persist timer after a zero window
condition.
If you send a 0-length packet, but there is data is the socket buffer, and
neither the rexmt or persist timer is already set, then activate the persist
timer.

PR:		192599
Approved by:	re (delphij)
2015-07-22 15:05:45 +00:00
delphij
457165363e Fix resource exhaustion due to sessions stuck in LAST_ACK state.
Security:	CVE-2015-5358
Security:	SA-15:13.tcp
Submitted by:	Jonathan Looney (Juniper SIRT)
Approved by:	re (so blanket)
2015-07-21 23:42:17 +00:00
allanjude
c704c25de7 MFC: r285679
Add auto-detecting workaround for Lenovo GPT boot issue
	Add auto-detecting workaround for "GPT Active" boot issue
	Allow user to select partitioning scheme in the ufs wizard

PR:		184910
PR:		194359
Approved by:	re (gjb), marcel
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3144
2015-07-21 21:12:28 +00:00
hiren
e21e1ce198 Partial MFC of r285528 as full RSS support is not available in FreeBSD 10.
Expose full 32bit RSS hash from card regardless of whether RSS is defined or
not. When doing multiqueue, we are all setup to have full 32bit RSS hash from
the card. We do not need to hide that under "ifdef RSS" and should expose that
by default so others like lagg(4) can use that and avoid hashing the traffic by
themselves.

Approved by:	    re (gjb)
Sponsored by:	    Limelight Networks
2015-07-21 19:41:39 +00:00
pkelsey
04fd70b7f2 MFC r285567:
Check TCP timestamp option flag so that the automatic receive buffer
scaling code does not use an uninitialized timestamp echo reply value
from the stack when timestamps are not enabled.

Approved by: re (gjb)
2015-07-21 18:38:31 +00:00
markj
84c91edd53 MFC r285663, r285664, r285667:
Ensure that locstat_nsecs() has no effect when lockstat probes are not
enabled or when the profiled lock carries the LO_NOPROFILE flag.

PR:		201642, 201517
Approved by:	re (gjb)
Tested by:	Jason Unovitch
2015-07-21 17:16:37 +00:00