OPNsense - FreeBSD source
Find a file
emaste 55152b0b32 Merge from stable/11 bspatch, portsnap, and libarchive fixes:
=== bspatch ===

MFS r306213: bspatch Capsicumization, sanity checks, and other improvements

r304691: bspatch: apply style(9)

Make style changes (and trivial refactoring of open calls) now in order
to reduce noise in diffs for future capsicum changes.

r304807 (allanjude): Capsicumize bspatch

Move all of the fopen() and open() calls to the top of main()

Restrict each FD to least privilege (read/seek only, write only, etc)

cap_enter(), and make all except the output FD read/seek only.

r304821: bspatch: remove output file in the case of error

r305486: bspatch: add sanity checks on sizes to avoid integer overflow

Note that this introduces an explicit 2GB limit, but this was already
implicit in variable and function argument types.

This is based on the "non-cryptanalytic attacks against freebsd
update components" anonymous gist. Further refinement is planned.

r305737: bspatch: remove superfluous newlines from errx strings

r305822: bspatch: use #define for header size instead of magic number

r306026: bspatch: Remove backwards-compatibility sys/capability.h support

bspatch previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may
see this file incorporated into other third-party software.

The Capsicum header is now installed as sys/capsicum.h in stable/10 and
FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic.

With this change, bspatch is identical between head, stable/11 and releng/11.0.

=== portsnap ===

MFS r305648 (delphij): MFC r305469:

Ensure that we always open only files that is named by explicitly
using shell redirections instead of having gzip(1) to decide what
file to open.

Issue reported in the "non-cryptanalytic attacks against freebsd
update components" anonymous gist.

=== libarchive ===

MFS r305754 (mm): MFC r305422:

Sync libarchive with vendor

Vendor issues fixed:
PR #777: Multiple bugfixes for setup_acls()

This includes a bugfix for a bug that caused ACLs not to be read properly
for files and directories inside subdirectories and as a result not being
stored or being incorrectly stored in tar archives.

MFS r306321 (mm): MFC r305819:

Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged.

Approved by:	re (gjb), so (glebius)
2016-10-03 12:30:09 +02:00
bin src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
cddl src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
contrib Merge from stable/11 bspatch, portsnap, and libarchive fixes: 2016-10-03 12:30:09 +02:00
crypto Merge r306343 by jkim: 2016-10-03 12:30:02 +02:00
etc src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
gnu src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
include src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
kerberos5 src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
lib Merge from stable/11 bspatch, portsnap, and libarchive fixes: 2016-10-03 12:30:09 +02:00
libexec src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
release src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
rescue src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
sbin src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
secure Merge r306343 by jkim: 2016-10-03 12:30:02 +02:00
share src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
sys src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
targets src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
tests src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
tools src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
usr.bin Merge from stable/11 bspatch, portsnap, and libarchive fixes: 2016-10-03 12:30:09 +02:00
usr.sbin Merge from stable/11 bspatch, portsnap, and libarchive fixes: 2016-10-03 12:30:09 +02:00
COPYRIGHT src: clean-cut move to release/10.3.0 2016-05-21 08:25:57 +02:00
LOCKS src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
MAINTAINERS src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
Makefile src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
Makefile.inc1 src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
Makefile.libcompat src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
ObsoleteFiles.inc src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
README src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
UPDATING src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree.  See build(7)
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The `buildkernel` and `installkernel` targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process.  See build(7), config(8),
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
for more information.

Note: If you want to build and install the kernel with the
`buildkernel` and `installkernel` targets, you might need to build
world before.  More information is available in the handbook.

The kernel configuration files reside in the sys/<arch>/conf
sub-directory.  GENERIC is the default configuration used in release builds.
NOTES contains entries and documentation for all possible
devices, not just those commonly used.


Source Roadmap:
---------------

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html