Compare commits

...

270 Commits

Author SHA1 Message Date
Richard Purdie
dade0e68c6 build-appliance-image: Update to jethro head revision
(From OE-Core rev: 8979a4546841f47677ba74989aa32f0cb3e2ff12)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-23 17:35:09 +01:00
Richard Purdie
a325db9bc8 poky.conf: Bump version for 2.0.2 jethro release
(From meta-yocto rev: a9b5cf91fa0ee913381ffec88503e2a40a2e04d4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-23 17:34:56 +01:00
Richard Purdie
c940dd928f build-appliance-image: Update to jethro head revision
(From OE-Core rev: 1ef5883b78f35679c4ff20468826d63a98be1539)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-23 17:25:14 +01:00
Saul Wold
65306b0bfc gdb: Backport patch to changes with AVX and MPX
The current MPX target descriptions assume that MPX is always combined
with AVX, however that's not correct.  We can have machines with MPX
and without AVX; or machines with AVX and without MPX.

This patch adds new target descriptions for machines that support
both MPX and AVX, as duplicates of the existing MPX descriptions.

The following commit will remove AVX from the MPX-only descriptions.

This commit is backported from 7.12

(From OE-Core rev: 059d459d48bd42a282005698c4dc4a3ecbd2d88f)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-22 08:42:55 +01:00
Armin Kuster
f117786f24 gcc: Security Fix CVE-2016-4490
(From OE-Core rev: 69b1e25a53255433262178b91ab3e328768ad725)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17 20:56:25 +01:00
Armin Kuster
6f8a7089b3 gcc: Security fix CVE-2016-2226
(From OE-Core rev: 8fc7db068cf6e2a527e10e8333585a16ce628e22)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17 20:56:25 +01:00
Armin Kuster
1945133a22 gcc: Security fix CVE-2016-4489
(From OE-Core rev: 7bf396e7bdb3faaf900f99f72446f19df1cffe88)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17 20:56:25 +01:00
Armin Kuster
e3bf77e381 gcc: Security fix CVE-2016-4488
(From OE-Core rev: 07820907d25970f2c22497415aa6ff95fe43dc40)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17 20:56:25 +01:00
Humberto Ibarra
44585dd62a yocto-bsp: Set correct default branches and branches base for i386, qemu and x86_64 archs
Kernel recipes for linux-yocto_4.1 have outdated branches as default, making it
impossible to find the right branch if the user picks the default value.
The branches_base property uses these outdated branches also.

This updates standard/common-pc and standard/common-pc-64 branches to standard/base

The fix was tested using 'yocto-bsp create' with each one of the following archs:

-i386
-x86_64
-qemu (i386 and x86_64)

After the layer was created, it was added to local.conf and the MACHINE was set
accordingly.

'bitbake linux-yocto' ran successfully with each configuration tested.

[YOCTO #9160]

(From meta-yocto rev: 32e3c2d3910c42f12957c874902a01da94a7971a)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 09:40:17 +01:00
Humberto Ibarra
a4ee99f27a yocto-bsp: fix default kernel for x86_64 arch
When using x86_64 arch in yocto-bsp the script suggests
4.1 as the default kernel version; however, as soon as the
default is picked the script continues processing with
3.19 kernel.

This changes the default kernel version to 4.1, which is the
right value and matches the script's message.

[Yocto #9353]

(From meta-yocto rev: 932184bef928d83249c4b4e5dcd36c68d4264cd6)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 09:40:17 +01:00
Ross Burton
16d64def97 conf/distro/poky.conf: use example.com for connectivity check
Instead of pinging both the Yocto Project download and bugzilla sites, use
https://www.example.com/.  This is a reserved domain name and hosted by IANA, so
is a key part of the Internet and should be available everywhere (whereas for
example google.com is generally blocked by the Great Firewall of China).  Also
using a https: site verifies that any local proxies are configured for HTTPS as
well as HTTP.

In my testing this reduces the time taken for connectivity checks from 3 seconds
to 1 second.

(From meta-yocto rev: b253c6073be44090a19d1743deb58ef566853056)

(From meta-yocto rev: c27b1d6ccac67ff3ed16079fcbe0f9a8644499ed)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 09:40:17 +01:00
Joshua Lock
a31931e290 openssl: prevent ABI break from earlier jethro releases
The backported upgrade to 1.0.2h included an updated GNU LD
version-script which results in an ABI change. In order to try and
respect ABI for existing binaries built against fido this commit
partially reverts the version-script to maintain the existing ABI
and instead only add the new symbols required by 1.0.2h.

Suggested-by: Martin Jansa <martin.jansa@gmail.com>
(From OE-Core rev: 480db6be99f9a53d8657b31b846f0079ee1a124f)

(From OE-Core rev: 528541845df34843c14be5de62e9f53004d292ac)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 09:40:17 +01:00
Armin Kuster
da75750122 openssh: Security Fix CVE-2016-3115
opehssh <= 7.2

(From OE-Core rev: e0df10f586361a18f2858230a5e94ccf9c3cc2f3)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 09:40:17 +01:00
Armin Kuster
ae691815c8 busybox: Security fix CVE-2016-2147
busybox <= 1.24.2

(From OE-Core rev: 0a977091a4a5ee925b44c60bc4b13557696afadb)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 09:40:16 +01:00
Armin Kuster
ba15486e27 busybox: Security Fix CVE-2016-2148
busybox <= 1.24.2

(From OE-Core rev: 1d7ad5f32ae39f84626bb71ded75439062dd717c)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 09:40:16 +01:00
Armin Kuster
2ef5feeb3d libtiff: Security fix CVE-2015-8664 and 8683
CVE-2015-8665
CVE-2015-8683

(From OE-Core rev: 49008750ece710201701a6f413537c857190798a)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 09:40:16 +01:00
Robert Yang
a201edefae openssl: 1.0.2d -> 1.0.2h (mainly for CVEs)
* CVEs:
  - CVE-2016-0705
  - CVE-2016-0798
  - CVE-2016-0797
  - CVE-2016-0799
  - CVE-2016-0702
  - CVE-2016-0703
  - CVE-2016-0704
  - CVE-2016-2105
  - CVE-2016-2106
  - CVE-2016-2109
  - CVE-2016-2176

* The LICENSE's checksum is changed because of date changes (2011 ->
  2016), the contents are the same.

* Remove backport patches
  - 0001-Add-test-for-CVE-2015-3194.patch
  - CVE-2015-3193-bn-asm-x86_64-mont5.pl-fix-carry-propagating-bug-CVE.patch
  - CVE-2015-3194-1-Add-PSS-parameter-check.patch
  - CVE-2015-3195-Fix-leak-with-ASN.1-combine.patch
  - CVE-2015-3197.patch
  - CVE-2016-0701_1.patch
  - CVE-2016-0701_2.patch
  - CVE-2016-0800.patch
  - CVE-2016-0800_2.patch
  - CVE-2016-0800_3.patch

* Update crypto_use_bigint_in_x86-64_perl.patch

* Add version-script.patch and update block_diginotar.patch (From master branch)

* Update openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
  (From Armin)

(From OE-Core rev: bca156013af0a98cb18d8156626b9acc8f9883e3)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 12:37:06 +01:00
Tom Zanussi
00b016b010 Revert "kernel/kernel-arch: Explicitly mapping between, i386/x86_64 and x86 for kernel ARCH"
This reverts commit a6f52930a6.

In addition to also causing the problem in [YOCTO #9579], this commit
was reverted in krogoth and master but wasn't reverted in jethro but
should be.  The original revert message was:

This reverts commit 8d310b24927d0f348fb431895f0583733db2aad0.

That commit completely breaks KBUILD_DEFCONFIG because it relies on
$ARCH to match between the target OE arch and the kernel subdirectory
containing the defconfigs. In the kernel all defconfigs for everything
x86-based (including x86_64) is stored in dir arch/x86/configs/

kernel-yocto.bbclass correctly searches for all the defconfigs inside
${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}

Commit 8d310b249 makes it search in wrong places and _only_ if you
define TARGET_ARCH = "athlon" will it search x86 which is nonsensical.

The commit further adds an if clause to hack the mungled kernel arches
back to their original values (ugh) in do_shared_workdir which is run
after do compile, but of course the build breaks before that in
do_kernel_metadata because of the KBUILD_DEFCONFIG mentioned above (so
that hack is useless).

Please fix that corner case bug in another way which does not completely
screw up the kernel arch mapping & defconfig logic. If 64bit configs are
generated in the kernel for 32bit machines because the host is asked,
then it it a bug in the kernel, it is of no use to hack around it in OE.

(From OE-Core rev: bc02a478a5d4a5de7b3943ed809d5c22711f5b1f)

(From OE-Core rev: 88e0032f13f635c868c426e963db4d8a6fc42e9d)

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 12:37:06 +01:00
Martyn Welch
877a6b3ef4 glew: Correct version in autotooling patches
The additional autotooling patched into glew claims the version is 1.9.0
whilst we are building 1.12.0. The version in the autotooling is used to
set the version number in the pkgconfig file, this results in the
configuration of packages which depend on glew > 1.9.0 failing.

This patch updates the version number used in the patches to match that of
the version being built.

(From OE-Core rev: 0ef7c0f30456cc242de331b273b92c1dfe835350)

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 12:37:06 +01:00
André Draszik
ed3fc1ab85 gdb: fix QA warning (uClibc)
WARNING: QA Issue: gdb rdepends on libiconv, but it isn't a build dependency? [build-deps]

We already have virtual/libiconv which is set appropriately
in all environments, so let's use it to fix the issue.

(From OE-Core rev: 9ae38c3b24b387b02541142d40343d1dd0411c88)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 12:37:06 +01:00
Tristan Van Berkom
dafc9d7755 binutils: backport bug fix to the 2.25 branch for jethro
We fail to build webkit on aarch64 due to this binutils bug:

   https://sourceware.org/bugzilla/show_bug.cgi?id=19353

Applying patch which fixes this, stripped out changelog entry
from patch to make it apply without error.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 12:37:06 +01:00
Yuanjie Huang
49ce0e7d4a glibc: Fix CVE-2015-8778
CVE: CVE-2015-8778

Improve check against integer wraparound in hcreate_r [BZ #18240]

This is an integer overflow in hcreate and hcreate_r which can result in
an out-of-bound memory access.  This could lead to application crashes
or, potentially, arbitrary code execution.

Upstream-Status: Backport [2.23]
(cherry-picked from commit bae7c7c7, 4bd228c8)

(From OE-Core rev: 71b051f51a44dad1fdca7ca6b3552d0aebdc91d3)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 12:37:06 +01:00
Robert Yang
6b2102cd59 boot-directdisk.bbclass: remove HDDIMG before create
Fixed when rebuild:
mkdosfs: file /path/to/hdd.image already exists

(From OE-Core rev: 69b49e8dc45cf60defba547d93e663df42c92127)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry-pick from 9abcd309c098558360cde2bff65be840ead25f83)
Signed-off-by: Tim Kilbourn <tkilbourn@gmail.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09 14:37:28 +01:00
Stefan Agner
504e742a5e opkg: backport fix for double remove of packges
Backport the fix 7885da3974 ("pkg_get_provider_replacees: do not
add installed pkg to replacee list"). This avoids opkg trying to
remove a package twice e.g. when upgrading.

Suggested-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
(From OE-Core rev: f26fc34bbe9cf9ae059d4fe646a84501b8924f75)

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09 14:37:28 +01:00
Sona Sarmadi
6b9d2edd7d bind: CVE-2016-1285 CVE-2016-1286
CVE-2016-1285 bind: malformed packet sent to rndc can trigger assertion failure
CVE-2016-1286 bind: malformed signature records for DNAME records can
trigger assertion failure

[YOCTO #9400]

External References:
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-1285
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-1286
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1285
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1286

References to the Upstream commits and Security Advisories:

CVE-2016-1285: https://kb.isc.org/article/AA-01352
https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=patch;
h=e7e15d1302b26a96fa0a5307d6f2cb0d8ad4ea63

CVE-2016-1286: https://kb.isc.org/article/AA-01353
https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=patch;
h=456e1eadd2a3a2fb9617e60d4db90ef4ba7c6ba3

https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=patch;
h=499952eb459c9a41d2092f1d98899c131f9103b2

(From OE-Core rev: e8bc043f871e507542955ad28de74f67afa9bc36)

Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09 14:37:28 +01:00
Bjørn Forsman
ed3115be57 license.bbclass: fix warnings when run in unprivileged "container" env
An unprivileged "container" environment like this[1] doesn't have root
account (uid 0) which causes tons of "Invalid argument" warnings:

  $ bitbake ...
  ...
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  ...

Fix it by handling EINVAL similar to existing handling of EPERM (which
was added for when not running under pseudo).

[1]: The real environemnt is buildFHSUserEnv from NixOS/nixpkgs, but a
  demonstration of the issue can be done like this:

    $ touch f
    $ unshare --user --mount chown 0:0 f
    chown: changing ownership of ‘f’: Invalid argument

(From OE-Core master rev: d00b2250a6afebd7d1373c04b4006290f0cd4043)

(From OE-Core rev: e49794b9fe3391073138cb6116a46b37dd5119e7)

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09 14:37:28 +01:00
Armin Kuster
c6864efbc0 tzdata: update to 2016d
Changes affecting future time stamps

America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
(Thanks to Alexander Krivenyshev for the heads-up.)

Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00.
(Thanks to Alexander Krivenyshev and Matt Johnson.)

New zone Asia/Tomsk, split off from Asia/Novosibirsk. It covers
Tomsk Oblast, Russia, which switches from +06 to +07 on 2016-05-29
at 02:00.  (Thanks to Stepan Golosunov.)

Changes affecting past time stamps

New zone Europe/Kirov, split off from Europe/Volgograd.  It covers
Kirov Oblast, Russia, which switched from +04/+05 to +03/+04 on
1989-03-26 at 02:00, roughly a year after Europe/Volgograd made
the same change.  (Thanks to Stepan Golosunov.)

Russia and nearby locations had daylight-saving transitions on
1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
1992-03-28 at 23:00 and 1992-09-26 at 23:00.  (Thanks to Stepan
Golosunov.)

Many corrections to historical time in Kazakhstan from 1991
through 2005.  (Thanks to Stepan Golosunov.)  Replace Kazakhstan's
invented time zone abbreviations with numeric abbreviations.

(From OE-Core master rev: 10194ca3d8c2f4d8648a685c5c239a33d944b6fe)

(From OE-Core rev: a4808f800f856fb01761f4835f6a87e736349994)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09 14:37:28 +01:00
Armin Kuster
328bd419be tzcode: update to 2016d
they keep the versions in-sync. changes are all in data.

Changes affecting future time stamps

America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
(Thanks to Alexander Krivenyshev for the heads-up.)

Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00.
(Thanks to Alexander Krivenyshev and Matt Johnson.)

New zone Asia/Tomsk, split off from Asia/Novosibirsk. It covers
Tomsk Oblast, Russia, which switches from +06 to +07 on 2016-05-29
at 02:00.  (Thanks to Stepan Golosunov.)

Changes affecting past time stamps

New zone Europe/Kirov, split off from Europe/Volgograd.  It covers
Kirov Oblast, Russia, which switched from +04/+05 to +03/+04 on
1989-03-26 at 02:00, roughly a year after Europe/Volgograd made
the same change.  (Thanks to Stepan Golosunov.)

Russia and nearby locations had daylight-saving transitions on
1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
1992-03-28 at 23:00 and 1992-09-26 at 23:00.  (Thanks to Stepan
Golosunov.)

Many corrections to historical time in Kazakhstan from 1991
through 2005.  (Thanks to Stepan Golosunov.)  Replace Kazakhstan's
invented time zone abbreviations with numeric abbreviations.

(From OE-Core master rev: db8223e4dd2e513a656aedfae217d94e053c2366)

(From OE-Core rev: bb0b1a8dd056af717c37571f8d0e023acd304835)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09 14:37:28 +01:00
Armin Kuster
6dba9abd43 tzcode: update to 2016c
(From OE-Core rev: 28032d8c3122b75ceb3f4a664a2b478c9a9a6a2c)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:03:08 +01:00
Armin Kuster
be42a1d4fd tzdata: update to 2016c
The 2016c release of the tz code and data is available. Its most urgent change is for Asia/Baku, where the update takes effect this weekend.

This release reflects the following changes, which were either circulated on the tz mailing list or are relatively minor technical or administrative changes:

Changes affecting future time stamps

Azerbaijan no longer observes DST.  (Thanks to Steffen Thorsen.)

Chile reverts from permanent to seasonal DST.  (Thanks to Juan
Correa for the heads-up, and to Tim Parenti for corrections.)
Guess that future transitions are August's and May's second
Saturdays at 24:00 mainland time.  Also, call the period from
2014-09-07 through 2016-05-14 daylight saving time instead of
standard time, as that seems more appropriate now.

Changes affecting past time stamps

Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to
+02/+03 on 1989-03-26, not 1991-03-31.  Europe/Volgograd changed
from +04/+05 to +03/+04 on 1988-03-27, not 1989-03-26.
(Thanks to Stepan Golosunov.)

Changes to commentary
Several updates and URLs for historical and proposed Russian changes.
(Thanks to Stepan Golosunov, Matt Johnson, and Alexander Krivenyshev.)

(From OE-Core rev: c3eb4f08a6157e4c06878d0749438a53890c2af8)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:03:08 +01:00
Armin Kuster
6d06b104ce tzcode: update to 2016b
change SRC_URI http seems more reliable

Changes to code

     tzselect's diagnostics and checking, and checktab.awk's checking,
     have been improved.  (Thanks to J William Piggott.)

     tzcode now builds under MinGW.  (Thanks to Ian Abbott and Esben Haabendal.)

     tzselect now tests Julian-date TZ settings more accurately.
     (Thanks to J William Piggott.)

Changes to commentary

     Comments in zone tables have been improved.  (Thanks to J William Piggott.)

     tzselect again limits its menu comments so that menus fit on a
     24x80 alphanumeric display.

     A new web page tz-how-to.html.  (Thanks to Bill Seymour.)

     In the Theory file, the description of possible time zone abbreviations in
     tzdata has been cleaned up, as the old description was unclear and
     inconsistent.  (Thanks to Alain Mouette for reporting the problem.)

(From OE-Core rev: cb091aead5680e99bd8d14bcf6d8444ac9ccd669)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:03:08 +01:00
Armin Kuster
5f5e9c4629 tzdata: update to 2016b
updated SRC_URI to http as it seems more stable.

Changes affecting future time stamps

     New zones Europe/Astrakhan and Europe/Ulyanovsk for Astrakhan and
     Ulyanovsk Oblasts, Russia, both of which will switch from +03 to +04 on
     2016-03-27 at 02:00 local time.  They need distinct zones since their
     post-1970 histories disagree.  New zone Asia/Barnaul for Altai Krai and
     Altai Republic, Russia, which will switch from +06 to +07 on the same date
     and local time.  Also, Asia/Sakhalin moves from +10 to +11 on 2016-03-27
     at 02:00.  (Thanks to Alexander Krivenyshev for the heads-up, and to
     Matt Johnson and Stepan Golosunov for followup.)

     As a trial of a new system that needs less information to be made up,
     the new zones use numeric time zone abbreviations like "+04"
     instead of invented abbreviations like "ASTT".

     Haiti will not observe DST in 2016.  (Thanks to Jean Antoine via
     Steffen Thorsen.)

     Palestine's spring-forward transition on 2016-03-26 is at 01:00, not 00:00.
     (Thanks to Hannah Kreitem.) Guess future transitions will be March's last
     Saturday at 01:00, not March's last Friday at 24:00.

Changes affecting past time stamps

     Europe/Chisinau observed DST during 1990, and switched from +04 to
     +03 at 1990-05-06 02:00, instead of switching from +03 to +02.
     (Thanks to Stepan Golosunov.)

     1991 abbreviations in Europe/Samara should be SAMT/SAMST, not
     KUYT/KUYST.  (Thanks to Stepan Golosunov.)

(From OE-Core rev: 7d2ade652954f51345fde61976a899b8aafd79a1)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:03:08 +01:00
Scott Rifenbark
bb5e264604 yocto-project-qs: Updated the minnowboard example.
Fixes [YOCTO #9386]

Added some missing information:

 * Added instruction to be in the poky directory before cloning
   the meta-intel repository.

 * Removed the "source" part of the string for the bitbake-layer
   command.

 * Added text to describe that the user needs to be sure that the
   same branches are in play for poky and meta-intel before they
   launch the build.

(From yocto-docs rev: a9b85623b1aa30362e9c38ea8f4fd38f35798f67)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:05 +01:00
Scott Rifenbark
2d452b19d6 poky.ent: Added lower-case distro name variable.
I added a variable named DISTRO_NAME_NO_CAP that can be used
to resolve to the branch name as it is needed on command lines
and as it appears in output.

(From yocto-docs rev: e0e27a3623ee90701367162affd9c5d3806297e5)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:04 +01:00
Awais Belal
f87869c6d6 lttng-tools: fix regression tests hang
Some of the lttng fast_regression ptests have race
conditions which end up in a deadlock so the test
case never returns and the only way around is to
kill the process.
This is fixed by picking up relevant patches from
lttng-tools mainstream that fix up the behavior
of these tests.

(From OE-Core rev: 7c5fbfc13a541e904022e19eff8251f1cdf764f5)

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:04 +01:00
Ross Burton
a820a2073b ncurses: update SRC_URI
Upstream re-arranged their FTP server and deleted the tarball that we were
downloading.  This tarball is mirrors on downloads.yoctoproject.org but not
everyone uses that, so Work around this by pointing the SRC_URI at the Yocto
Project source mirror directly.

[ YOCTO #9379 ]

(From OE-Core rev: d64047b2e28f89b0efbfbced48149e1a86babc61)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:04 +01:00
Juro Bystricky
bdd03ee432 python3: fix building nativesdk-python3
When the class nativesdk.bbclass is inherited, it redefines TARGET_CC_ARCH,
in the case of python3, this enables debug, causing an error while linking.
Since we don't enable debug during configure some functions are not declared.
This patch makes sure we keep debug disabled, fixing the linking errors.

[YOCTO #9357]

(From OE-Core rev: 2dd22dff121b3effe40abe4370de89231785a823)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:04 +01:00
Awais Belal
87f7f062df systemd-serialgetty: allow baud rate overriding
In case a getty is required on a UART which is not being
used as the kernel console, the current agetty invocation
fails to obey the baud rate configured through the
SERIAL_CONSOLES variable because it uses --keep-baud.

(From OE-Core master rev: b54b73834e73d55de1038b55d0a4d7f49cda52d0)

(From OE-Core rev: 4e9d7fc44a1fcefe15dd66905ae0dbbc7dc1ca9d)

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:04 +01:00
Lukas Bulwahn
16cb70663f boost: ensure boost to remain an empty metapackage
To ensure that boost remains an empty metapackage after version
updates, we explicitly require boost files to be empty. If new
libraries exist after a version update of the boost recipe,
bitbake will emit a warning at the do_package task. For example,
at the version update from 1.58.0 to 1.59.0, the new timer
library is indicated with:

WARNING: QA Issue: boost: Files/directories were installed but not shipped in any package:
  /usr/lib/libboost_timer.so.1.59.0
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
boost: 1 installed and not shipped files. [installed-vs-shipped]

Ross Burton suggested this improvement on the openembedded-core
mailing list during review of the boost recipe version update [1].

[1] http://lists.openembedded.org/pipermail/openembedded-core/2015-December/114314.html

(From OE-Core master rev: c4e33232db2da3594cc4ba38eea56ee1acb54d3a)

(From OE-Core rev: 90dcc9838e5be74f5ec7a8380cf6da3bddb1c955)

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:04 +01:00
Christopher Larson
3f54d40e23 systemd: chown hwdb.bin to root:root for do_rootfs
This is created by qemu for the do_rootfs case, which bypasses pseudo, so we
need to correct the ownership. This fixes a warning issued by
rootfs_check_host_user_contaminated.

(From OE-Core master rev: 4ff6b8cadec10e17dbf884a873a227e29944f5d1)

(From OE-Core rev: 36eb5b6e75361053b5dd00652df6361499d8a645)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:04 +01:00
Ross Burton
909cf62394 cdrtools: update SRC_URI
Upstream released their 3.01 so the alpha releases we were downloading have
moved.  Update the SRC_URI so it continues to download.

(From OE-Core rev: 2ba9f90e86d25aa0b9319093478ea2218e1423e4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:04 +01:00
Li Xin
e86f3240e6 gcc-cross-canadian.inc: add INSANE_SKIP_ to avoid build warning
WARNING: QA Issue: gcc-cross-canadian-i586-dbg: found library in wrong location:
/PATH/sysroots/x86_64-oesdk-linux/usr/libexec/i586-oe-linux/gcc/
i586-oe-linux/5.2.0/.debug/libcc1.so.0.0.0

This warning is introduced by commit f6e47aa(gcc-target 5.1: fix for libcc1)

(From OE-Core rev: 62c51c4178fb66341498c71c74ce42652568c7fa)

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:03 +01:00
Bill Randle
2aeac77235 systemd: fix segfault on shutdown
This applies upstream fixes to fix a segfault in systemd-logind on
shutdown.

[Fixes YOCTO #9265]

(From OE-Core rev: 4939402d8c67d68e20618cdfdd091bd8cc3f535a)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:03 +01:00
Ulrich Ölmann
9e5370d2e6 nfs-utils: bugfix: adjust name of statd service unit
Upstream nfs-utils use 'rpc-statd.service' and Yocto introduced
'nfs-statd.service' instead but forgot to update the mount.nfs helper
'start-statd' accordingly.

(From OE-Core rev: 48d1a2882bedc1c955071b3602dc640b530fbc47)

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:03 +01:00
Brad Mouring
07682c1bfb busybox_git: Fix SRCREV
The SRCREV in the busybox git recipe did not point to a commit ID
on the master branch. Point the variable to something reachable from
the master branch (which fixes this recipe's fetch()).

Suggested-by: Khem Raj <raj.khem@gmail.com>
(From OE-Core rev: 6ff2acbc72dc958cb3b97998462015010c44d946)

Signed-off-by: Brad Mouring <brad.mouring@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:03 +01:00
Brad Mouring
09e3b84ea5 busybox-1.23: Backport patch to fix zcip false-conflict
Busybox upstream fixed the issue where an incorrect comparison of
addresses led to bogus renegotiation of a new ll ip in 1.24. Backport
this change to 1.23.2.

(From OE-Core rev: 47cb52741c946b6bbe09d5ee9a9f2fe855e8d5fb)

Signed-off-by: Brad Mouring <brad.mouring@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:03 +01:00
Javier Viguera
4fe84e836d bluez5: allow D-Bus to spawn obexd in systems without systemd
This includes a proper D-Bus service file for obexd in systems that do
not support systemd.

(From OE-Core rev: 75c5dc8d4a5506bf5b89292a96c7b9f91e9d71c8)

(From OE-Core rev: a68ff298c8466adbce5f81b4f8104dfdc226eaf7)

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:02 +01:00
Khem Raj
a9e1361611 ruby-native: Depend on openssl-native
This dependency is floating otherwise, It races against openssl-native
and when openssl config does not match with openssl on build host the
build fails occasionally

x86_64-linux/usr/include/openssl/ripemd.h:70:4: error: #error RIPEMD is
disabled.
 #  error RIPEMD is disabled.

Change-Id: I5ff6d8f058ff99c64ad4dc7c0377724071003ae6
(From OE-Core master rev: d0c8d98077622a700d92384f676770cb4d6d4f46)

(From OE-Core rev: 0e3888cc455139bc5ca6080b1d2bc897f42ef7ad)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 22:02:02 +01:00
Markus Lehtonen
3b223f75ee devtool: extract: update SRCTREECOVEREDTASKS for kernel
Add 'do_kernel_configme' and 'do_kernel_configcheck' to
SRCTREECOVEREDTASKS of kernel packages. These tasks should not be run
because kernel meta in the srctree is not necessarily up-to-date or
even present which causes build failures and/or invalid kernel config.
Especially so because 'do_patch' which is a dependency of
'do_kernel_configme' is not being run.

We now store .config in the srctree and 'do_configure' task is able to
run successfully.

(From OE-Core master rev: 7ce4c18a4ba1ebcb9f46e652a881ace1f21d2292)

(From OE-Core rev: 4d879cb8d7384ac4a96f22c1664b8875f2d8f615)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 10:23:02 +00:00
Markus Lehtonen
42ce9b8751 devtool: extract: copy kernel config to srctree
This makes the correct kernel config to be used when building kernel
from srctree (extrernalsrc). If no kernel config is present in the
builddir 'do_configure' task copies .config from the srctree.

(From OE-Core master rev: 3b516332e038a587685f6e0c14a7f04990bdd6cc)

(From OE-Core rev: 32593f2b6a44a7bfdab55aec7e172476020fd4eb)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 10:23:01 +00:00
Peter Kjellerstedt
45a2977b83 lib/oe/patch: Make GitApplyTree._applypatch() support read-only .git/hooks
Rather than modifying files in .git/hooks, which can be read-only
(e.g., if it is a link to a directory in /usr/share), move away the
entire .git/hooks directory temporarily.

(From OE-Core master rev: a88d603b51a9ebb39210d54b667519acfbe465c3)

(From OE-Core rev: 09a2718cb030f8cce202ded0e823cadea4c71f6a)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 09:55:53 +00:00
Chang Rebecca Swee Fun
c8e5c38b8a tune-corei7.inc: Fix PACKAGE_EXTRA_ARCHS for corei7-32
Change the name to core2-32 from core2.

There's no AVAILTUNES with the name core2. Make sure that we specify
the correct TUNE name so PACKAGE_EXTRA_ARCHS is expanded correctly.

[ YOCTO #9197 ]

(From OE-Core rev: 0903d6f0098f112d4263812df109e0c44c166db8)

(From OE-Core rev: 883c38cf0e59082276f933f9b47e276b6b88270f)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-15 11:29:04 +00:00
Jagadeesh Krishnanjanappa
4823395a7d license.bbclass: fix host contamination warnings for license files
We get below host contamination warnings of license files for
each recipe, when we try to create a separate ${PN}-lic package (which
contains license files), by setting LICENSE_CREATE_PACKAGE equal to "1"
in local.conf.

-- snip --
WARNING: QA Issue: libcgroup: /libcgroup-lic/usr/share/licenses/libcgroup/generic_LGPLv2.1 is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
WARNING: QA Issue: attr: /attr-lic/usr/share/licenses/attr/libattr.c is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
WARNING: QA Issue: bash: /bash-lic/usr/share/licenses/bash/COPYING is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
-- CUT --

Since the license files from source and OE-core, are populated in a normal
shell environment rather in pseudo environment (fakeroot); the ownership of
these files will be same as host user running bitbake. During the do_package
task (which runs in pseudo environment (fakeroot)), os.link preserves the
ownership of these license files as host user instead of root user.
This causes license files to have UID same as host user id and resulting in
above warnings during do_package_qa task.

Changing ownership of license files to root user (which has UID and GID as 0)
under pseudo environment will solve above warnings, and on exiting pseudo
environment the license files will continue to be owned by host user. Perform
this manipulation within try/except statements, as tasks which are not exected
under pseudo (such as do_populate_lic) result in OSError when trying to
change ownership of license files.

(From OE-Core master rev: a411e96c3989bc9ffbd870b54cd6a7ad2e9f2c61)

(From OE-Core rev: c87a3507c4557827b3a495a876cf6411ce225407)

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-15 11:29:04 +00:00
Mariano Lopez
4a4fde53bd dhcp: CVE-2015-8605
ISC DHCP allows remote attackers to cause a denial of
service (application crash) via an invalid length field
in a UDP IPv4 packet.

(From OE-Core master rev: f9739b7fa8d08521dc5e42a169753d4c75074ec7)

(From OE-Core rev: 71c92a9e62f4278a946e272b0798d071191dd751)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-15 11:29:04 +00:00
Chang Rebecca Swee Fun
f8dd7e105a make 4.1: fix segfault when ttyname fails
GNU make segfaults when run in a chroot environment because
of a known bug in GNU make 4.1. See [1] for details.

Works if /dev/pts is mounted before chroot.

[1] http://savannah.gnu.org/bugs/?43434

[YOCTO #9067]

Reported-by: Alexander Larsson <alexl@redhat.com>
(From OE-Core master rev: 0fe2a4b428b1b9a937914d87ec089b5a64f641eb)

(From OE-Core rev: 1def72ab689bbf0d2974ab771febf241befa2495)

Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-15 11:29:04 +00:00
Ross Burton
269c2bd717 xorg-lib: allow native building without x11 DISTRO_FEATURES
The Xorg libraries use REQUIRED_DISTRO_FEATURES to stop building on
distributions without the x11 feature but this stops people building native
tooling that uses libX11, such as libsdl-native.

(From OE-Core rev: f2970211690be3cb99ef7404f98010f3fecae45d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-15 11:29:04 +00:00
Ross Burton
1a51bb69b7 base: check for existing prefix when expanding names in PACKAGECONFIG
When the DEPENDS are added as part of the PACKAGECONFIG logic the list of
packages are expanded so that any required nativesdk-/-native/multilib prefixes
and suffixes are added.

However the special handling of virtual/foo names doesn't check that the prefix
already exists, which breaks under nativesdk as in that situation there's an
explicit nativesdk- prefix *and* MLPREFIX is set to nativesdk-.  This results in
the same prefix being applied twice, and virtual packages such as virtual/libx11
ending up as virtual/nativesdk-nativesdk-libx11.

(From OE-Core rev: 9e7d207e207bf0319b09d403d87d37f24e3dfbee)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 23:15:01 +00:00
Scott Rifenbark
c484129d7b documentation: Final bits to support a 2.0.1 doc release
Edits included:

 * Update to poky.ent to have 2.0.1 variable values.
 * Update to all Manual revision tables.
 * Update to mega-manual.sed file so good links result in the
   mega-manual.

(From yocto-docs rev: d7277ca5c6863a116816ff81683a694a337de575)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 23:05:48 +00:00
Ross Burton
5f27b611cd conf/local.conf.sample: comment out ASSUME_PROVIDED=libsdl-native
Ubuntu 15.10 and Debian testing can't build qemu-native against the host libsdl.
Now that libsdl-native is buildable, comment out the ASSUME_PROVIDED which meant
it wouldn't be used.

[ YOCTO #8553 ]

(From meta-yocto rev: 759accbfca46de058ce402938713189dab22a70c)

(From meta-yocto rev: 32a797541bec9c8b13955f5a060558fe64c4fefc)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 11:00:21 +00:00
Craig McQueen
6e32be7c7b os-release: put double-quotes around variable contents
This makes the resulting /etc/os-release file have valid shell
assignment syntax. This makes it loadable by a shell script, using the
'source' command:

    source /etc/os-release

(From OE-Core rev: bab590d738e218fb2da2b3bf27933fe4562de870)

Signed-off-by: Ross Burton <ross.burton@intel.com>

(From OE-Core master rev: f6e0ea000fa3b9a726ab56500f643f9902371618)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 10:57:03 +00:00
Arnold Csorvasi
d6fed74776 image_types_uboot: add cpio.gz.uboot to supported IMAGE_TYPES
U-Boot needs the U-Boot header in a ramdisk image to boot it.
Add this header to the cpio.gz image, so that it can be booted
with U-Boot.

(From OE-Core rev: 240ecb6ac624cd6e5d813d8144c7a7f2d7adb31f)

Signed-off-by: Arnold Csorvasi <arnold.csorvasi@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(From OE-Core master rev: 8376fa3d4ef6175b83ab7f1ec8e4e20ec14964f4)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 10:57:03 +00:00
Ross Burton
6e8edf0e0f libsdl: expand PACKAGECONFIG and enable native builds
Use PACKAGECONFIG instead of using logic in DEPENDS and EXTRA_OECONF, adding new
options for PulseAudio, tslib, DirectFB, OpenGL and X11.  Pass
--disable-x11-shared so that it links to the X libraries instead of using
dlopen().

Disable tslib by default as the kernel event input subsystem is generally used.

SDL's OpenGL support requires X11 so check for both x11 and opengl, and merge
the dependencies.

Finally enable native builds, with a minimal PACKAGECONFIG that will build from
oe-core for native and nativesdk.

(From OE-Core rev: 66205c6096ce9d8bc828bf9b61d927cb495f69b1)

Signed-off-by: Ross Burton <ross.burton@intel.com>

(From OE-Core master rev: 3d6c31c3a4ff34376e17005a981bb55fc6f7a38f)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 10:57:03 +00:00
Mariano Lopez
87ba508688 image_types.bbclass: Rebuild when WICVARS change
The procces to do a wic image is to save a file with
variables required by wic and then call wic using this
file. Because this is external to bitbake if the vars
change, the image won't be rebuild; an example of such
is IMAGE_BOOT_FILES.

This patch adds these variables to vardeps of do_rootfs
when a wic image is build. This will rebuild the image
if a variable needed by wic changes.

[YOCTO #8693]

(From OE-Core rev: 91d4706d356659e46923a8314f1a2aa259ead4fe)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(From OE-Core master rev: 12c54d50ed4c321dc272beb3c6cb770965c979f1)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 10:57:03 +00:00
Christopher Larson
9991263ffe image_types: improve wks path specification
Hardcoding a full input path with zero flexibility goes against everything the
Yocto Project is about. Rework it to let the user specify the wks base
filename with WKS_FILE and it'll search the layers for the wks file and use
it.

(From OE-Core rev: cb5c5d950a83b85881eeadc0362230fa2720962f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(From OE-Core master rev: 8cc7f5229f5447c2183ac319dd52c7ed737ec89b)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 10:57:03 +00:00
Noor Ahsan
b15baaee6f wic: rawcopy: Copy source file to build folder
When a file is given using --sourceparams then wic directly use that file
instead of copying them to build folder. At time of assembling it os.rename
is called which renames all the files to name. In that process the original
file is renamed. When image recipe is rebuilt then wic complains about
missing file which was renamed in previous build.

[YOCTO #8854]

(From OE-Core rev: d3dee0f4107156442238c9ea82f742afeeb0665a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(From OE-Core master rev: 33c52b1f2d39feb641465bf42e8b16d0ab22a316)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11 10:57:03 +00:00
Scott Rifenbark
1a52eceaa5 ref-manual: Corrected Note for CentOS package requirements
Fixes [YOCTO #8324]

I needed to change "older" to "newer" in the note.  I had it
backwards.

(From yocto-docs rev: 73107e18cd342624890264b3b127adc478bc9193)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 17:40:20 +00:00
Scott Rifenbark
6d601592e1 ref-manual: Updated the S variable description with feedback
Applied wording feedback.

Fixes [YOCTO #8542]

(From yocto-docs rev: 7f2ed81317e26fb5d3dd3003cd96b3691174c5c0)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 17:40:19 +00:00
Scott Rifenbark
75c088f2e2 ref-manual: Updated the staging.bbclass description
Fixes [YOCTO #8800]

Provided better wording.

(From yocto-docs rev: 68be69d758b7638ddb824bbec89e76cf7dc026ff)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 17:40:19 +00:00
Scott Rifenbark
41265570c6 ref-manual: Updated the S variable description.
Fixes [YOCTO #8542]

I updated the description with a new example specific to Git.
When you use Git, you have to specifically set the S directory
for things to work.

(From yocto-docs rev: e31f6ba125c4e173832793c14c931c8298ba3510)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 17:40:19 +00:00
Scott Rifenbark
5ca77b2fc6 dev-manual, ref-manual: Updated licensing text information.
Fixes [YOCTO #8634]

To clear up the behavior the COPY_LIC_DIRS, COPY_LIC_MANIFEST,
and LICENSE_CREATE_PACKAGE variable behaviors, I updated the
glossary descriptions of the variables.  Also, added more info
to the "Providing License Text" section in the dev-manual.  Tied
everything together with good referencing.

(From yocto-docs rev: d1f8fb672aeba8b163cc79d5043e6ffcddc9db25)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 17:40:19 +00:00
Scott Rifenbark
a4398c7ff7 ref-manual: Added order information for conf file parsing.
I included a new paragraph at the end of the section describing
configuration in the "Closer Look" chapter.  Cases exist when
two configuration files set the same variable.  Depending on the
order, the last configuration file parsed is the one that actually
sets the variable.

Fixes [YOCTO #8914]

(From yocto-docs rev: ce3f2344550ae1b735082d10f4f17ff555d24c38)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 17:40:19 +00:00
Armin Kuster
05c31507da openssl: Security fix CVE-2016-0800
CVE-2016-0800 SSL/TLS: Cross-protocol attack on TLS using SSLv2 (DROWN)

https://www.openssl.org/news/secadv/20160301.txt

(From OE-Core rev: c99ed6b73f397906475c09323b03b53deb83de55)

Signed-off-by: Armin Kuster <akuster@mvista.com>

Not required for master, an update to 1.0.2g has been submitted.
Backport to fido is required.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 10:38:46 +00:00
Hongxu Jia
6945a4fdde wpa-supplicant: Fix CVE-2015-8041
Backport patch from http://w1.fi/security/2015-5/
and rebase for wpa-supplicant 2.4

(From OE-Core rev: 4d0ebfd77c07475494665dde962137934dd2194a)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>

Not needed in master since the upgrade to 2.5
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 10:38:46 +00:00
Richard Purdie
b1f23d1254 build-appliance-image: Update to jethro head revision
(From OE-Core rev: 0c702756dd0009c4112028fbf2479a346867b32c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-24 09:04:22 +00:00
Armin Kuster
7fe17a2942 qemu: Security fix CVE-2016-2198
CVE-2016-2198 Qemu: usb: ehci null pointer dereference in ehci_caps_write

(From OE-Core rev: 646a8cfa5398a22062541ba9c98539180ba85d58)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-21 09:37:33 +00:00
Armin Kuster
50700a7da6 qemu: Security fix CVE-2016-2197
CVE-2016-2197 Qemu: ide: ahci null pointer dereference when using FIS CLB engines

(From OE-Core rev: ca7cbcf22558349f0b43ed7dc84ad38d7c178c55)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-21 09:37:33 +00:00
Armin Kuster
1f0e615bec libgcrypt: Security fix CVE-2015-7511
CVE-2015-7511 libgcrypt: side-channel attack on ECDH with Weierstrass curves

affects libgcrypt < 1.6.5

Patch 1 is a dependancy patch. simple macro name change.
Patch 2 is the cve fix.

(From OE-Core rev: c691ce99bd2d249d6fdc4ad58300719488fea12c)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-21 09:37:33 +00:00
Armin Kuster
dc5f155e15 uclibc: Security fix CVE-2016-2225
CVE-2016-2225 Make sure to always terminate decoded string

This change is being provide to comply to Yocto compatiblility.

(From OE-Core rev: 093d76f3f4a385aae46304bd572ce1545c6bcf33)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-21 09:37:33 +00:00
Armin Kuster
ef135112fd uclibc: Security fix CVE-2016-2224
CVE-2016-2224 Do not follow compressed items forever.

This change is being provide to comply to Yocto compatiblity.

(From OE-Core rev: 4fe0654253d7444f2c445a30b06623cef036b2bb)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-21 09:37:32 +00:00
Armin Kuster
ae57ea03c6 libbsd: Security fix CVE-2016-2090
CVE-2016-2090 Heap buffer overflow in fgetwln function of libbsd

affects libbsd <= 0.8.1 (and therefore not needed in master)

(From OE-Core rev: e56aba3a822f072f8ed2062a691762a4a970a3f0)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18 10:57:11 +00:00
Armin Kuster
eb9666a3e2 glibc: Security fix CVE-2015-7547
CVE-2015-7547: getaddrinfo() stack-based buffer overflow

(From OE-Core rev: cf754c5c806307d6eb522d4272b3cd7485f82420)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18 07:42:07 +00:00
Richard Purdie
5b12268f6e build-appliance-image: Update to jethro head revision
(From OE-Core rev: 05e551d821594b0f4c06328386b6a82e0801ac2a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:57:07 +00:00
Armin Kuster
a3a374a639 curl: Secuirty fix CVE-2016-0755
CVE-2016-0755 curl: NTLM credentials not-checked for proxy connection re-use

(From OE-Core rev: 8322814c7f657f572d5c986652e708d6bd774378)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:24 +00:00
Armin Kuster
f4341a9b6f curl: Security fix CVE-2016-0754
CVE-2016-0754 curl: remote file name path traversal in curl tool for Windows

(From OE-Core rev: b2c9b48dea2fd968c307a809ff95f2e686435222)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:24 +00:00
Armin Kuster
35f4306ed4 nettle: Security fix CVE-2015-8804
(From OE-Core rev: 7474c7dbf98c1a068bfd9b14627b604da5d79b67)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:24 +00:00
Armin Kuster
3e8a07b901 nettle: Security fix CVE-2015-8803 and CVE-2015-8805
(From OE-Core rev: f62eb452244c3124cc88ef01c14116dac43f377a)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:24 +00:00
Armin Kuster
5ffc3267e7 socat: Security fix CVE-2016-2217
this address both
Socat security advisory 7 and MSVR-1499: "Bad DH p parameter in OpenSSL"
and Socat security advisory 8: "Stack overflow in arguments parser

[Yocto # 9024]

(From OE-Core rev: 0218ce89d3b5125cf7c9a8a91f4a70eb31c04c52)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:24 +00:00
Armin Kuster
5cc5f99bba libpng: Security fix CVE-2015-8472
libpng: Buffer overflow vulnerabilities in png_get_PLTE/png_set_PLTE functions

this patch fixes an incomplete patch in CVE-2015-8126

(From OE-Core rev: f4a805702df691cbd2b80aa5f75d6adfb0f145eb)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:24 +00:00
Armin Kuster
21a816c73a libpng: Security fix CVE-2015-8126
libpng: Buffer overflow vulnerabilities in png_get_PLTE/png_set_PLTE functions

(From OE-Core rev: d0a8313a03711ff881ad89b6cfc545f66a0bc018)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:24 +00:00
Armin Kuster
6a0fbfaeb5 foomatic-filters: Security fixes CVE-2015-8327
CVE-2015-8327 cups-filters: foomatic-rip did not consider the back tick as an illegal shell escape character

this time with the recipe changes.

(From OE-Core rev: 62d6876033476592a8ca35f4e563c996120a687b)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:24 +00:00
Armin Kuster
d57aaf7a39 foomatic-filters: Security fix CVE-2015-8560
CVE-2015-8560 cups-filters: foomatic-rip did not consider semicolon as illegal shell escape character

(From OE-Core rev: 307056ce062bf4063f6effeb4c891c82c949c053)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 22:55:23 +00:00
Richard Purdie
941874ae29 build-appliance-image: Update to jethro head revision
(From OE-Core rev: a2b1d9a6f0f29a2d21c80e549b10f3522df20c11)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 17:23:54 +00:00
Jens Rehsack
d74a3cb765 cross-localedef-native: add ABI breaking glibc patch
Add patch from commit 96b1b5c127 to cross-localedef-native
to avoid broken images built with ENABLE_BINARY_LOCALE_GENERATION set to 1:

    $ sh -c "export LANG=de_DE; ls -la"
    sh: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
    Aborted

(From OE-Core rev: 2ddfcfaa996d8c675b5c161acb605dc5573eba67)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 17:23:01 +00:00
Richard Purdie
12fae23964 build-appliance-image: Update to jethro head revision
(From OE-Core rev: 113812945c3cddfec75d67d781c0fa2d7ee02762)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-05 11:17:08 +00:00
Richard Purdie
67ac9d6254 e2fsprogs: Ensure we use the right mke2fs.conf when restoring from sstate
If we don't do this, we can use an mke2fs.conf from a different path which
may contain incompatible flags and lead to obtuse build failures such as:

Invalid filesystem option set: has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize

To fix this, wrap the mke2fs binary and its hardlinks and point at the
correct configuration file.

In particular this fixes conflicts between master and jethro builds
affecting the main autobuilder.

(From OE-Core rev: 0ef6277463517fb0e52b4bd65ca5f6ab42315773)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-05 11:16:46 +00:00
Richard Purdie
5812fc9e20 build-appliance-image: Update to jethro head revision
(From OE-Core rev: f3831307d7c849e60c4141f7bfe4067ec5ff224a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:23:31 +00:00
Scott Rifenbark
3de249206e ref-manual: Updated host package install requirements CentOS
Put in a caveat about getting the ADT Installer to work
with CentOS 6.x.  New note.

Fixes [YOCTO #8324]

(From yocto-docs rev: 6ee7696537ca2031073cc59a42ff035cfd8caeec)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:22:30 +00:00
Belen Barros Pena
79de8cf5fa toaster-manual: Updated the "Installation" to have TOASTER_DIR information
In section 3.6 of the manual about setting up a production instance of
Toaster, explain that TOASTER_DIR determines the location of the build
directory, and that the checksettings command configures the build
environment for Toaster.

NOTE: I applied some minor fixes to the wording.

(From yocto-docs rev: 5d899f3026cff40078449ca8bdaba680f79ee0a8)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:22:30 +00:00
Scott Rifenbark
a23d2625e2 toaster-manual: Updated instructions for production setup.
Current instructions were wrong.  Applied changes to correct
them.

Author: Belen Barros Pena <belen.barros.pena@intel.com>
(From yocto-docs rev: 609e7bd8847cba70e49f4c8a58524392fdc1bd41)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:22:30 +00:00
Alejandro Hernandez
b6def81ff5 linux-yocto: Update SRCREV for genericx86* for 4.1, fixes CVE-2016-0728
This addresses CVE-2016-0728: KEYS: Fix keyring ref leak in join_session_keyring(), and upgrades to LINUX_VERSION 4.1.17

(From meta-yocto rev: 2aab8657999c2bcf6e7a54f1085664207ba3ac93)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Alejandro Hernandez
db0f8ac8b3 linux-yocto: Update SRCREV for genericx86* for 3.19, fixes CVE-2016-0728
This addresses CVE-2016-0728: KEYS: Fix keyring ref leak in join_session_keyring()

(From meta-yocto rev: 20c1e1e8ec2f18fbbb47b6dbc27dd7dfa15922fb)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Alejandro Hernandez
c8122a088f linux-yocto: Update SRCREV for genericx86* for 3.14, fixes CVE-2016-0728
This addresses CVE-2016-0728: KEYS: Fix keyring ref leak in join_session_keyring(), and upgrades to LINUX_VERSION 3.14.39

(From meta-yocto rev: 47a81a47c5f1f2625365ab7a2f130b75fb5764fd)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Jianxun Zhang
cdeb2415dd meta-yocto-bsp: Remove uvesafb (v86d) from generic x86 features
When uvesafb is automatically loaded during boot and FW doesn't
support legacy video bios and frame buffer, its user space helper
will throw error messages in kernel log:

[6.843790] uvesafb: Getting VBE info block failed (eax=0x4f00, err=1)
[6.843864] uvesafb: vbe_init() failed with -22
[6.843916] uvesafb: probe of uvesafb.0 failed with error -22

Assuming most x86 boards today don't really rely on this module, this
change simply removes it from the common feature list to get rid of
these harmless messages.

[YOCTO #6584]

(From meta-yocto rev: d58fc630b1114dbafa8342de7dcaef8e7d798848)

(From meta-yocto rev: 8b08977dc9f2d9ff4fd5ecf4ead24a36dcbda542)

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6af89812e8)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Leonardo Sandoval
52cd219877 yocto-bsp: Set SRCREV meta/machine revisions to AUTOREV
By default, checkout to latest revision from the machine branch specified by
the user.

(From meta-yocto rev: f79a43406b5b323587415380ecffc87527c64653)

(From meta-yocto rev: 311e084bb321701624785ce56a1ad23d7b20b396)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a35f79ddd8)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Leonardo Sandoval
a88d6cb170 yocto-bsp: Set KTYPE to user selected base branch
Fixes the hardcode branch name set to KTYPE, where its value is used as a base branch
when user decides to create a new branch. Tested on x86_64 architecture.

[YOCTO #8630]

(From meta-yocto rev: ab895be90a0cae7dfa77a8aab3b19e5571e7e7bc)

(From meta-yocto rev: bc5aec2348b2c314953806734a8fbabf798d142c)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9d585b5025)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Leonardo Sandoval
4e74b36458 yocto-bsp: Avoid duplication of user patches ({{=machine}}-user-patches.scc)
On linux-yocto-dev or linux-yocto_X.YY bbappend files, the SRC_URI includes
{{=machine}}-standard.scc, which in turn includes {{=machine}}-user-parches.scc,
thus there is no need to include it again on the corresponding bbappend file.

[YOCTO #8486]

(From meta-yocto rev: 11c93b5dd8c651df478d4810e1b6ff6ad9fa57e8)

(From meta-yocto rev: c1105ff0e65a24f344e5fab17402b1b4fcb1d728)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f674ffa528)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Leonardo Sandoval
66807731c7 yocto-bsp: Default kernel version to 4.1 on x86_64
On the 3.19 to 4.1 migration, the target x86_64 was not taken into account
(no reason, just missing the correspoding update on the kernel-list.noinstall
file), so moving it to 4.1 to be align with the rest.

(From meta-yocto rev: 283665d9295c3c10f964496dc0110137e358daa6)

(From meta-yocto rev: d58d3c5e65294bd6f4f3f780d746e1c3f8678c2b)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9cc221dcb6)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Ross Burton
4c075e7114 piglit: don't use /tmp to write generated sources to
If there are multiple builds on the same machine then piglit writing it's
generated sources to /tmp will race.  Instead, export TEMP to tell the tempfile
module to use a temporary directory under ${B}.

(From OE-Core rev: 226a26e51eb0789686509d3e22a3766e2e3e8666)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:18 +00:00
Paul Eggleton
ee52ac6e85 gen-lockedsig-cache: fix bad destination path joining
When copying the sstate-cache into the extensible SDK, if the source
path had a trailing / and the destination path did not, there would be a
missing / between the path and the subdirectory name, and you'd end up
with subdirectories like "sstate-cacheCentOS-6.7". There are functions
in os.path for this sort of thing so let's just use them and avoid the
problem.

(From OE-Core rev: 2ed6adfea5ba16aeda7b5d908bea4303202d3774)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 5eb8f15c48b5f39a10eb2b63b026cf1ebfd05533)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Alejandro Hernandez
e9f95df962 linux-yocto: Update SRCREV for qemux86* for 4.1, fixes CVE-2016-0728
This addresses CVE-2016-0728: KEYS: Fix keyring ref leak in join_session_keyring(), and upgrades to LINUX_VERSION 4.1.17

(From OE-Core rev: f070d5fee56a4589a6abf422e6872373c5557c6d)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Alejandro Hernandez
e63bab1a09 linux-yocto: Update SRCREV for qemux86* for 3.19, fixes CVE-2016-0728
This addresses CVE-2016-0728: KEYS: Fix keyring ref leak in join_session_keyring()

(From OE-Core rev: 8cb97ea8ed59ee77c0542b50d1af65bf9a3c3fef)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Alejandro Hernandez
64a492097f linux-yocto: Update SRCREV for qemux86* for 3.14, fixes CVE-2016-0728
This addresses CVE-2016-0728: KEYS: Fix keyring ref leak in join_session_keyring(), and upgrades to LINUX_VERSION 3.14.39

(From OE-Core rev: ce53ebc001af87d169a2e0e98ca3d7d4729fdec4)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Maxin B. John
5b043dafa3 libpng12: update URL that no longer exists
Fix the following warning:

WARNING: Failed to fetch URL http://downloads.sourceforge.net/project/
libpng/libpng12/1.2.53/libpng-1.2.53.tar.xz, attempting MIRRORS if
available.

[YOCTO #8739]

(From OE-Core rev: 02363e50b4a3d124fa71edb2870deb820567482b)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Maxin B. John
655c8a5c9d libpng: update URL that no longer exists
Fix the following warning:

WARNING: Failed to fetch URL http://downloads.sourceforge.net/
project/libpng/libpng16/1.6.17/libpng-1.6.17.tar.xz, attempting
MIRRORS if available

[YOCTO #8739]

(From OE-Core rev: dbde0550ce0cc112947367eb89b914be5b3359a7)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Ross Burton
96fda8c8f6 busybox: fix build of last applet
If CONFIG_FEATURE_LAST_SMALL is enabled the build fails because of a broken
__UT_NAMESIZE test.

[ YOCTO #8869 ]

(From OE-Core rev: 6348b2e8e0510b45f4afd2018e90796714863fc1)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Joe Slater
ae037d974e ghostscript: add dependency for pnglibconf.h
When using parallel make jobs, we need to be sure that
pnglibconf.h is created before we try to reference it,
so add a rule to png.mak.

(From OE-Core rev: 4b7bda9d1ac836de0c657cca28044b822e444bea)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit fad19750d23aad2d14a1726c4e3c2c0d05f6e13d)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Jussi Kukkonen
26eb877e18 gcr: Require x11 DISTRO_FEATURE
This enables a world build without x11. GTK3DISTROFEATURES is not
enough because gtk+-x11.pc is still required.

Fixes [YOCTO #8611].

(From OE-Core rev: b1175339287395a7ad4fe4639a73f3a1dda74358)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit dbdcd87144cc1cd6c5d50c800c7f266aaf25ca17)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Bogdan-Alexandru Voiculescu
e632cdb031 uClibc: enable utmp for shadow compatibility
with the enabling of utmpx in busybox and uClibc it was noted that shadow
support for utmpx also needs utmp explicitly enabled in uclibc. this is
a workaround that might be removed once shadow properly supports
--enable-utmpx to check for utmpx configuration instead of utmp like
it does now

[YOCTO #8243]
[YOCTO #8971]

(From OE-Core rev: 05cab660ea956aabf6e6f971bdc5c9e2d94b9f2d)

Signed-off-by: Bogdan-Alexandru Voiculescu <bogdanx.a.voiculescu@intel.com>
Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 969158d63ba2c8e2e11af41c2a6d4f1aa5b0099f)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Armin Kuster
e8c96131d9 git: Security fix CVE-2015-7545
CVE-2015-7545 git: arbitrary code execution via crafted URLs

(From OE-Core rev: 1e0780427bad448c5b3644134b581ecf1d53af84)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:17 +00:00
Armin Kuster
108ea6d05f glibc-locale: fix QA warning
WARNING: QA Issue: glibc-locale: /glibc-binary-localedata-sd-in/usr/lib/locale/sd_IN/LC_CTYPE is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

fix type
(From OE-Core rev: 9d5cd7a353ec257c88d54dd9af2327b0d86d5662)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:16 +00:00
Armin Kuster
9a88c1d255 grub: Security fix CVE-2015-8370
CVE-2015-8370 grub2: buffer overflow when checking password entered during bootup

(From OE-Core rev: b63e3b57b47e95003a1fb014f90333c327681d5b)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:16 +00:00
Armin Kuster
443b09a61d gdk-pixbuf: Security fix CVE-2015-7674
CVE-2015-7674 Heap overflow with a gif file in gdk-pixbuf < 2.32.1

(From OE-Core rev: f2b16d0f9c3ad67fdf63e9e41f42a6d54f1043e4)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:16 +00:00
Armin Kuster
6c910685ec librsvg: Security fix CVE-2015-7558
CVE-2015-7558 librsvg2: Stack exhaustion causing DoS

including two supporting patches.

(From OE-Core rev: 4945643bab1ee6b844115cc747e5c67d874d5fe6)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:16 +00:00
Armin Kuster
9fd2349842 bind: Security fix CVE-2015-8461
CVE-2015-8461 bind: race condition when handling socket errors can lead to an assertion failure in resolver.c\

(From OE-Core rev: 1656eaa722952861ec73362776bd0c4826aec3da)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:16 +00:00
Armin Kuster
5a40d9fb69 bind: Security fix CVE-2015-8000
CVE-2015-8000 bind: responses with a malformed class attribute can trigger an assertion failure in db.c

(From OE-Core rev: a159f9dcf3806f2c3677775d6fb131dab17a5a17)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:16 +00:00
Armin Kuster
1bbf18385b libxml2: Security fix CVE-2015-8710
CVE-2015-8710 libxml2: out-of-bounds memory access when parsing an unclosed HTML comment

(From OE-Core rev: 03d481070ebc6f9af799aec5d038871f9c73901c)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:16 +00:00
Armin Kuster
2ec6d1dcbc libxml2: Security fix CVE-2015-8241
CVE-2015-8241 libxml2: Buffer overread with XML parser in xmlNextChar

(From OE-Core rev: f3c19a39cdec435f26a7f46a3432231ba4daa19c)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:16 +00:00
Armin Kuster
55aafb547d dpkg: Security fix CVE-2015-0860
CVE-2015-0860 dpkg: stack overflows and out of bounds read

(From OE-Core rev: 5aaec01acc9e5a19374a566307a425d43c887f4b)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:15 +00:00
Armin Kuster
029948bc8e tzdata: update to 2016a
Changed LIC_CHKSUM_FILES to a new LICENSE  file.
Add BSD-3-clause to licenses

Changes affecting future time stamps

America/Cayman will not observe daylight saving this year after all.
Revert our guess that it would.  (Thanks to Matt Johnson.)

Asia/Chita switches from +0800 to +0900 on 2016-03-27 at 02:00.
(Thanks to Alexander Krivenyshev.)

Asia/Tehran now has DST predictions for the year 2038 and later,
to be March 21 00:00 to September 21 00:00.  This is likely better
than predicting no DST, albeit off by a day every now and then.

Changes affecting past and future time stamps

America/Metlakatla switched from PST all year to AKST/AKDT on
2015-11-01 at 02:00.  (Thanks to Steffen Thorsen.)

America/Santa_Isabel has been removed, and replaced with a
backward compatibility link to America/Tijuana.  Its contents were
apparently based on a misreading of Mexican legislation.

Changes affecting past time stamps
Asia/Karachi's two transition times in 2002 were off by a minute.
(Thanks to Matt Johnson.)

(From OE-Core rev: 790315dbd2dcb5b2024948ef412f32d2788cb6b5)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 39e231cfabda8d75906c935d2a01f37df6121b84)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:15 +00:00
Armin Kuster
2bcf141c77 tzcode: update to 2016a
Change LIC_CHKSUM_FILES to License. Some files are BSD clause 3

Changes affecting build procedure

An installer can now combine leap seconds with use of the backzone file,
e.g., with 'make PACKRATDATA=backzone REDO=posix_right zones'.
The old 'make posix_packrat' rule is now marked as obsolescent.
(Thanks to Ian Abbott for an initial implementation.)

Changes affecting documentation and commentary

A new file LICENSE makes it easier to see that the code and data
are mostly public-domain.  (Thanks to James Knight.) The three
non-public-domain files now use the current (3-clause) BSD license
instead of older versions of that license.

tz-link.htm mentions the BDE library (thanks to Andrew Paprocki),
CCTZ (thanks to Tim Parenti), TimeJones.com, and has a new section
on editing tz source files (with a mention of Sublime zoneinfo,
thanks to Gilmore Davidson).

The Theory and asia files now mention the 2015 book "The Global
Transformation of Time, 1870-1950", and cite a couple of reviews.

The America/Chicago entry now documents the informal use of US
central time in Fort Pierre, South Dakota.  (Thanks to Rick
McDermid, Matt Johnson, and Steve Jones.)

(From OE-Core rev: 1ee9072e16d96f95d07ec5a1f63888ce4730d60e)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit b7f292b84eea202fb13730c11452ac1957e41cf0)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:15 +00:00
Jianxun Zhang
cc3a391bd9 kernel-yocto: fix checkout bare-cloned kernel repositories
The existing code doesn't tell regular (with .git) and bare cases and
just move the unpacked repo to the place of kernel source. But later
steps will fail on a bare-cloned repo because we can not checkout
directly in a bare cloned repo.

This change performs another clone to fix the issue.

Note: This change doesn't cover the case that S and WORKDIR are same
and the repo is bare cloned.

(From OE-Core rev: f3d0ae7b174f47170fef14a699aec22d02ea1745)

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit ccfa2ee5c4f509de4c18a7054b2a66fc874d5d69)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:20:15 +00:00
Armin Kuster
049be17b53 libpcre: bug fixes include security
[Yocto # 9008]

This is the next patch release for pcre. The 8.xx series now only contains
bug fixes.

http://www.pcre.org/original/changelog.txt

The following security fixes are included:
CVE-2015-3210 pcre: heap buffer overflow in pcre_compile2() / compile_regex()
CVE-2015-3217 pcre: stack overflow in match()
CVE-2015-5073 CVE-2015-8388 pcre: Buffer overflow caused by certain patterns with an unmatched closing parenthesis

CVE-2015-8380 pcre: Heap-based buffer overflow in pcre_exec
CVE-2015-8381 pcre: Heap Overflow in compile_regex()
CVE-2015-8383 pcre: Buffer overflow caused by repeated conditional group
CVE-2015-8384 pcre: Buffer overflow caused by recursive back reference by name within certain group
CVE-2015-8385 pcre: Buffer overflow caused by forward reference by name to certain group
CVE-2015-8386 pcre: Buffer overflow caused by lookbehind assertion
CVE-2015-8387 pcre: Integer overflow in subroutine calls
CVE-2015-8389 pcre: Infinite recursion in JIT compiler when processing certain patterns
 CVE-2015-8390 pcre: Reading from uninitialized memory when processing certain patterns

 CVE-2015-8392 pcre: Buffer overflow caused by certain patterns with duplicated named groups
 CVE-2015-8393 pcre: Information leak when running pcgrep -q on crafted binary
 CVE-2015-8394 pcre: Integer overflow caused by missing check for certain conditions
 CVE-2015-8395 pcre: Buffer overflow caused by certain references
 CVE-2016-1283 pcre: Heap buffer overflow in pcre_compile2 causes DoS

(From OE-Core rev: 3e403cc1bdeefd4f39e54bae2269ca56307e8468)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:10 +00:00
Armin Kuster
5e94ac7ba9 qemu: Security fix CVE-2015-7295
CVE-2015-7295 Qemu: net: virtio-net possible remote DoS

(From OE-Core rev: 74771f8c41aaede0ddfb86983c6841bd1f1c1f0f)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
7ee1828d30 qemu: Security fix CVE-2016-1568
CVE-2016-1568 Qemu: ide: ahci use-after-free vulnerability in aio port commands

(From OE-Core rev: 166c19df8be28da255cc68032e2d11afc59d4197)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
ca6ec2e392 qemu: Security fix CVE-2015-8345
CVE-2015-8345 Qemu: net: eepro100: infinite loop in processing command block list

(From OE-Core rev: 99ffcd66895e4ba064542a1797057e45ec4d3220)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
b55a677699 qemu: Security fix CVE-2015-7512
CVE-2015-7512 Qemu: net: pcnet: buffer overflow in non-loopback mod

(From OE-Core rev: e6e9be51f77c9531f49cebe0ca6b495c23cf022d)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
4922f470dd qemu: Security fix CVE-2015-7504
CVE-2015-7504 Qemu: net: pcnet: heap overflow vulnerability in loopback mode

(From OE-Core rev: b01b569d7d7e651a35fa38750462f13aeb64a2f3)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
3ec0e95fed qemu: Security fix CVE-2015-8504
CVE-2015-8504 Qemu: ui: vnc: avoid floating point exception

(From OE-Core rev: c622bdd7133d31d7fbefe87fb38187f0aea4b592)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
942ce53beb openssl: Security fix CVE-2016-0701
CVE-2016-0701 OpenSSL: DH small subgroups

(From OE-Core rev: c5868a7cd0a28c5800dfa4be1c9d98d3de08cd12)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
ce8ae1c164 openssl: Security fix CVE-2015-3197
CVE-2015-3197 OpenSSL: SSLv2 doesn't block disabled ciphers

(From OE-Core rev: b387d9b8dff8e2c572ca14f9628ab8298347fd4f)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
080e027d14 tiff: Security fix CVE-2015-8784
CVE-2015-8784 libtiff: out-of-bound write in NeXTDecode()

(From OE-Core rev: 3e89477c8ad980fabd13694fa72a0be2e354bbe2)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Armin Kuster
c6ae9c1fae tiff: Security fix CVE-2015-8781
CVE-2015-8781 libtiff: out-of-bounds writes for invalid images

(From OE-Core rev: 29c80024bdb67477dae47d8fb903feda2efe75d4)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Derek Straka
049b7db30c bind: CVE-2015-8704 and CVE-2015-8705
CVE-2015-8704:
Allows remote authenticated users to cause a denial of service via a malformed Address Prefix List record

CVE-2015-8705:
When debug logging is enabled, allows remote attackers to cause a denial of service or have possibly unspecified impact via OPT data or ECS option

[YOCTO 8966]

References:
https://kb.isc.org/article/AA-01346/0/BIND-9.10.3-P3-Release-Notes.html
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8704
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8705

(From OE-Core rev: 78ceabeb2df55194f16324d21ba97e81121f996b)

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:09 +00:00
Mariano Lopez
d632a923dc rpmresolve.c: Fix unfreed pointers that keep DB opened
There are some unfreed rpmmi pointers in printDepList()
function; this happens when the package have null as
the requirement.

This patch fixes these unfreed pointers and add small
changes to keep consistency with some variables.

[YOCTO #8028]

(From OE-Core master rev: da7aa183f94adc1d0fff5bb81e827c584f9938ec)

(From OE-Core rev: 409f19280983b8100a27a773cefbff187cca737a)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:08 +00:00
Armin Kuster
5b993ed429 openssh: CVE-2016-1907
This issue requires three commits:
https://anongit.mindrot.org/openssh.git/commit/?id=ed4ce82dbfa8a3a3c8ea6fa0db113c71e234416c
https://anongit.mindrot.org/openssh.git/commit/?id=f98a09cacff7baad8748c9aa217afd155a4d493f
https://anongit.mindrot.org/openssh.git/commit/?id=2fecfd486bdba9f51b3a789277bb0733ca36e1c0

(From OE-Core master rev: a42229df424552955c0ac62da1063461f97f5938)

(From OE-Core rev: 50f46e40fa2d1d126294874765f90ed5bdee0f15)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:08 +00:00
Armin Kuster
27ee5b4f0e glibc: CVE-2015-8776
it was found that out-of-range time values passed to the strftime function may
cause it to crash, leading to a denial of service, or potentially disclosure
information.

(From OE-Core rev: b9bc001ee834e4f8f756a2eaf2671aac3324b0ee)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:08 +00:00
Armin Kuster
a4134af78b glibc: CVE-2015-9761
A stack overflow vulnerability was found in nan* functions that could cause
applications which process long strings with the nan function to crash or,
potentially, execute arbitrary code.

(From OE-Core rev: fd3da8178c8c06b549dbc19ecec40e98ab934d49)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:08 +00:00
Armin Kuster
e10ec6f3be glibc: CVE-2015-8779
A stack overflow vulnerability in the catopen function was found, causing
applications which pass long strings to the catopen function to crash or,
potentially execute arbitrary code.

(From OE-Core rev: af20e323932caba8883c91dac610e1ba2b3d4ab5)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:08 +00:00
Armin Kuster
a5a965d409 glibc: CVE-2015-8777.patch
The process_envvars function in elf/rtld.c in the GNU C Library (aka glibc or
libc6) before 2.23 allows local users to bypass a pointer-guarding protection
mechanism via a zero value of the LD_POINTER_GUARD environment variable.

(From OE-Core rev: 22570ba08d7c6157aec58764c73b1134405b0252)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 12:13:08 +00:00
Ed Bartosh
2fb7ee2628 bitbake: toaster: make runbuilds loop
This avoids having a loop in shell code and initializing
heavy Django init machinery every second.

Ignore exceptions to prevent exiting the loop.

(Bitbake rev: e04da15556ca0936de652b8c085e4199e5551457)

(Bitbake rev: 0e9d8d63ddb35d181d4e470585d1e4a4c646cd00)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-25 16:29:16 +00:00
Richard Purdie
b9ad87b18f nativesdk-buildtools-perl-dummy: Bump PR
Recent changes to this recipe caused automated PR increments
to break, regressing package feeds. The only way to recover
is to bump PR, so do this centrally to fix anyone affected.

(From OE-Core rev: dacdb499d31cb2e80cca33cba9d599c8ee983dc4)

(From OE-Core rev: 8ce8f62b22b1e20db0f62d7bd8246738147d5f2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-21 16:21:35 +00:00
Paul Eggleton
0a1c63ad6b nativesdk-buildtools-perl-dummy: properly set PACKAGE_ARCH
Turns out I did a silly thing in OE-Core revision
9b1831cf4a2940dca1d23f14dff460ff5a50a520 and forgot to remove the
explicit setting of PACKAGE_ARCH outside of the anonymous python
function; the original bug was apparently fixed but the functionality of
allarch.bbclass was being disabled because it was able to see that
PACKAGE_ARCH was not set to "all" - which was what I was trying to
ensure.

(From OE-Core rev: a25ab5449825315d4f51b31a634fe6cd8f908526)

(From OE-Core rev: afd527d365c58e622983b77a1a7ed57f59ef7b32)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-21 16:21:35 +00:00
Paul Eggleton
d4b400e1c7 nativesdk-buildtools-perl-dummy: fix rebuilding when SDKMACHINE changes
This recipe produces an empty dummy package (in order to satisfy
dependencies on perl so we don't have perl within buildtools-tarball).
Because we were inheriting nativesdk here the recipe was being rebuilt,
but having forced PACKAGE_ARCH to a particular value the packages for
each architecture were stepping on eachother. Since the packages are
empty they can in fact be allarch (even though they won't actually go
into the "all" package feed). It turns out that nheriting nativesdk
wasn't actually necessary either, so drop that.

Fixes [YOCTO #8509].

(From OE-Core rev: 9b1831cf4a2940dca1d23f14dff460ff5a50a520)

(From OE-Core rev: 66694fe312cf0668d08e42246332ce085a4d6372)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-21 16:21:35 +00:00
Richard Purdie
8c8c4ede3f Revert "gstreamer1.0-plugins-good.inc: add gudev back to PACKAGECONFIG"
This reverts commit 5c90b561930aac1783485d91579d313932273e92.

The original change was intentional so back out 'fixes'.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20 17:10:32 +00:00
Richard Purdie
b83220257a Revert "gstreamer: Deal with merge conflict which breaks systemd builds"
This reverts commit bc458ae9586b45b11b6908eadb31e94d892e698f.

The original change was intentional so back out 'fixes'.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20 17:10:32 +00:00
Richard Purdie
dd0ba9ea4a build-appliance-image: Update to jethro head revision
(From OE-Core rev: 716d3140c150bb3d99210e74da91904efc84c907)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17 14:33:04 +00:00
Richard Purdie
325d205769 gstreamer: Deal with merge conflict which breaks systemd builds
In jethro, the dependency is "udev", the change to libgudev happened
in master after the release and this was a mistake during
backporting of gstreamer fixes.

(From OE-Core rev: bc458ae9586b45b11b6908eadb31e94d892e698f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17 14:32:37 +00:00
Richard Purdie
53b114b55f build-appliance-image: Update to jethro head revision
(From OE-Core rev: bc1d59a075bfd1b0dca7a19553cc7970b7460b38)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 22:28:11 +00:00
Richard Purdie
02be35d1ad poky.conf: Bump version for 2.0.1 jethro release
(From meta-yocto rev: d5f3f25fab4e7076ea5dee2ad3669525dec78567)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 22:27:23 +00:00
Ed Bartosh
f5551f85aa ref-manual: Updated the list of supported image types.
The list in the IMAGE_TYPES variable description has been
updated to add and remove several image types.

(From yocto-docs rev: b598590074d41b0eedc8466b325632caeed52e3b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 16:31:22 +00:00
Ed Bartosh
aa179aeede dev-manual: Added three new wic option descriptions.
* --part-type
 * --use-uuid
 * --uuid

(From yocto-docs rev: 79790dd454c13780e045c2afd1eef51180a8b251)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 16:31:22 +00:00
Ed Bartosh
20007c87b2 dev-manual: Added the --overhead-factor wic option description.
(From yocto-docs rev: 346f68486d86292337923e89fbd7e8b2ccd4814b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 16:31:22 +00:00
Ed Bartosh
2dd7f469f5 dev-manual: Added the --extra-space wic option description.
(From yocto-docs rev: cd44efe920352f8a59c5c66cf4bd09ac80a2a5c2)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 16:31:22 +00:00
Ed Bartosh
81cc737056 dev-manual: Added wic --notable option description.
(From yocto-docs rev: 473914d9100c201474c7e0d6c954cf01ee3afa11)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 16:31:21 +00:00
Ed Bartosh
2b1dce5a3c dev-manual:
Updated the --source wic command-line option for partition
size details.

(From yocto-docs rev: b268ad2f252114a09c1d57884fb051b90ad082b1)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 16:31:21 +00:00
Jianxun Zhang
a6f52930a6 kernel/kernel-arch: Explicitly mapping between i386/x86_64 and x86 for kernel ARCH
For a bare-bone kernel recipe which specifies 32 bit x86 target,
a 64 bit .config will be generated from do_configure task when
building 32-bit qemux86, once all of these conditions are true:

* arch of host is x86_64
* kernel source tree used in build has commit ffee0de41 which
  actually chooses i386 or x86_64 defconfig by asking host when
  ARCH is "x86" (arch/x86/Makefile)
* bare-bone kernel recipe inherits directly from kernel without
  other special treatments.

Build will fail because of the mismatched kernel architecture.

The patch sets ARCH i386 or x86_64 explicitly to configure
task to avoid this host contamination. Kernel artifact is also
changed so that it can map i386 and x64 back to arch/x86 when
needed.

(From OE-Core rev: 6ffcfc0bc08bcbe81e17ceeb7094f09cc9214b94)

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:41 +00:00
Alexander Kanavin
e79a538a54 openssh: update to 7.1p2
This fixes a number of security issues.

(From OE-Core rev: b31fc9b167e5ca3115a0d0169126d63f2dbd3824)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:41 +00:00
Paul Eggleton
b171076f46 devtool: reset: do clean for multiple recipes at once with -a
We need to run the clean for all recipes that are being reset before we
start deleting things from the workspace; if we don't, recipes providing
dependencies may be missing when we come to clean a recipe later (since
we don't and couldn't practically reset them in dependency order). This
also improves performance since we have the startup startup time for the
clean just once rather than for every recipe.

(From OE-Core master rev: c10a2de75a99410eb5338dd6da0e0b0e32bae6f5)

(From OE-Core rev: d64a5794098e9ca715a70daa704f571ba97e9912)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:41 +00:00
Paul Eggleton
255115f6e4 devtool: sdk-update: fix error checking
Running "raise" with no arguments here is invalid, we're not in
exception handling context. Rather than also adding code to catch the
exception I just moved the check out to the parent function from which
we can just exit.

(From OE-Core master rev: 0164dc66467739b357ab22bf9b8c0845f3eff4a4)

(From OE-Core rev: d9c5653f994e0f366c9154a2a988175a9f8e3130)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:41 +00:00
Paul Eggleton
3f691055c5 devtool: sdk-update: fix metadata update step
* Clone the correct path - we need .git on the end
* Pull from the specified path instead of expecting a remote to be set
* up in the repo already (it isn't by default)

(From OE-Core master rev: 1a60ee8bd21e156022c928f12bb296ab5caaa766)

(From OE-Core rev: a0e1ff92b189681df5cf106dc924e76bb05caf31)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:41 +00:00
Paul Eggleton
5ba94af1e6 devtool: sdk-update: fix not using updateserver config file option
We read the updateserver setting from the config file but we never
actually used that value - the code then went on to use only the value
supplied on the command line.

Fix courtesy of Dmitry Rozhkov <dmitry.rozhkov@intel.com>

(From OE-Core master rev: 1c85237803038fba539d5b03bf4de39d99380684)

(From OE-Core rev: 3940fe87f944bd2067a96b1b6a8c1dc646569690)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:41 +00:00
Paul Eggleton
d03d145410 classes/populate_sdk_ext: disable signature warnings
The user of the extensible SDK doesn't need to see these.

(From OE-Core master rev: 7045fabf73d4eef9c023edb9e0a8b8d1d3f04680)

(From OE-Core rev: f89d5dc8e980e1ac48357f49158632689582d7fb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:41 +00:00
Paul Eggleton
00ff950d3c classes/populate_sdk_ext: fix cascading from preparation failure
During extensible SDK installtion, if the build system preparation step
fails we try to put something at the end of the environment setup script
to show an error when it is sourced, in case the user doesn't realise
that the partially-installed SDK is broken. However, an apostrophe in
the message (actually a single quote) appears to terminate the string
and therefore breaks the command. Drop it to avoid that.

(From OE-Core master rev: 21e591d182e24c399ae010a8eff9b89947061a46)

(From OE-Core rev: 91326ede91ff7b820ec60ec642927cc223cae81f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
22446c6f44 scripts/oe-publish-sdk: add missing call to git update-server-info
We need to call git update-server-info here on the created repository or
we can't share it over plain http as we need to be able to for the
update process to function as currently implemented.

(From OE-Core master rev: 3ab40bf9d5f19d91e45f7bae77f037b2544e889b)

(From OE-Core rev: 2b3c7c6fc52a0fb66e31796ca7daacd19afbf75f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Ed Bartosh
8597a616f3 devtool: use cp instead of shutil.copytree
Copied layers with 'cp -a' instead of calling shutil.copytree as
copytree fails to copy broken symlinks.

More pythonic fix would be to use copytree with 'ignore' parameter,
but this could slow down copying complex directory structures.

[YOCTO #8825]

(From OE-Core master rev: e5b841420b9fdd33829f7665a62cd06a3017f7e6)

(From OE-Core rev: fa0424ee742a6b331f1c6462eb69fecba6dc7f86)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
95cc641ec3 buildhistory: fix not recording SDK information
After OE-Core revision baa4e43a29e45df17eaa3456acc179b08d571db6 we lost
recording SDK the contents in buildhistory. This was due to the
SDK_POSTPROCESS_COMMAND variable being set with = in
populate_sdk_base.bbclass which overwrote any value set with += in
buildhistory.bbclass; to fix it, use _append in buildhistory.bbclass
instead.

Fixes [YOCTO #8839].

(From OE-Core master rev: 11d1aa82ef4a00051e0a50a87a1efed1c50c73b5)

(From OE-Core rev: 36d4b0903890bc793608759b3351a5de4229de11)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
84d48acb01 recipetool: create: fix error when extracting source to a specified directory
Having fetched the source and unpacked it to a temporary directory, we
then move part of it to the destination directory, or if the source is at
the top level we move the whole temporary directory, but in the latter
case we were later attempting to delete the temporary directory which no
longer existed. Clear out the variable so that doesn't happen.

(From OE-Core master rev: 91714a52e91cddba5a16c73cf5765d1f47f7856c)

(From OE-Core rev: 8b7644fa4cd72b7f80d2aaa3bfcd2efed2402d37)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
4369329b76 recipetool: create: detect when specified URL returns a web page
If the user specifies a URL that just returns a web page, then it's
probably incorrect (or broken); attempt to detect this and show an error
if it's the case.

(From OE-Core master rev: 83b1245b2638eb5d314fe663d33cd52a776a34a7)

(From OE-Core rev: cf61eff7bbc9afa0eeb1fd481f1d4b75429a1c24)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
4c3191f9ab recipetool: create: prevent attempting to unpack entire DL_DIR
If you specify a URL ending in /, BitBake's fetcher returns a localpath
of ${DL_DIR}, and if you then try to unpack that it will attempt to copy
the entire DL_DIR contents to the destination - which at least on my
system filled my entire /tmp. Obviously we should fix the fetcher, but
at least detect and stop that from happening here for now.

(From OE-Core master rev: 7e63a672517518644a37ce006e05b5494c29cf6e)

(From OE-Core rev: 623e59b103c1edf3211384d26cc0c83cfd424587)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
caca77eb17 recipetool: create: fix do_install handling for makefile-only software
In my testing here it appears make -qn returns an error (exit code 2)
whereas make -n doesn't; I can't immediately tell why based on the
documentation. We don't actually care for it to be quiet since we're
capturing the output, so let's just leave -q off and have this work
properly as a result.

(From OE-Core master rev: 30c4cd9efdac400d713dff645f23f2627277d75a)

(From OE-Core rev: d76191cef76c6c4416a5e635a9424192e16c1090)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
383159ef64 recipetool: create: avoid traceback on fetch error
If a fetch error occurs, the fetcher already prints a reasonable error -
we don't need the traceback as well, so catch that and exit if it
occurs.

(From OE-Core master rev: c2cc5abe34169eae92067d97ce1e747e7c1413f5)

(From OE-Core rev: b2706b5b311d456e7da5acf02e25f3f8650c50e5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
be40baa5a0 recipetool: create: handle https://....git URLs
When you grab a URL for a github repository you'll almost certainly find
it in https://github.com/path/to/repository.git format; but bitbake's
fetcher can't handle that because it'll see https:// at the start and
assume it should use wget to fetch it. If the URL starts with http:// or
https:// and the path part ends with .git then assume it's a git
repository and adjust it accordingly.

(From OE-Core master rev: bdbc4cf41d30eddb8a9ed882dedcc1670ce8fdd6)

(From OE-Core rev: 9d41e993a95a7b60f1ed5f8e9ca887fdf393233c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
a897bfdbdc devtool: sdk-update: fix traceback without update server set
If the SDK update server hasn't been set in the config (when building
the extensible SDK this would be set via SDK_UPDATE_URL) and it wasn't
specified on the command line then we were failing with a traceback
because we didn't pass the default value properly - None is interpreted
as no default, meaning raise an exception if no such option exists.

Additionally we don't need the try...except anymore either because with
a proper default value, NoSectionError is caught as well.

(From OE-Core master rev: 9763c1b83362f8445ed6dff2804dd7d282861f79)

(From OE-Core rev: b2696869c1428e8ef2a198d2432121ddc2e2034c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:40 +00:00
Paul Eggleton
9c4b61e919 classes/populate_sdk_ext: error out of install if buildtools install fails
If the installation of buildtools fails then we should fail the entire
installation instead of blindly continuing on.

(From OE-Core master rev: 34bb63e6c72fb862e0ef0d2b26e1bfddaf7ddb99)

(From OE-Core rev: 696979ef39fbd85fa74cfb4a0cbee49b045e2d92)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 15:51:39 +00:00
Robert Yang
4c07dd2172 gstreamer1.0-plugins-good.inc: add gudev back to PACKAGECONFIG
The 66e32244aed8d33f1b49fbe78179f2442545c730 wrongly removed gudev from
PACKAGECONFIG, now add it back.

(From OE-Core rev: 5c90b561930aac1783485d91579d313932273e92)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 11:19:09 +00:00
Saul Wold
83b72d8d1f linux-yocto: Update Genericx86* BSP to 4.1.15 kernel
(From meta-yocto rev: ccd390f15d9d9b9f975a9e0a784e84d69d9d6f4d)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:29 +00:00
Ross Burton
44639bd817 libaio: don't disable linking to the system libraries
For some reason that I don't understand (a decade-old attempt at optimisation?)
libaio disables linkage to the system libraries.  Enabling fortify means linking
to the system libraries, so remove the existing addition of -lc for x86 (the
problem also happens on at least PPC) and just link to the system libraries on
all platforms.

Also remove the sed of src/Makefile as the build not respecting LDFLAGS has been
fixed upstream.

(From OE-Core rev: f435ac9db0581d8313a38d586b00c2b3de419298)

(From OE-Core rev: 901af5a00338fd8f1ace939123484ea91c090a7a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Bruce Ashfield
a0be9bd862 linux-yocto/4.1: update to v4.1.15
Updating the 4.1 kernel repo to the latest 4.1.x stable.

(From OE-Core rev: 1df3a79cf454754e6be6c1ffc91ba8310a880616)

(From OE-Core rev: 1896042df8db8ec21e41d45c2640360242fb0aee)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
53f0290658 libxml2: security fix CVE-2015-5312
(From OE-Core rev: 8546fada29f2c8ec0111a15fe50d90d3f2518d52)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
f4b0c49145 libxml2: security fix CVE-2015-8242
(From OE-Core rev: d392edafa1d73cace437f45bfbc147de9fc4cf8b)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
fb409c9d17 libxml2: security fix CVE-2015-7500
includes a depend fix security issue CVE-2015-7500

(From OE-Core rev: 2febaf28b165dadc23eeb7f16391e72d4184b0a7)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
55d097a106 libxml2: security fix CVE-2015-7499
includes:
CVE-2015-7499-1
CVE-2015-7499-2

(From OE-Core rev: 51aedd5307b92b63d97b63bd9911eda67ee6fde8)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
8e6b2d6823 libxml2: security fix CVE-2015-7497
(From OE-Core rev: c1d69a59a693dabf4b48619fdc12ce0f148a2386)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
332eb1dcce libxml2: security fix CVE-2015-7498
(From OE-Core rev: cece10f44c9cceddab17adf1a1debc4b14e50a8d)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
cbc4e832d1 libxml2: security fix CVE-2015-8035
(From OE-Core rev: 1266b6269cbafbb529579d92334785a833c22fc1)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
c4b71e1a6a libxml2: security fix CVE-2015-7942
includes:
CVE-2015-7942
CVE-2015-7942-2

(From OE-Core rev: 66c7e97f8687c1b656c322282ee7cdc200945616)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:28 +00:00
Armin Kuster
fdea03df12 libxml2: security fix CVE-2015-8317
(From OE-Core rev: 42086e309dfce3caa05e88681875f5f78cf5f095)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:27 +00:00
Armin Kuster
6fc1109f5d libxml2: security fix CVE-2015-7941
includes:
CVE-2015-7941-1
CVE-2015-7941-2

(From OE-Core rev: 48af957147a091550c089423e3a65bac6596c41e)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:27 +00:00
Armin Kuster
9eb4ce0a81 openssl: fix for CVE-2015-3195
(From OE-Core rev: 85841412db0b1e22c53e62a839d03f7672b07b64)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:27 +00:00
Armin Kuster
6880f826c3 openssl: fix for CVE-2015-3194
(From OE-Core rev: ce9f78296101772655809036e21009acec78da24)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:27 +00:00
Armin Kuster
7dcaa840ff openssl: fix for CVE-2015-3193
(From OE-Core rev: 4d9006b1217ee7e97108f36db19aebd93e1d9850)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-14 15:18:27 +00:00
Hongxu Jia
435139b2a9 logrotate: do not move binary logrotate to /usr/bin
In oe-core commit a46d3646a3e1781be4423b508ea63996b3cfca8a
...
Author: Fahad Usman <fahad_usman@mentor.com>
Date:   Tue Aug 26 13:16:48 2014 +0500

    logrotate: obey our flags

    Needed to quiet GNU_HASH warnings, and some minor fixes.
...
it explicitly move logrotate to /usr/bin without any reason,
which is against the original Linux location /usr/sbin.

So partly revert the above commit which let logrotate be
kept in the original place /usr/sbin.

(From OE-Core master rev: 0007436b486fd0bea9e6ef60bf57603e7cfce54b)

(From OE-Core rev: c0a13c410393ce51a2a55e36a0913c0136058bdc)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:31 +00:00
Andre McCurdy
5f49c0a248 cairo: fix license for cairo-script-interpreter
Without an explicit license, cairo-script-interpreter inherits
the default LICENSE and isn't packaged in builds which blacklist
GPLv3.

(From OE-Core master rev: cb8f84218b065fed88a8c36f3c78065e8ab726bf)

(From OE-Core rev: 6d0cf8ebde4eaa2c868dac8d0dac498c4210ec05)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:31 +00:00
Mark Hatle
a29ec8108e glibc: Fix ld.so / prelink interface for ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA
A bug in glibc 2.22's ld.so interface for the prelink support causes
the displayed values to be incorrect.  The included path fixes this
issue.

   Clear ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for prelink

   prelink runs ld.so with the environment variable LD_TRACE_PRELINKING
   set to dump the relocation type class from _dl_debug_bindings.  prelink
   has the following relocation type classes:

   where ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA has a conflict with
   RTYPE_CLASS_TLS.

   Since prelink doesn't use ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, we
   should clear the ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA bit when the
   DL_DEBUG_PRELINK bit is set.

 (From OE-Core master rev: 12c86bdcc60c54e587a896b0dceb8bb6cc9ff7e3)

(From OE-Core rev: 73919830f88f2d28da973e72fbdfaab591a5af69)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:31 +00:00
Mark Hatle
b1e980f33b gcc: Update default Power GCC settings to use secure-plt
The gcc default, bss-plt, will cause errors when using the prelinker.  All
other distributions that I am aware of are using the the secure-plt.  For an
explanation of the differences, the gcc docs:

  Current PowerPC GCC accepts a `-msecure-plt' option that generates code
  capable of using a newer PLT and GOT layout that has the security
  advantage of no executable section ever needing to be writable and no
  writable section ever being executable. PowerPC ld will generate this
  layout, including stubs to access the PLT, if all input files (including
  startup and static libraries) were compiled with `-msecure-plt'.
  `--bss-plt' forces the old BSS PLT (and GOT layout) which can give
  slightly better performance.

The security of the new PLT and ability to run the prelinker outweigh
any performance penalty.

The secure-plt is enabled by default.  The old bss-plt can be enabled by
selecting 'bssplt' in the DISTRO_FEATURES.

(From OE-Core master rev: 70c55aada1101a5c687cdaa79f370fa4530b39d9)

(From OE-Core rev: 44adc575be5d9b9ad0d87e143467aeeadde2fe89)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:31 +00:00
Mark Hatle
ed8269010c prelink: Fix various prelink issues on IA32, ARM, and MIPS.
Fix the following issues:

IA32 / ARM - Resync to glibc-2.22, fix a mismatch w/ glibc's ld.so
MIPS - Ignore the new SHT_MIPS_ABIFLAGS
ARM - Fix missing ARM IFUNC support chunk

Also upstream prelink project no longer has a 'trunk' directory.

(From OE-Core master rev: c725328f2ab5c9b220c552ed37c0d24b098a218d)

(From OE-Core rev: de7f25e9d67b150db4780bb82ef9481982e81312)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:30 +00:00
Jens Rehsack
9a620dada4 autotools: Allow recipe-individual configure scripts
OpenJDK-8 has it's configure script at common/autotools - which will cause
the entire assumption of ${S}/configure is regenerated by autoreconf, intltoolize or alike
fails heavily.

Also - other configure mechanisms can be supported more similar (see how pkgsrc
manages different ones ...)

(From OE-Core master rev: fe506eddb0790e37ac1e50f37fa2e32ad81d5493)

(From OE-Core rev: 809df21d8a8cc4ab860a84ccd7b2e51105df68ee)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:30 +00:00
Fang Jia
f8280717e4 toolchain-scripts.bbclass: unset command_not_found_handle
On Ubuntu-system, When sourcing the env.sh from an exported sdk, and
running a bogus linux command (for example "asd"), a core dump of
python is usually generated.

Unset the command_not_found_handle to fix it.

(From OE-Core master rev: 473ccbebb426df757adb8955eaa5e191d88180d1)

(From OE-Core rev: fe622c4508d2c87f7bd7c15c6391c8e1319fd3b6)

Signed-off-by: Fang Jia <fang.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:30 +00:00
Paul Eggleton
49858bdc02 devtool: upgrade: fetch remote repository before checking out new revision
If we're upgrading a recipe that fetches from git, and we've simply
fetched a tarball of the repo instead of directly from the upstream repo
(this can happen if you have PREMIRRORS set up as in poky with a core recipe,
e.g. kernelshark) then we won't have any new revisions, and the checkout
will fail with "fatal: reference is not a tree: <hash>". To avoid this,
do a "git fetch" before checking out the new revision.

(From OE-Core master rev: c4daebf3fe797a8063dcbc2ab229be2fbedc8134)

(From OE-Core rev: 2c8afd6aae775ab10dd30eb890fc410739048d79)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:30 +00:00
Paul Eggleton
d2134528a6 devtool: upgrade: remove erroneous error when not renaming recipe
If we're upgrading a git recipe the recipe file usually won't need
renaming; for some unknown reason we were throwing an error here which
isn't correct.

(From OE-Core master rev: 656348dff9bc9dd1cafc8fff11e5e374e3667f0f)

(From OE-Core rev: 9816c0a2ad2c1011e298d734576b531de9947740)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:30 +00:00
Paul Eggleton
fec97f6fa2 devtool: upgrade: fix updating PV and SRCREV
This code was clearly never tested. Fix the following issues:
* Actually set SRCREV if it's been specified
* Enable history tracking and reparse so that we handle if variables are
  set in an inc file next to the recipe
* Use a more accurate check for PV being in the recipe which will work
  if it's in an inc file next to the recipe

(From OE-Core master rev: 8b8f04226ebf464fa61c05ca7af7c6cbda392339)

(From OE-Core rev: 105a7c90dac6f43b7c3d1de92827db2db8419112)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:29 +00:00
Paul Eggleton
3b4f65968e devtool: upgrade: fix removing other recipes from workspace on reset
If you did a "devtool add" followed by "devtool upgrade" and then did
a "devtool reset" on the recipe you upgraded, the first recipe would
also be deleted from the workspace - this was because we were
erroneously adding the entire "recipes" subdirectory and its contents to
be tracked for removal on reset. Remove the unnecessary call to
os.path.dirname() that caused this.

(From OE-Core master rev: 65354e066f87df7d3138adceb22d6a05d1685904)

(From OE-Core rev: c44d41b0dec7457c4347a00b21d8b5bd24a9b887)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:29 +00:00
Tzu-Jung Lee
61a7de097a devtool: include do_patch in SRCTREECOVEREDTASKS
The external source of kernel has been patched during the
construction of git repository. Include the do_patch task in the
SRCTREECOVEREDTASKS.

(From OE-Core master rev: 0731c5a9e98f7b7f6e5ada9bbb99acb3f5884516)

(From OE-Core rev: e82466ebd9c8b9277255680d5efdd76eabf125b1)

Signed-off-by: Tzu-Jung Lee <roylee17@currantlabs.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:29 +00:00
Paul Eggleton
82c0072033 toolchain-shar-extract.sh: do not allow $ in paths for ext SDK
If you put an $ character in the path, SDK installation fails during the
preparation stage, so add this to the disallowed characters.

Fixes [YOCTO #8625].

(From OE-Core master rev: 654f4785f719552f4e78e14a5a901c07d00ce68d)

(From OE-Core rev: d7bcdb33a675fbdd30596d62961be52aa98c9e05)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:29 +00:00
Paul Eggleton
f181e72cb8 scripts/gen-lockedsig-cache: improve output
* Print some status when running
* When incorrect number of arguments specified, print usage text

(From OE-Core master rev: ac38d245878b618ddf56f9a68834d344500e45a6)

(From OE-Core rev: 5c5953cbc44c7532650cb9e3c877fa86c9d0f242)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:29 +00:00
Paul Eggleton
4b5d4ca1c9 toolchain-shar-extract.sh: proper fix for additional env setup scripts
buildtools-tarball uses a custom env setup script, which isn't named the
same as the default; thus unfortunately OE-Core revision
a36469c97c9cb335de1e95dea5141038f337df95 broke installation of
buildtools-tarball. Revert that and implement a more robust mechanism.

(From OE-Core master rev: 00e081b81ba8118959b724269ba9d18d42aba8a4)

(From OE-Core rev: feefaceb8a2bce8129aba82d4d93e725656ee075)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:29 +00:00
Jean-Francois Dagenais
d2ea8f1041 toolchain-shar-relocate: don't assume last state of env_setup_script is good
In the case where many environment-setup-* files exist, the incorrect
filename might be lastly set in env_setup_script, which leads to
incorrect behaviour for the initialization of native_sysroot.

The scenario I had was that our custom meta-toolchain-*.bb, which
inherits populate_sdk, defined another environment-setup-* file to dump
variable information for qt-creator. The file is named like so in order
for the sdk shell script to pick it up and fix the SDK paths in the
file. Since it (coincidentally) alphabetically comes after ...-core2, it
was last set in env_setup_script and the grep OECORE_NATIVE_SYSROOT
would simply be blank. The apparent symptom was "...relocate_sdk.py:
Argument list too long" since the find command would not be searching in
the right path.

(From OE-Core master rev: a36469c97c9cb335de1e95dea5141038f337df95)

(From OE-Core rev: 2f04a9285cfabdb053dafacd17320f847ac6343f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:29 +00:00
Mark Hatle
02ef437608 populate_sdk_ext.bbclass: Be more permissive on the name of the buildtools
We want to support different names for the buildtools tarball.  The
name may not always be of the default oe-core format.

For instance, at Wind River we define the built-tools name to be:

${SDK_ARCH}-buildtools-nativesdk-standalone-${DISTRO_VERSION}

because thes standard SDK_NAME has additional information that is not
relevant to the builtools tarball.

(From OE-Core master rev: b49c6f179b06a8b97106aa4c95f2cdb3c4dc0920)

(From OE-Core rev: ed92440d19e5948aa64c95fcf30b989c5e6efdb9)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:29 +00:00
Paul Eggleton
3653b17aea classes/populate_sdk_ext: fail if SDK_ARCH != BUILD_ARCH
The extensible SDK relies upon uninative, and with the way that
uninative works, the build system architecture must be the same as the
SDK architecture or the extensible SDK won't be usable. At some point in
future hopefully we can remove this limitation, but until then it's
disingenuous to allow this to build, so add a check to ensure
SDK_ARCH == BUILD_ARCH and fail if it isn't.

(From OE-Core master rev: 9e30e849eda3b0a0c54d3f7ed0102760fdaef06c)

(From OE-Core rev: 1042d020d5d1b6af3f32e5fe29562d1dce765f0a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:28 +00:00
Paul Eggleton
8879571d11 classes/populate_sdk_ext: tweak reporting of workspace exclusion
If you have a local workspace layer enabled when building the
extensible SDK, we explicitly exclude that from the SDK (mostly because
the SDK has its own for the user to use). Adjust the message we print
notifying the user of this so it's clear that we're excluding it from
the SDK, and scale it back from a warning to a note printed with
bb.plain().

(From OE-Core master rev: 90f46f74a088a7b965d2205eceb9eff6f276dd38)

(From OE-Core rev: dbacd35c0db2e9f4b9b2a20ffa6bcc5f78432d8a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:28 +00:00
Paul Eggleton
eeda3c66a2 classes/populate_sdk_ext: make it clear when SDK installation has failed
When SDK preparation fails:

* Insert an ERROR: in front of the error message
* Add an error message to the environment setup script

Hopefully this should make it more obvious when this happens.

Fixes [YOCTO #8658].

(From OE-Core master rev: 105df569b3b1982005c2edb37f4690f9ba6bde35)

(From OE-Core rev: 98215b9513212b7002d072afa763347520544ee0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:28 +00:00
Paul Eggleton
dee9fbe044 classes/populate_sdk_ext: tidy up preparation log file writing
Use a variable for the log file which includes the full path; this is
not only neater but avoids us writing the first part (the output of
oe-init-build-env) to a file in another directory since we are
changing directory as part of this subshell.

(From OE-Core master rev: 001af71752a9e9aab460cbd49ed049e1eb726295)

(From OE-Core rev: dded5f93d5650ebe5eb661a5cec698b1fa82e1ba)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:28 +00:00
Paul Eggleton
d001d46d17 classes/license: fix intermittent license collection warning
Fixes the following warning sometimes appearing during image builds:

WARNING: The license listed ABC was not in the licenses collected for recipe xyz

The files being looked for here, which runs during do_rootfs,
are written out by the do_populate_lic task for each recipe. However,
there was no explicit dependency between do_rootfs and all of the
do_populate_lic tasks to ensure they had run - only an implicit link via
do_build, so it is possible that sometimes they had not depending on how
the tasks were scheduled. Add an explicit set of dependencies to fix
this.

(From OE-Core master rev: ef7dc532e800d9b170246550cbc8703adf624beb)

(From OE-Core rev: f521d8d2d1ea495383f54e5e7c2754dde007f7eb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:28 +00:00
Paul Eggleton
777451ca43 classes/metadata_scm: fix git errors showing up on non-git repositories
Fixes the following error showing up for layers that aren't a git repo
(or aren't parented by one):

fatal: Not a git repository (or any of the parent directories): .git

This was because we weren't intercepting stderr. We might as well just
use bb.process.run() here which does that and returns stdout and stderr
separately.

(This was a regression that came in with OE-Core revision
3aac11076e).

Fixes [YOCTO #8661].

(From OE-Core master rev: f533c1bf4c6edbecc67f9e2c62fd475d64668e86)

(From OE-Core rev: 8968ede9c8cdcd2cbf13bd5bba95883082189908)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:28 +00:00
Paul Eggleton
cb0ca7264d oeqa/selftest/layerappend: fix test if build directory is not inside COREBASE
Fix test_layer_appends to work when build directory is not inside
COREBASE.

Fixes [YOCTO #8639].

(From OE-Core master rev: 0f146e77655d153d3f9a59e489265450f08c6ad7)

(From OE-Core rev: e353b303e271368426e71810bb75173ca6f53455)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:27 +00:00
Paul Eggleton
8970ad60f5 oeqa/selftest/devtool: fix test if build directory is not inside COREBASE
Fix test_devtool_update_recipe_git to work when build directory is not
inside COREBASE.

Fixes [YOCTO #8639].

(From OE-Core master rev: 0225888207f82e5f1d9e3dffb7c342a10169aea3)

(From OE-Core rev: 16250994516ff907e18e71158aeb15e4d637de63)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:27 +00:00
Paul Eggleton
4f7fdd0a59 classes/distrodata: split SRC_URI properly before determining type
We weren't splitting SRC_URI values containing multiple URIs here; this
didn't cause any errors except when a trailing ; was left on a URI, in
which case the next URI was considered part of the parameter, which
didn't contain a = and therefore was considered invalid.

We only care about the first URI in SRC_URI in this context (since
that's the upstream URI by convention) so split it as we should and take
the first item.

Fixes [YOCTO #8645].

(From OE-Core master rev: 8e75b7e7d54e5638b42b9e7f90f2c6c17e62033f)

(From OE-Core rev: a28eba9fb03720c805eae02c3d0aebf9294e300b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:27 +00:00
Randy Witt
3b7df55075 uninative.bbclass: Choose the correct loader based on BUILD_ARCH
Previously UNINATIVE_LOADER was always ld-linux-x86-64.so.2. That is
incorrect when the host is 32-bit.

This change also changes to using ?= so the user can override
UNINATIVE_LOADER if so desired.

[YOCTO #8124]

(From OE-Core master rev: b78fa0bcadd54bb29b6f1bb3a9308d4c454bf4e2)

(From OE-Core rev: b901a3057ff511f4c8bc730b37b967a93995de2f)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:27 +00:00
Ross Burton
f3d7c3f385 openssl: sanity check that the bignum module is present
The crypto_use_bigint_in_x86-64_perl patch uses the "bigint" module to
transparently support 64-bit integers on 32-bit hosts.  Whilst bigint (part of
bignum) is a core Perl module not all distributions install it (notable Fedora
23).

As the error message when bignum isn't installed is obscure, add a task to check
that it is available and alert the user if it isn't.

[ YOCTO #8562 ]

(From OE-Core master rev: 2f9a2fbc46aa435a0a7f7662bb62029ac714f25a)

(From OE-Core rev: 7aab4744a329f5fd1aca221950ef629e9f92b456)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:27 +00:00
Li Xin
96b1b5c127 glibc: Backported a patch to fix glibc's bug(18589)
Also Fix LSB NG cases:
 * /tset/ANSI.os/locale/setlocale/T.setlocale 1 2 4 5 15
 * /tset/ANSI.os/string/strcoll_X/T.strcoll_X 1
 * /tset/LI18NUX2K.L1/base/wcscoll/T.wcscoll 1
 * /tset/LI18NUX2K.L1/utils/localedef/T.localedef 7
 * /tset/LI18NUX2K.L1/utils/sort/T.sort 1 3 17 19 33 35
 * /tset/LI18NUX2K.L1/utils/comm/T.comm 1 2
 * /tset/LI18NUX2K.L1/utils/ls-fh/T.ls-fh 2

This patch is backported from
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6c84109cfa26f35c3dfed3acb97d347361bd5849

(From OE-Core master rev: e88fe8f4c0ea70fb271d3a11e1a3bfcac4c92626)

(From OE-Core rev: 36c50bbe6592040e984af989e9841f0d38b8a1d1)

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:27 +00:00
Andre McCurdy
7aecb577e0 directfb.inc: force bfd linker for armv7a
Workaround for linker errors seen with armv7a + gold:

 | ../arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7-a -mfloat-abi=hard -mtune=cortex-a15 --sysroot=.../build/tmp/sysroots/eos -I.../build/tmp/sysroots/eos/usr/include/freetype2 -I.../build/tmp/sysroots/eos/usr/include/libpng16 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing -Werror-implicit-function-declaration -O3 -g2 -ffast-math -pipe -O2 -pipe -g -feliminate-unused-debug-types -D_GNU_SOURCE  -std=gnu99 -Werror-implicit-function-declaration  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o directfb-csource directfb-csource.o -lpng16 -ldl -lrt -lpthread
 | arm-rdk-linux-gnueabi-libtool: link: arm-rdk-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mtune=cortex-a15 --sysroot=.../build/tmp/sysroots/eos -I.../build/tmp/sysroots/eos/usr/include/freetype2 -I.../build/tmp/sysroots/eos/usr/include/libpng16 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing -Werror-implicit-function-declaration -O3 -g2 -ffast-math -pipe -O2 -pipe -g -feliminate-unused-debug-types -D_GNU_SOURCE -std=gnu99 -Werror-implicit-function-declaration -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o directfb-csource directfb-csource.o  .../build/tmp/sysroots/eos/usr/lib/libpng16.so -lz -lm -ldl -lrt -lpthread
 | .../build/tmp/sysroots/x86_64-linux/usr/bin/arm-rdk-linux-gnueabi/../../libexec/arm-rdk-linux-gnueabi/gcc/arm-rdk-linux-gnueabi/5.2.0/ld: error: directfb-csource.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
 | collect2: error: ld returned 1 exit status

(From OE-Core rev: 0f0f16d3955f1428d1691a4edfe48cf00defed21)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:26 +00:00
Martin Jansa
75ca2c8682 texinfo: don't create dependency on INHERIT variable
* we don't want the do_package signature depending on INHERIT variable
* e.g. just adding the own-mirrors causes texinfo to rebuild:
  # bitbake-diffsigs BUILD/sstate-diff/*/*/texinfo/*do_package.sig*
  basehash changed from 015df2fd8e396cc1e15622dbac843301 to 9f1d06c4f238c70a99ccb6d8da348b6a
  Variable INHERIT value changed from
  ' rm_work blacklist blacklist report-error ${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST} sanity'
  to
  ' rm_work own-mirrors blacklist blacklist report-error ${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST} sanity'

(From OE-Core rev: 9cee82c8267f8bc0cb5fa4c7313f9682edf1ce2d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:26 +00:00
Martin Jansa
02c7b3f271 package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default
* without this the do_rootfs task doesn't respect OPKGLIBDIR and
  info, status are created in different directory than opkg on
  target expects
* people who modify OPKGLIBDIR need to make sure that opkg.conf included
  in opkg package also sets info_dir and status_file options

(From OE-Core rev: 48a6d618d4b39058bf04a6cb0d8c076ae5da4013)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:26 +00:00
Ross Burton
003c94f7d9 libsdl2: require GLES when building Wayland support
The Wayland support requires GLES2 to be enabled as otherwise the EGL support
code in SDL2 isn't enabled.

| In file included from .../SDL2-2.0.3/src/video/wayland/SDL_waylandvideo.c:34:0:
| .../SDL2-2.0.3/src/video/wayland/SDL_waylandvideo.c: In function 'Wayland_CreateDevice':
| .../SDL2-2.0.3/src/video/wayland/SDL_waylandopengles.h:38:38: error: 'SDL_EGL_GetSwapInterval' undeclared (first use in this function)
|  #define Wayland_GLES_GetSwapInterval SDL_EGL_GetSwapInterval

Solve this by adding gles2 to the Wayland PACKAGECONFIG option.

(From OE-Core rev: 0f7f15ed02ec0f7b08b9ef62f6eca6c0c1e5a73f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:26 +00:00
Martin Jansa
ad6db0121f gst-plugins-bad: add PACKAGECONFIGs for voamrwbenc, voaacenc, resindvd
* allows to easily enable them and fixes:
WARNING: QA Issue: gstreamer1.0-plugins-bad: Files/directories were installed but not shipped in any package:
  /usr/share/gstreamer-1.0
  /usr/share/gstreamer-1.0/presets
  /usr/share/gstreamer-1.0/presets/GstVoAmrwbEnc.prs
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
gstreamer1.0-plugins-bad: 3 installed and not shipped files. [installed-vs-shipped]

(From OE-Core rev: 7d45881da23dca70334400f556ed198126190cea)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:26 +00:00
Martin Jansa
f0d87fea69 gstreamer1.0-plugins-good: fix PACKAGECONFIG for gudev and add one for v4l2 and libv4l2
* WARN: gstreamer1.0-plugins-good: gstreamer1.0-plugins-good-video4linux2 rdepends on libcap, but it isn't a build dependency?
  WARN: gstreamer1.0-plugins-good: gstreamer1.0-plugins-good-video4linux2 rdepends on libgudev, but it isn't a build dependency?
  WARN: gstreamer1.0-plugins-good: gstreamer1.0-plugins-good-video4linux2 rdepends on libudev, but it isn't a build dependency?
  WARN: gstreamer1.0-plugins-good: gstreamer1.0-plugins-good-video4linux2 rdepends on zlib, but it isn't a build dependency?

(From OE-Core rev: 66e32244aed8d33f1b49fbe78179f2442545c730)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:26 +00:00
Martin Jansa
35f34a61b3 gstreamer1.0-plugins-bad: fix dependencies for uvch264 PACKAGECONFIG
* ERROR: gstreamer1.0-plugins-bad: gstreamer1.0-plugins-bad-uvch264 package isn't created when building with minimal dependencies?
* ERROR: gstreamer1.0-plugins-bad: gstreamer1.0-plugins-bad-uvch264-dev package isn't created when building with minimal dependencies?

* it's because it should depend on libgudev not udev:
  configure: *** for plug-ins: uvch264 ***
  checking linux/uvcvideo.h usability... yes
  checking linux/uvcvideo.h presence... yes
  checking for linux/uvcvideo.h... yes
  checking for GST_VIDEO... yes
  checking for G_UDEV... no
  checking for LIBUSB... yes

(From OE-Core rev: 470f5ae7d9a7283a40f9dacdcc86f3b3b36fb572)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:26 +00:00
Martin Jansa
3b77e205c0 gstreamer1.0-plugins-{base,good}: update PACKAGECONFIGs
* there are new libavc1394, libiec61883, libraw1394, cdparanoia recipes in meta-multimedia

(From OE-Core rev: 9b21563448c2616792bfc411a8f2b9bb48e38a78)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:25 +00:00
Martin Jansa
e2d441275d libunwind: fix build for qemuarm
(From OE-Core rev: 481eab06645c633eba98de9f8e8632ce7a11c41b)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:25 +00:00
Martin Jansa
ef69078072 guile, mailx, gcc, opensp, gstreamer1.0-libav, libunwind: disable thumb where it fails for qemuarm
(From OE-Core rev: 0d1ea096cde4a145b0bb6efaa8fac03de74848d1)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:25 +00:00
Martin Jansa
4700e404f3 icu: force arm mode
* otherwise it triggers following ICE:
ERROR: Function failed: do_compile (log file is located at /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/temp/log.do_compile.21570)
ERROR: Logfile of failure stored in: /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/temp/log.do_compile.21570
Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_compile
| NOTE: make
| Note: rebuild with "make VERBOSE=1 " to show all compiler parameters.
| make[0]: Making `all' in `stubdata'
| make[1]: Entering directory '/OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/build/stubdata'
| make[1]: Nothing to be done for 'all'.
| make[1]: Leaving directory '/OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/build/stubdata'
| make[0]: Making `all' in `common'
| make[1]: Entering directory '/OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/build/common'
|    arm-oe-linux-gnueabi-gcc    ...  /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/icu/source/common/ubidiwrt.c
| /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/icu/source/common/ubidiwrt.c: In function 'ubidi_writeReordered_53':
| /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/icu/source/common/ubidiwrt.c:643:1: internal compiler error: in patch_jump_insn, at cfgrtl.c:1275
|  }
|  ^
| Please submit a full bug report,
| with preprocessed source if appropriate.
| See <http://gcc.gnu.org/bugs.html> for instructions.
| *** Failed compilation command follows: ----------------------------------------------------------
| arm-oe-linux-gnueabi-gcc -march=armv4t -mthumb -mthumb-interwork -mtune=arm920t --sysroot=/OE/build/shr-core/tmp-eglibc/sysroots/om-gta02 -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_ATOMIC=1 -I/OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/icu/source/common -DDEFAULT_ICU_PLUGINS="/usr/lib/icu"  -DU_ATTRIBUTE_DEPRECATED= -DU_COMMON_IMPLEMENTATION -O2 -pipe -g -feliminate-unused-debug-types -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -c -DPIC -fPIC -o ubidiwrt.o /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/icu/source/common/ubidiwrt.c
| --- ( rebuild with "make VERBOSE=1 all" to show all parameters ) --------
| /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/icu/source/config/mh-linux:44: recipe for target 'ubidiwrt.o' failed
| make[1]: *** [ubidiwrt.o] Error 1
| make[1]: Leaving directory '/OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/build/common'
| Makefile:141: recipe for target 'all-recursive' failed
| make: *** [all-recursive] Error 2
| ERROR: oe_runmake failed
| WARNING: /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/temp/run.do_compile.21570:1 exit 1 from
|   exit 1
| ERROR: Function failed: do_compile (log file is located at /OE/build/shr-core/tmp-eglibc/work/arm920tt-oe-linux-gnueabi/icu/53.1-r0/temp/log.do_compile.21570)
NOTE: recipe icu-53.1-r0: task do_compile: Failed
ERROR: Task 6803 (/OE/build/shr-core/openembedded-core/meta/recipes-support/icu/icu_53.1.bb, do_compile) failed with exit code '1'

(From OE-Core rev: 07ec50eb553a1ac8a7780223d68f83bf9c79d4d5)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:25 +00:00
Khem Raj
743ee049b8 libxcb: Add a workaround for gcc5 bug on mips
This fixes build failure for libxcb on mips

(From OE-Core master rev: cad52140997e86c6fee4938369dfce21767f1a63)

(From OE-Core rev: 175397f8ca2e9d311965ebe040b253830a98e409)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-12 08:42:25 +00:00
Christopher Larson
8a3deca4a4 bitbake: fetch: use orig localpath when calling orig method
When a mirror tarball is fetched, the original fetch method is called, which
unpacks the mirror tarball. After the original method is called, it checks the
localpath of the mirror tarball rather than the clone path, which isn't ideal,
particularly if the mirror tarball was removed due to being out of date. We
know the original fetch method will do what it needs to do to get its content
in the form it needs from the mirror tarball, so we can use its localpath
instead.

(Bitbake rev: 022fe4481dc80121abb04e8a2b357722bc806475)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-08 12:10:32 +00:00
Leonardo Sandoval
0073b234d7 yocto-bsp: Typo on the file extension
By mistake, the file initially had a wrong extension name, so changing to the
correct one.

(From meta-yocto master rev: 32c2278b8fe93429d4cfa097eefccd20157cd3b8)

(From meta-yocto rev: 4bc43893cc437e4278f7332b4486a196a7d0315d)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:55 +00:00
Scott Rifenbark
71dbbcd0c8 bsp-guide: Updated the license statement.
Changed the license statement to not be "non-commercial".

(From yocto-docs rev: 42124666b6ba2f5673807bdfc40624b79c5870de)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:55 +00:00
Anibal Limon
41f1026849 dev-manual: Correction to the KVM stuff in the runqemu commands.
Applied this patch from Anibal to correct an earlier patch.

(From yocto-docs rev: 27df743fd55735addb9d2ab1164b07381908c98a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:55 +00:00
Scott Rifenbark
38e3c6e6dd mega-manual: Added four new figures for GUI example.
Forgot to add these to the mega-manual figures folder so they
were not being found when the mega-manual was made.  This is
an issue with the tarball for jethro but will be correct for
the HTML published versions in the jethro branch.

(From yocto-docs rev: e1c9ef040ea1540f6ba84a1b40c60394cd64443f)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:54 +00:00
Scott Rifenbark
b99ec284c4 poky.ent: Fixed POKYVERSION variable.
Turns out this variable was accidentally incremented to "15.0.0"
during the release.  I did this because of skipping the YP 1.9
release.  The variable got wrapped into the tarball as the incorrect
"15.0.0".  This could be issues for anyone starting with a set
of manuals generated from the tarball release.  I updated the value
in the yocto-docs jethro branch and rebuilt the dev-manual where the
error was seven times.  Also rebuilt the mega-manual. Both corrected
versions are available on the website under the 2.0 set of manuals.

(From yocto-docs rev: 90e9495baddae9fc5a0e79410e10eaaa72f86e76)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:54 +00:00
Scott Rifenbark
c670dc77fe yocto-project-qs, ref-manual, poky.ent: CentOS Package updates
Fixes [YOCTO #8696]

Turns out the 'dnf' command is not yet supported for CentOS
as it is for Fedora, I changed the 'dnf' command back to
'yum'.  Also, there were some essential packages that needed
to be added to CentOS.  Finally, there was a slight
inconsistency in the Fedora list of essential packages and the
ones for supporting Graphics.  I had a redundant listing of
one of the packages.  I took that out of the Graphics area and
left it only in the essentials area.

(From yocto-docs rev: b9f7bcd796d33e95a1e5da9c1af167ef8cfe9f1b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:54 +00:00
Anibal Limon
b968190e84 dev-manual: Updated runqemu command options list
Since 2.0 release KVM mode does not require VHOST
enablement and a new option was added to support the
old mode.  Updated the list of runqemu command options.

(From yocto-docs rev: 2a0d7affc34ce6d018e81940106e6fe2848780ac)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:54 +00:00
Scott Rifenbark
1278753c37 toaster-manual: Removed SDKMACHINE from the json file example.
(From yocto-docs rev: ea20ff8361fe72c701b085ee82f0702ad66baa7d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:54 +00:00
Scott Rifenbark
7b25b70884 ref-manual: Updated list of supported distros.
(From yocto-docs rev: 863367fd38df2b2c80edba27b8483fda82c4e119)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:54 +00:00
Scott Rifenbark
d9423fbd54 ref-manual: Updated the GCC 5 migration section for 2.0
Added another link to Josh's porting guide.

(From yocto-docs rev: 12161bbbf75485589275b5d60ed84ed4849c5e3d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 12:13:54 +00:00
Paul Eggleton
347347ad78 bitbake: lib/bb/utils: improve edit_bblayers_conf() handling of bblayers.conf formatting
Make the following improvements to edit_bblayers_conf():

* Support ~ in BBLAYERS entries
* Handle where BBLAYERS items are added over multiple lines with +=
  instead of one single long item

Also add some comments documenting the function arguments and return
values as well as a set of bitbake-selftest tests.

(This function is used by the bitbake-layers add, remove and
layerindex-fetch subcommands, as well as devtool when adding the
workspace layer).

(Bitbake master rev: e9a0858023c7671e30cc8ebb08496304b7f26b31)

(Bitbake rev: fca41cf073469493e9dada377fc42d4b084c45c9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14 23:16:17 +00:00
Paul Eggleton
5935783f21 bitbake: lib/bb/utils: fix error in edit_metadata() when deleting first line
If you tried to delete the variable on the first line passed to
edit_metadata() this failed because the logic for trimming extra blank
lines didn't expect the list to be empty at that point - fix that bad
assumption.

(Bitbake master rev: 8bce6fefdc5c046b916588962a2b429c0f648133)

(Bitbake rev: 3fbf3f8211183ecb18938f2fc9acaa400766d9f0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14 23:16:17 +00:00
Li Zhou
7fdad70111 rpcbind: Security Advisory - rpcbind - CVE-2015-7236
rpcbind: Fix memory corruption in PMAP_CALLIT code

Use-after-free vulnerability in xprt_set_caller in rpcb_svc_com.c in
rpcbind 0.2.1 and earlier allows remote attackers to cause a denial of
service (daemon crash) via crafted packets, involving a PMAP_CALLIT
code.

The patch comes from
<http://www.openwall.com/lists/oss-security/2015/09/18/7>, and it hasn't
been in rpcbind upstream yet.

(From OE-Core master rev: cc4f62f3627f3804907e8ff9c68d9321979df32b)

(From OE-Core rev: 224bcc2ead676600bcd9e290ed23d9b2ed2f481e)

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:15 +00:00
Wenzong Fan
0cb2fa5f73 subversion: fix CVE-2015-3187
The svn_repos_trace_node_locations function in Apache Subversion before
1.7.21 and 1.8.x before 1.8.14, when path-based authorization is used,
allows remote authenticated users to obtain sensitive path information
by reading the history of a node that has been moved from a hidden path.

Patch is from:
http://subversion.apache.org/security/CVE-2015-3187-advisory.txt

(From OE-Core master rev: 6da25614edcad30fdb4bea8ff47b81ff81cdaed2)

(From OE-Core rev: e1e277bf51c6f00268358f6bf8623261b1b9bc22)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:15 +00:00
Wenzong Fan
5b52e9b086 subversion: fix CVE-2015-3184
mod_authz_svn in Apache Subversion 1.7.x before 1.7.21 and 1.8.x before
1.8.14, when using Apache httpd 2.4.x, does not properly restrict
anonymous access, which allows remote anonymous users to read hidden
files via the path name.

Patch is from:
http://subversion.apache.org/security/CVE-2015-3184-advisory.txt

(From OE-Core master rev: 29eb921ed074d86fa8d5b205a313eb3177473a63)

(From OE-Core rev: 7af7a3e692a6cd0d92768024efe32bfa7d83bc8f)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:15 +00:00
Bhuvanchandra DV
59bdde4327 linux-firmware: rtl8192cx: Add latest available firmware
Add latest available firmware binaries for RTL8192CX chipsets.
These new firmwares have been released in 2012, have been used
by the mainline kernel as preferred firmware since 3.13 and
even backported to stable branches.

(master rev: 2dc67b53d1b7c056bbbff2f90ad16ed214b57609)

(From OE-Core rev: 3671e20cb31f0a5c11939f3c5ba2d088db08e705)

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:15 +00:00
Ng, Mei Yeen
8ad2bcca49 init-install-efi: fix script for gummiboot loader
After running gummiboot loader install option, the installed target
storage device boot parameter for root=PARTUUID is empty causing boot failure.
This issue is only observed with gummiboot and not with GRUB loader.

This fix assign the rootuuid of the rootfs partition for gummiboot loader.

[YOCTO #8709]
(From OE-Core rev: 0b9f31452a65d1a8d8392b4ba9c335bd32860a6a)

Signed-off-by: Ng, Mei Yeen <mei.yeen.ng@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:15 +00:00
Ng, Mei Yeen
c3087bd977 init-install-efi: fix script for eMMC installation
Running the install option from bootloader to install image to eMMC will fail
with error:
Formatting /dev/mmcblk01 to vfat...
mkfs.fat 3.0.28 (2015-05-16)
/dev/mmcblk01: No such file or directory

This issue impacts both grub and gummiboot install option to eMMC device.
The installation failure is due to the following:
[1] Unable to partition eMMC as the partition prefix 'p' is not appended
The condition checking failed with the additional /dev/ appended with
the target device name.
[2] The partition uuid for boot, root and swap partition is not captured
for eMMC

This fix updated the condition checking and changed the variables to
reference the boot, root and swap partitions for UUID.

[YOCTO #8710]
(master rev: a7d081c3db776c8b0734942df6bf96f811f15bd3)

(From OE-Core rev: 1be316beb5c2b1e32f11ab8ec5dee68f64defb2d)

Signed-off-by: Ng, Mei Yeen <mei.yeen.ng@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:15 +00:00
Jussi Kukkonen
d2bf9fb2ca pulseaudio: Fix HDMI profile selection
On systems with two cards, the correct output profile does not get
selected automatically even in the simple case where there is one
available profile. This scenario is typical at least with HDMI audio
(which is on a separate card).

Fixes [YOCTO #8448]

(From OE-Core rev: 7d26b5f7fad5f5200f73e2a2c11874d8ccf34c59)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
Mike Crowe
0556c58bff allarch: Force TARGET_*FLAGS variable values
TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_CPPFLAGS and TARGET_LDFLAGS may
differ between MACHINEs. Since they are exported they affect task hashes
even if unused which leads to multiple variants of allarch packages
existing in sstate and bouncing in the sysroot when switching between
MACHINEs.

allarch packages shouldn't be using these variables anyway, so let's
ensure they have a fixed value in order to avoid this problem.

(Compare with 05a70ac30b37cab0952f1b9df501993a9dec70da and
14f4d016fef9d660da1e7e91aec4a0e807de59ab.)

(From OE-Core rev: 16482cf042e129e8f429bdcea9c0c9addb0e8a0b)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
Maxin B. John
e683dac7ab libsndfile: fix CVE-2014-9756
Fix divide by zero bug (CVE-2014-9756)

(From OE-Core master rev: f47cf07ab9d00ed7eddc8e867138481f7bd2bb7d)

(From OE-Core rev: 353f6d9530e9545aee5c77de348abeee9002f046)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
Armin Kuster
092757ec5b libxslt: CVE-2015-7995
This is a is being give a High rating so please consider it for
all 1.1.28 versions.

A type confusion error within the libxslt "xsltStylePreCompute()"
function in preproc.c can lead to a DoS. Confirmed in version 1.1.28,
other versions may also be affected.

(From OE-Core master rev: 0f89bbab6588a1171259801fa879516740030acb)

(From OE-Core rev: bc8b7401fa18f6a987041d7f93a1fa3512f8513c)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
Ross Burton
dab55553b2 unzip: rename patch to reflect CVE fix
(From OE-Core rev: e3d2974348bd830ec2fcf84ea08cbf38abbc0327)

(master rev: 78e05984b1)

(From OE-Core rev: 97b247a88024083ce145f9e64ac9c9a182d02d3e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
Ross Burton
1753d4a5da readline: rename patch to contain CVE reference
To help automated scanning of CVEs, put the CVE ID in the filename.

(From OE-Core master rev: 211bce4f23230c7898cccdb73b582420f830f977)

(From OE-Core rev: 6821bb42febfc5f939896b0ffbc1c00b15b9329e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
Ross Burton
9dd3422bc6 libarchive: rename patch to reflect CVE
This patch is a CVE fix, so rename it to help CVE detection tools identify it as
such.

(From OE-Core master rev: 3fd05ce1f709cbbd8fdeb1dbfdffbd39922eca6e)

(From OE-Core rev: 2cc8c8066193f851ea0ed3912dee287c2d1c5257)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
Mark Hatle
1401976a02 binutils: Fix octeon3 disassembly patch
The structure has apparently changed, and there was a missing
setting.  This corrects a segfault when disassembling code.

(From OE-Core master rev: 2e8f1ffe3a8d7740b0ac68eefbba3fe28f7ba6d4)

(From OE-Core rev: 6a6f5446303a9b0b858d153137244a5a101520ce)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
Alejandro del Castillo
a54a0dba10 opkg: add cache filename length fixes
(From OE-Core master rev: 8e53500a7c05204fc63759f456639545a022e82b)

(From OE-Core rev: 71ad09cfe9c43a113295c95a0fb0899d44f2bb7e)

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:27:14 +00:00
360 changed files with 19884 additions and 684 deletions

View File

@@ -955,7 +955,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
origud.method.download(origud, ld)
if hasattr(origud.method,"build_mirror_data"):
origud.method.build_mirror_data(origud, ld)
return ud.localpath
return origud.localpath
# Otherwise the result is a local file:// and we symlink to it
if not os.path.exists(origud.localpath):
if os.path.islink(origud.localpath):

View File

@@ -376,3 +376,206 @@ do_functionname() {
(updated, newlines) = bb.utils.edit_metadata(self._origfile.splitlines(True), varlist, handle_var)
self.assertTrue(updated, 'List should be updated but isn\'t')
self.assertEqual(newlines, newfile5.splitlines(True))
class EditBbLayersConf(unittest.TestCase):
def _test_bblayers_edit(self, before, after, add, remove, notadded, notremoved):
with tempfile.NamedTemporaryFile('w', delete=False) as tf:
tf.write(before)
tf.close()
try:
actual_notadded, actual_notremoved = bb.utils.edit_bblayers_conf(tf.name, add, remove)
with open(tf.name) as f:
actual_after = f.readlines()
self.assertEqual(after.splitlines(True), actual_after)
self.assertEqual(notadded, actual_notadded)
self.assertEqual(notremoved, actual_notremoved)
finally:
os.remove(tf.name)
def test_bblayers_remove(self):
before = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS = " \
/home/user/path/layer1 \
/home/user/path/layer2 \
/home/user/path/subpath/layer3 \
/home/user/path/layer4 \
"
"""
after = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS = " \
/home/user/path/layer1 \
/home/user/path/subpath/layer3 \
/home/user/path/layer4 \
"
"""
self._test_bblayers_edit(before, after,
None,
'/home/user/path/layer2',
[],
[])
def test_bblayers_add(self):
before = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS = " \
/home/user/path/layer1 \
/home/user/path/layer2 \
/home/user/path/subpath/layer3 \
/home/user/path/layer4 \
"
"""
after = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS = " \
/home/user/path/layer1 \
/home/user/path/layer2 \
/home/user/path/subpath/layer3 \
/home/user/path/layer4 \
/other/path/to/layer5 \
"
"""
self._test_bblayers_edit(before, after,
'/other/path/to/layer5/',
None,
[],
[])
def test_bblayers_add_remove(self):
before = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS = " \
/home/user/path/layer1 \
/home/user/path/layer2 \
/home/user/path/subpath/layer3 \
/home/user/path/layer4 \
"
"""
after = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS = " \
/home/user/path/layer1 \
/home/user/path/layer2 \
/home/user/path/layer4 \
/other/path/to/layer5 \
"
"""
self._test_bblayers_edit(before, after,
['/other/path/to/layer5', '/home/user/path/layer2/'], '/home/user/path/subpath/layer3/',
['/home/user/path/layer2'],
[])
def test_bblayers_add_remove_home(self):
before = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS = " \
~/path/layer1 \
~/path/layer2 \
~/otherpath/layer3 \
~/path/layer4 \
"
"""
after = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS = " \
~/path/layer2 \
~/path/layer4 \
~/path2/layer5 \
"
"""
self._test_bblayers_edit(before, after,
[os.environ['HOME'] + '/path/layer4', '~/path2/layer5'],
[os.environ['HOME'] + '/otherpath/layer3', '~/path/layer1', '~/path/notinlist'],
[os.environ['HOME'] + '/path/layer4'],
['~/path/notinlist'])
def test_bblayers_add_remove_plusequals(self):
before = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS += " \
/home/user/path/layer1 \
/home/user/path/layer2 \
"
"""
after = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS += " \
/home/user/path/layer2 \
/home/user/path/layer3 \
"
"""
self._test_bblayers_edit(before, after,
'/home/user/path/layer3',
'/home/user/path/layer1',
[],
[])
def test_bblayers_add_remove_plusequals2(self):
before = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS += " \
/home/user/path/layer1 \
/home/user/path/layer2 \
/home/user/path/layer3 \
"
BBLAYERS += "/home/user/path/layer4"
BBLAYERS += "/home/user/path/layer5"
"""
after = r"""
# A comment
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS += " \
/home/user/path/layer2 \
/home/user/path/layer3 \
"
BBLAYERS += "/home/user/path/layer5"
BBLAYERS += "/home/user/otherpath/layer6"
"""
self._test_bblayers_edit(before, after,
['/home/user/otherpath/layer6', '/home/user/path/layer3'], ['/home/user/path/layer1', '/home/user/path/layer4', '/home/user/path/layer7'],
['/home/user/path/layer3'],
['/home/user/path/layer7'])

View File

@@ -1177,7 +1177,7 @@ def edit_metadata(meta_lines, variables, varfunc, match_overrides=False):
if not skip:
if checkspc:
checkspc = False
if newlines[-1] == '\n' and line == '\n':
if newlines and newlines[-1] == '\n' and line == '\n':
# Squash blank line if there are two consecutive blanks after a removal
continue
newlines.append(line)
@@ -1201,7 +1201,19 @@ def edit_metadata_file(meta_file, variables, varfunc):
def edit_bblayers_conf(bblayers_conf, add, remove):
"""Edit bblayers.conf, adding and/or removing layers"""
"""Edit bblayers.conf, adding and/or removing layers
Parameters:
bblayers_conf: path to bblayers.conf file to edit
add: layer path (or list of layer paths) to add; None or empty
list to add nothing
remove: layer path (or list of layer paths) to remove; None or
empty list to remove nothing
Returns a tuple:
notadded: list of layers specified to be added but weren't
(because they were already in the list)
notremoved: list of layers that were specified to be removed
but weren't (because they weren't in the list)
"""
import fnmatch
@@ -1210,6 +1222,13 @@ def edit_bblayers_conf(bblayers_conf, add, remove):
pth = pth[:-1]
return pth
approved = bb.utils.approved_variables()
def canonicalise_path(pth):
pth = remove_trailing_sep(pth)
if 'HOME' in approved and '~' in pth:
pth = os.path.expanduser(pth)
return pth
def layerlist_param(value):
if not value:
return []
@@ -1218,49 +1237,80 @@ def edit_bblayers_conf(bblayers_conf, add, remove):
else:
return [remove_trailing_sep(value)]
notadded = []
notremoved = []
addlayers = layerlist_param(add)
removelayers = layerlist_param(remove)
# Need to use a list here because we can't set non-local variables from a callback in python 2.x
bblayercalls = []
removed = []
plusequals = False
orig_bblayers = []
def handle_bblayers_firstpass(varname, origvalue, op, newlines):
bblayercalls.append(op)
if op == '=':
del orig_bblayers[:]
orig_bblayers.extend([canonicalise_path(x) for x in origvalue.split()])
return (origvalue, None, 2, False)
def handle_bblayers(varname, origvalue, op, newlines):
bblayercalls.append(varname)
updated = False
bblayers = [remove_trailing_sep(x) for x in origvalue.split()]
if removelayers:
for removelayer in removelayers:
matched = False
for layer in bblayers:
if fnmatch.fnmatch(layer, removelayer):
if fnmatch.fnmatch(canonicalise_path(layer), canonicalise_path(removelayer)):
updated = True
matched = True
bblayers.remove(layer)
removed.append(removelayer)
break
if not matched:
notremoved.append(removelayer)
if addlayers:
if addlayers and not plusequals:
for addlayer in addlayers:
if addlayer not in bblayers:
updated = True
bblayers.append(addlayer)
else:
notadded.append(addlayer)
del addlayers[:]
if updated:
if op == '+=' and not bblayers:
bblayers = None
return (bblayers, None, 2, False)
else:
return (origvalue, None, 2, False)
edit_metadata_file(bblayers_conf, ['BBLAYERS'], handle_bblayers)
with open(bblayers_conf, 'r') as f:
(_, newlines) = edit_metadata(f, ['BBLAYERS'], handle_bblayers_firstpass)
if not bblayercalls:
raise Exception('Unable to find BBLAYERS in %s' % bblayers_conf)
# Try to do the "smart" thing depending on how the user has laid out
# their bblayers.conf file
if bblayercalls.count('+=') > 1:
plusequals = True
removelayers_canon = [canonicalise_path(layer) for layer in removelayers]
notadded = []
for layer in addlayers:
layer_canon = canonicalise_path(layer)
if layer_canon in orig_bblayers and not layer_canon in removelayers_canon:
notadded.append(layer)
notadded_canon = [canonicalise_path(layer) for layer in notadded]
addlayers[:] = [layer for layer in addlayers if canonicalise_path(layer) not in notadded_canon]
(updated, newlines) = edit_metadata(newlines, ['BBLAYERS'], handle_bblayers)
if addlayers:
# Still need to add these
for addlayer in addlayers:
newlines.append('BBLAYERS += "%s"\n' % addlayer)
updated = True
if updated:
with open(bblayers_conf, 'w') as f:
f.writelines(newlines)
notremoved = list(set(removelayers) - set(removed))
return (notadded, notremoved)

View File

@@ -5,6 +5,7 @@ from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdExcep
from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable
import os
import logging
import time
logger = logging.getLogger("ToasterScheduler")
@@ -128,6 +129,12 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options):
self.cleanup()
self.archive()
self.schedule()
while True:
try:
self.cleanup()
self.archive()
self.schedule()
except:
pass
time.sleep(1)

View File

@@ -91,6 +91,11 @@
<date>October 2015</date>
<revremark>Released with the Yocto Project 2.0 Release.</revremark>
</revision>
<revision>
<revnumber>2.0.1</revnumber>
<date>March 2016</date>
<revremark>Released with the Yocto Project 2.0.1 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -103,6 +103,11 @@
<date>October 2015</date>
<revremark>Released with the Yocto Project 2.0 Release.</revremark>
</revision>
<revision>
<revnumber>2.0.1</revnumber>
<date>March 2016</date>
<revremark>Released with the Yocto Project 2.0.1 Release.</revremark>
</revision>
</revhistory>
<copyright>
@@ -113,7 +118,7 @@
<legalnotice>
<para>
Permission is granted to copy, distribute and/or modify this document under
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
</para>
<note>
For the latest version of this manual associated with this

View File

@@ -4558,9 +4558,17 @@
option or the equivalent rootfs derived from the
<filename>-e</filename> command-line
option.
Exactly what those contents and
filesystem type end up being are dependent
on the given plugin implementation.
Exactly what those contents and filesystem type end
up being are dependent on the given plugin
implementation.
</para>
<para>If you do not use the
<filename>--source</filename> option, the
<filename>wic</filename> command creates an empty
partition.
Consequently, you must use the
<filename>--size</filename> option to specify the
size of the empty partition.
</para></listitem>
<listitem><para><emphasis><filename>--ondisk</filename> or <filename>--ondrive</filename>:</emphasis>
Forces the partition to be created on a particular
@@ -4604,6 +4612,49 @@
This option is a <filename>wic</filename>-specific
option that says to start a partition on an
x KBytes boundary.</para></listitem>
<listitem><para><emphasis><filename>--no-table</filename>:</emphasis>
This option is a <filename>wic</filename>-specific
option.
Using the option reserves space for the partition
and causes it to become populated.
However, the partition is not added to the
partition table.
</para></listitem>
<listitem><para><emphasis><filename>--extra-space</filename>:</emphasis>
This option is a <filename>wic</filename>-specific
option that adds extra space after the space
filled by the content of the partition.
The final size can go beyond the size specified
by the <filename>--size</filename> option.
The default value is 10 Mbytes.
</para></listitem>
<listitem><para><emphasis><filename>--overhead-factor</filename>:</emphasis>
This option is a <filename>wic</filename>-specific
option that multiplies the size of the partition by
the option's value.
You must supply a value greater than or equal to
"1".
The default value is "1.3".
</para></listitem>
<listitem><para><emphasis><filename>--part-type</filename>:</emphasis>
This option is a <filename>wic</filename>-specific
option that specifies the partition type globally
unique identifier (GUID) for GPT partitions.
You can find the list of partition type GUIDs
at
<ulink url='http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs'></ulink>.
</para></listitem>
<listitem><para><emphasis><filename>--use-uuid</filename>:</emphasis>
This option is a <filename>wic</filename>-specific
option that causes <filename>wic</filename> to
generate a random GUID for the partition.
The generated identifier is used in the bootloader
configuration to specify the root partition.
</para></listitem>
<listitem><para><emphasis><filename>--uuid</filename>:</emphasis>
This option is a <filename>wic</filename>-specific
option that specifies the partition UUID.
</para></listitem>
</itemizedlist>
</para>
</section>
@@ -9890,6 +9941,28 @@
Adding these statements to the configuration file ensures
that the licenses collected during package generation
are included on your image.
<note>
<para>Setting all three variables to "1" results in the
image having two copies of the same license file.
One copy resides in
<filename>/usr/share/common-licenses</filename> and
the other resides in
<filename>/usr/share/license</filename>.</para>
<para>The reason for this behavior is because
<ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></ulink>
and
<ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></ulink>
add a copy of the license when the image is built but do not
offer a path for adding licenses for newly installed packages
to an image.
<ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></ulink>
adds a separate package and an upgrade path for adding
licenses to an image.</para>
</note>
</para>
<para>
As the source archiver has already archived the original
unmodified source that contains the license files,
you would have already met the requirements for inclusion

View File

@@ -197,28 +197,40 @@
but also is not as easy to use or comprehensive
as the default.
</para></listitem>
<listitem><para><filename>kvm</filename>:
<listitem><para id='kvm-cond'><filename>kvm</filename>:
Enables KVM when running "qemux86" or "qemux86-64"
QEMU architectures.
For KVM to work, all the following conditions must be met:
<itemizedlist>
<listitem><para>
Your <replaceable>MACHINE</replaceable> must be either
"qemux86" or "qemux86-64".
qemux86" or "qemux86-64".
</para></listitem>
<listitem><para>
Your build host has to have the KVM modules
installed, which are
<filename>/dev/kvm</filename>.
</para></listitem>
<listitem><para>
Your build host has to have virtio net device, which
are <filename>/dev/vhost-net</filename>.
</para></listitem>
<listitem><para>
The build host <filename>/dev/kvm</filename>
directory has to be both writable and readable.
</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para><filename>kvm-vhost</filename>:
Enables KVM with VHOST support when running "qemux86" or "qemux86-64"
QEMU architectures.
For KVM with VHOST to work, the following conditions must
be met:
<itemizedlist>
<listitem><para>
<link linkend='kvm-cond'>kvm</link> option
conditions must be met.
</para></listitem>
<listitem><para>
Your build host has to have virtio net device, which
are <filename>/dev/vhost-net</filename>.
</para></listitem>
<listitem><para>
The build host <filename>/dev/vhost-net</filename>
directory has to be either readable or writable

View File

@@ -81,6 +81,11 @@
<date>October 2015</date>
<revremark>Released with the Yocto Project 2.0 Release.</revremark>
</revision>
<revision>
<revnumber>2.0.1</revnumber>
<date>March 2016</date>
<revremark>Released with the Yocto Project 2.0.1 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -66,6 +66,11 @@
<date>October 2015</date>
<revremark>Released with the Yocto Project 2.0 Release.</revremark>
</revision>
<revision>
<revnumber>2.0.1</revnumber>
<date>March 2016</date>
<revremark>Released with the Yocto Project 2.0.1 Release.</revremark>
</revision>
</revhistory>
<copyright>

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View File

@@ -50,6 +50,11 @@
<date>October 2015</date>
<revremark>Released with the Yocto Project 2.0 Release.</revremark>
</revision>
<revision>
<revnumber>2.0.1</revnumber>
<date>March 2016</date>
<revremark>Released with the Yocto Project 2.0.1 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -1,11 +1,12 @@
<!ENTITY DISTRO "2.0">
<!ENTITY DISTRO_COMPRESSED "20">
<!ENTITY DISTRO "2.0.1">
<!ENTITY DISTRO_COMPRESSED "201">
<!ENTITY DISTRO_NAME "jethro">
<!ENTITY YOCTO_DOC_VERSION "2.0">
<!ENTITY POKYVERSION "15.0.0">
<!ENTITY POKYVERSION_COMPRESSED "1400">
<!ENTITY YOCTO_DOC_VERSION "2.0.1">
<!ENTITY POKYVERSION "14.0.1">
<!ENTITY POKYVERSION_COMPRESSED "1401">
<!ENTITY DISTRO_NAME_NO_CAP "jethro">
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
<!ENTITY COPYRIGHT_YEAR "2010-2015">
<!ENTITY COPYRIGHT_YEAR "2010-2016">
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
@@ -67,4 +68,5 @@
<!ENTITY OPENSUSE_HOST_PACKAGES_ESSENTIAL "python gcc gcc-c++ git chrpath make wget python-xml \
diffstat makeinfo python-curses patch socat">
<!ENTITY CENTOS_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \
diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat">
diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat \
perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue">

View File

@@ -66,6 +66,11 @@
<date>October 2015</date>
<revremark>Released with the Yocto Project 2.0 Release.</revremark>
</revision>
<revision>
<revnumber>2.0.1</revnumber>
<date>March 2016</date>
<revremark>Released with the Yocto Project 2.0.1 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -254,9 +254,24 @@
<para>
When you launch your build with the
<filename>bitbake <replaceable>target</replaceable></filename> command, BitBake
sorts out the configurations to ultimately define your build
environment.
<filename>bitbake <replaceable>target</replaceable></filename>
command, BitBake sorts out the configurations to ultimately
define your build environment.
It is important to understand that the OpenEmbedded build system
reads the configuration files in a specific order:
<filename>site.conf</filename>, <filename>auto.conf</filename>,
and <filename>local.conf</filename>.
And, the build system applies the normal assignment statement
rules.
Because the files are parsed in a specific order, variable
assignments for the same variable could be affected.
For example, if the <filename>auto.conf</filename> file and
the <filename>local.conf</filename> set
<replaceable>variable1</replaceable> to different values, because
the build system parses <filename>local.conf</filename> after
<filename>auto.conf</filename>,
<replaceable>variable1</replaceable> is assigned the value from
the <filename>local.conf</filename> file.
</para>
</section>

View File

@@ -154,11 +154,14 @@
<listitem><para>Ubuntu 13.10</para></listitem> -->
<listitem><para>Ubuntu 14.04 (LTS)</para></listitem>
<listitem><para>Ubuntu 14.10</para></listitem>
<listitem><para>Ubuntu 15.04</para></listitem>
<listitem><para>Ubuntu 15.10</para></listitem>
<!-- <listitem><para>Fedora 16 (Verne)</para></listitem>
<listitem><para>Fedora 17 (Spherical)</para></listitem>
<listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
<listitem><para>Fedora release 20 (Heisenbug)</para></listitem> -->
<listitem><para>Fedora release 21</para></listitem>
<listitem><para>Fedora release 22</para></listitem>
<!-- <listitem><para>CentOS release 5.6 (Final)</para></listitem>
<listitem><para>CentOS release 5.7 (Final)</para></listitem>
<listitem><para>CentOS release 5.8 (Final)</para></listitem>
@@ -281,7 +284,7 @@
support or if you are going to use the Eclipse
IDE:
<literallayout class='monospaced'>
$ sudo dnf install SDL-devel xterm perl-Thread-Queue
$ sudo dnf install SDL-devel xterm
</literallayout></para></listitem>
<listitem><para><emphasis>Documentation:</emphasis>
Packages needed if you are going to build out the
@@ -356,14 +359,14 @@
The following list shows the required packages by function
given a supported CentOS Linux distribution:
<note>
For CentOS 6.x, some of the versions of the components
provided by the distribution are too old (e.g. Git, Python,
and tar).
It is recommended that you install the buildtools in order
to provide versions that will work with the OpenEmbedded
build system.
For information on how to install the buildtools tarball,
see the
For CentOS 6.x, some of the versions
of the components provided by the distribution are
too old (e.g. Git, Python, and tar).
It is recommended that you install the buildtools
in order to provide versions that will work with
the OpenEmbedded build system.
For information on how to install the buildtools
tarball, see the
"<link linkend='required-git-tar-and-python-versions'>Required Git, Tar, and Python Versions</link>"
section.
</note>
@@ -372,33 +375,42 @@
Packages needed to build an image for a headless
system:
<literallayout class='monospaced'>
$ sudo dnf install &CENTOS_HOST_PACKAGES_ESSENTIAL;
$ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL;
</literallayout></para></listitem>
<listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
Packages recommended if the host system has graphics
support or if you are going to use the Eclipse
IDE:
<literallayout class='monospaced'>
$ sudo dnf install SDL-devel xterm
$ sudo yum install SDL-devel xterm
</literallayout></para></listitem>
<listitem><para><emphasis>Documentation:</emphasis>
Packages needed if you are going to build out the
Yocto Project documentation manuals:
<literallayout class='monospaced'>
$ sudo dnf install make docbook-style-dsssl docbook-style-xsl \
$ sudo yum install make docbook-style-dsssl docbook-style-xsl \
docbook-dtds docbook-utils fop libxslt dblatex xmlto xsltproc
</literallayout></para></listitem>
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
Packages needed if you are going to be using the
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
<literallayout class='monospaced'>
$ sudo dnf install autoconf automake libtool glib2-devel libarchive-devel
</literallayout></para></listitem>
$ sudo yum install autoconf automake libtool glib2-devel libarchive-devel
</literallayout>
<note>
For CentOS 6.x, in order for the
ADT installer script to work, you must have
installed the <filename>liblzma5</filename>,
<filename>libarchive3.x</filename>, and
<filename>libarchive-devel-3.1.3</filename>
(or newer) packages, in that order.
</note>
</para></listitem>
<listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
Packages needed if you are going to run
<filename>oe-selftest</filename>:
<literallayout class='monospaced'>
$ sudo dnf install GitPython
$ sudo yum install GitPython
</literallayout>
</para></listitem>
</itemizedlist>

View File

@@ -2343,8 +2343,10 @@
</para>
<para>
For further details, please see
<ulink url='https://gcc.gnu.org/gcc-5/changes.html'></ulink>.
For further details, see
<ulink url='https://gcc.gnu.org/gcc-5/changes.html'></ulink> and
the porting guide at
<ulink url='https://gcc.gnu.org/gcc-5/porting_to.html'></ulink>.
</para>
<para>

View File

@@ -3225,10 +3225,10 @@
<title><filename>staging.bbclass</filename></title>
<para>
The <filename>staging</filename> class provides support for staging
files into the sysroot during the
The <filename>staging</filename> class provides the
<link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
task.
task, which stages files into the sysroot to make them available to
other recipes at build time.
The class is enabled by default because it is inherited by the
<link linkend='ref-classes-base'><filename>base</filename></link>
class.

View File

@@ -97,6 +97,11 @@
<date>October 2015</date>
<revremark>Released with the Yocto Project 2.0 Release.</revremark>
</revision>
<revision>
<revnumber>2.0.1</revnumber>
<date>March 2016</date>
<revremark>Released with the Yocto Project 2.0.1 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -2354,7 +2354,20 @@
<filename>/usr/share/common-licenses</filename>,
for each package.
The license files are placed
in directories within the image itself.
in directories within the image itself during build time.
<note>
The <filename>COPY_LIC_DIRS</filename> does not
offer a path for adding licenses for newly installed
packages to an image, which might be most suitable
for read-only filesystems that cannot be upgraded.
See the
<link linkend='var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></link>
variable for additional information.
You can also reference the
"<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
section in the Yocto Project Development Manual for
information on providing license text.
</note>
</para>
</glossdef>
</glossentry>
@@ -2369,7 +2382,20 @@
If set to "1", the OpenEmbedded build system copies
the license manifest for the image to
<filename>/usr/share/common-licenses/license.manifest</filename>
within the image itself.
within the image itself during build time.
<note>
The <filename>COPY_LIC_MANIFEST</filename> does not
offer a path for adding licenses for newly installed
packages to an image, which might be most suitable
for read-only filesystems that cannot be upgraded.
See the
<link linkend='var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></link>
variable for additional information.
You can also reference the
"<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
section in the Yocto Project Development Manual for
information on providing license text.
</note>
</para>
</glossdef>
</glossentry>
@@ -5768,32 +5794,45 @@
Specifies the complete list of supported image types
by default:
<literallayout class='monospaced'>
jffs2
jffs2.sum
cramfs
ext2
ext2.gz
ext2.bz2
ext3
ext3.gz
ext2.lzma
btrfs
live
squashfs
squashfs-xz
ubi
ubifs
tar
tar.gz
tar.bz2
tar.xz
cpio
cpio.gz
cpio.xz
cpio.lz4
cpio.lzma
cpio.xz
cramfs
elf
ext2
ext2.bz2
ext2.gz
ext2.lzma
ext3
ext3.gz
ext4
ext4.gz
hdddirect
hddimg
iso
jffs2
jffs2.sum
multiubi
qcow2
squashfs
squashfs-lzo
squashfs-xz
tar
tar.bz2
tar.gz
tar.lz4
tar.xz
ubi
ubifs
vdi
vmdk
elf
wic
wic.bz2
wic.gz
wic.lzma
</literallayout>
</para>
@@ -7166,6 +7205,49 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-LICENSE_CREATE_PACKAGE'><glossterm>LICENSE_CREATE_PACKAGE</glossterm>
<info>
LICENSE_CREATE_PACKAGE[doc] = "Creates an extra package (i.e. ${PN}-lic) for each recipe and adds that package to the RRECOMMENDS+${PN}."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Setting <filename>LICENSE_CREATE_PACKAGE</filename>
to "1" causes the OpenEmbedded build system to create
an extra package (i.e.
<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-lic</filename>)
for each recipe and to add those packages to the
<link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link><filename>_${PN}</filename>.
</para>
<para>
The <filename>${PN}-lic</filename> package installs a
directory in <filename>/usr/share/licenses</filename>
named <filename>${PN}</filename>, which is the recipe's
base name, and installs files in that directory that
contain license and copyright information (i.e. copies of
the appropriate license files from
<filename>meta/common-licenses</filename> that match the
licenses specified in the
<link linkend='var-LICENSE'><filename>LICENSE</filename></link>
variable of the recipe metadata and copies of files marked
in
<link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>
as containing license text).
</para>
<para>
For related information on providing license text, see the
<link linkend='var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></link>
variable, the
<link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
variable, and the
"<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
section in the Yocto Project Development Manual.
</para>
</glossdef>
</glossentry>
<glossentry id='var-LICENSE_FLAGS'><glossterm>LICENSE_FLAGS</glossterm>
<info>
LICENSE_FLAGS[doc] = "Specifies additional flags for a recipe you must whitelist through LICENSE_FLAGS_WHITELIST in order to allow the recipe to be built."
@@ -10544,6 +10626,20 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
</literallayout>
</para>
<para>
This next example assumes a Git repository.
By default, Git repositories are cloned to
<filename>${WORKDIR}/git</filename> during
<link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>.
Since this path is different from the default value of
<filename>S</filename>, you must set it specifically
so the source can be located:
<literallayout class='monospaced'>
SRC_URI = "git://path/to/repo.git"
S = "${WORKDIR}/git"
</literallayout>
</para>
</glossdef>
</glossentry>

View File

@@ -662,7 +662,6 @@
"IMAGE_FSTYPES": "ext3 jffs2 tar.bz2",
"IMAGE_INSTALL_append": "",
"PACKAGE_CLASSES": "package_rpm",
"SDKMACHINE" : "x86_64"
},
</literallayout>
</para>

View File

@@ -318,6 +318,7 @@
'PASSWORD': 'yourpasswordhere',
'HOST': 'localhost',
'PORT': '3306',
}
}
</literallayout>
</para></listitem>
@@ -347,7 +348,7 @@
server defined earlier:
<literallayout class='monospaced'>
$ mysql -u root -p
mysql> CREATE DATABASE toaster;
mysql> CREATE DATABASE toaster_data;
mysql> CREATE USER 'toaster'@'localhost' identified by 'yourpasswordhere';
mysql> GRANT all on toaster_data.* to 'toaster'@'localhost';
mysql> quit
@@ -358,9 +359,9 @@
default data, and gather the statically-served files:
<literallayout class='monospaced'>
$ cd /var/www/toaster/poky/
$ ./bitbake/lib/toaster/manage.py syncdb --migrate
$ ./bitbake/lib/toaster/manage.py loadconf ./meta-yocto/conf/toasterconf.json
$ ./bitbake/lib/toaster/manage.py lsupdates
$ ./bitbake/lib/toaster/manage.py syncdb
$ ./bitbake/lib/toaster/manage.py migrate
$ TOASTER_DIR=`pwd` TOASTER_CONF=./meta-yocto/conf/toasterconf.json ./bitbake/lib/toaster/manage.py checksettings
$ ./bitbake/lib/toaster/manage.py collectstatic
</literallayout>
</para>
@@ -368,33 +369,41 @@
<para>
For the above set of commands, after moving to the
<filename>poky</filename> directory,
the <filename>syncdb</filename> command with the
<filename>migrate</filename> option makes sure the database
the <filename>syncdb</filename> and <filename>migrate</filename>
commands ensure the database
schema has had changes propagated correctly (i.e.
migrations).
See the
<ulink url='https://south.readthedocs.org/en/latest/commands.html#syncdb'><filename>syncdb</filename></ulink>
command for more information.
</para>
<para>
The
<link linkend='toaster-command-loadconf'><filename>loadconf</filename></link>
command loads the
<filename>./meta-yocto/conf/toasterconf.json</filename>
JSON file.
The next line sets the Toaster root directory
<filename>TOASTER_DIR</filename> and the location of
the Toaster configuration file
<filename>TOASTER_CONF</filename>, which is
relative to the Toaster root directory
<filename>TOASTER_DIR</filename>.
For more information on the Toaster configuration file
<filename>TOASTER_CONF</filename>, see the
<link linkend='toaster-json-files'>JSON Files</link>
section of this manual.
</para>
<para>
The <filename>lsupdates</filename> command fetches
information about machines, recipes and
layers available as part of OpenEmbedded.
The information is fetched from the
<ulink url='http://layers.openembedded.org/'>OpenEmbedded Metadata Index</ulink>.
This information provides easy access to metadata
from Toaster, and it is key for Toaster's usability.
It is not recommended that you use Toaster without
fetching this information."
This line also runs the <filename>checksettings</filename>
command, which configures the location of the Toaster
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build directory</ulink>.
The Toaster root directory <filename>TOASTER_DIR</filename>
determines where the Toaster build directory
is created on the file system.
In the example above,
<filename>TOASTER_DIR</filename> is set as follows:
<literallayout class="monospaced">
/var/www/toaster/poky
</literallayout>
This setting causes the Toaster build directory to be:
<literallayout class="monospaced">
/var/www/toaster/poky/build
</literallayout>
</para>
<para>
@@ -402,8 +411,6 @@
is a Django framework command that collects all the
statically served files into a designated directory to
be served up by the Apache web server.
For more information on this Django command, see
<ulink url='https://docs.djangoproject.com/en/1.7/ref/contrib/staticfiles/'></ulink>.
</para></listitem>
<listitem><para>
Add an Apache configuration file for Toaster to your Apache web
@@ -438,6 +445,7 @@
<literallayout class='monospaced'>
$ sudo a2enmod wsgi
$ sudo a2enconf toaster
$ chmod +x bitbake/lib/toaster/toastermain/wsgi.py
</literallayout>
Finally, restart Apache to make sure all new configuration
is loaded.

View File

@@ -41,6 +41,11 @@
<date>October 2015</date>
<revremark>Released with the Yocto Project 2.0 Release.</revremark>
</revision>
<revision>
<revnumber>2.0.1</revnumber>
<date>March 2016</date>
<revremark>Released with the Yocto Project 2.0.1 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -2,32 +2,32 @@
# This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
# This is the old way that did it. Can't do that now that we have "bitbake-user-manual" strings
# in the mega-manual.
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
# Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
# it is not included in the mega-manual.
# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
# This was the one-liner that worked before we introduced the BitBake User Manual, which is
# not in the mega-manual.
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/toaster-manual\/toaster-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/toaster-manual\/toaster-manual.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
# Process cases where just an external manual is referenced without an id anchor
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/toaster-manual\/toaster-manual.html\" target=\"_top\">Toaster User Manual<\/a>/Toaster User Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0.1\/toaster-manual\/toaster-manual.html\" target=\"_top\">Toaster User Manual<\/a>/Toaster User Manual/g

View File

@@ -318,7 +318,7 @@
</para></listitem>
<listitem><para><emphasis>CentOS</emphasis>
<literallayout class='monospaced'>
$ sudo dnf install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
$ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
</literallayout>
<note>
CentOS 6.x users need to ensure that the required
@@ -587,7 +587,7 @@
</orderedlist>
</para>
<para>
<para id='qs-minnowboard-example'>
The following steps show how easy it is to set up to build an
image for a new machine.
These steps build an image for the MinnowBoard MAX, which is
@@ -610,16 +610,35 @@
Building an image for the MinnowBoard MAX requires the
<filename>meta-intel</filename> layer.
Use the <filename>git clone</filename> command to create
a local copy of the repository:
a local copy of the repository inside your
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
which is <filename>poky</filename> in this example:
<literallayout class='monospaced'>
$ cd $HOME/poky
$ git clone git://git.yoctoproject.org/meta-intel
Cloning into 'meta-intel'...
remote: Counting objects: 10824, done.
remote: Compressing objects: 100% (3508/3508), done.
remote: Total 10824 (delta 6219), reused 10580 (delta 5975)
Receiving objects: 100% (10824/10824), 2.72 MiB | 482.00 KiB/s, done.
Resolving deltas: 100% (6219/6219), done.
remote: Counting objects: 11988, done.
remote: Compressing objects: 100% (3884/3884), done.
Receiving objects: 100% (11988/11988), 2.93 MiB | 2.51 MiB/s, done.
remote: Total 11988 (delta 6881), reused 11752 (delta 6645)
Resolving deltas: 100% (6881/6881), done.
Checking connectivity... done.
</literallayout>
By default when you clone a Git repository, the
"master" branch is checked out.
Before you build your image that uses the
<filename>meta-intel</filename> layer, you must be
sure that both repositories
(<filename>meta-intel</filename> and
<filename>poky</filename>) are using the same releases.
Consequently, you need to checkout out the
"&DISTRO_NAME_NO_CAP;" release after cloning
<filename>meta-intel</filename>:
<literallayout class='monospaced'>
$ cd $HOME/poky/meta-intel
$ git checkout &DISTRO_NAME_NO_CAP;
Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin.
Switched to a new branch '&DISTRO_NAME_NO_CAP;'
</literallayout>
</para></listitem>
<listitem><para><emphasis>Configure the Build:</emphasis>
@@ -639,7 +658,8 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
variable.
<literallayout class='monospaced'>
$ bitbake-layers add-layer "$HOME/source/poky/meta-intel"
$ cd $HOME/poky/build
$ bitbake-layers add-layer "$HOME/poky/meta-intel"
$ echo 'MACHINE = "intel-corei7-64"' >> conf/local.conf
</literallayout>
<note><title>Notes</title>

View File

@@ -13,7 +13,7 @@ XSERVER ?= "${XSERVER_X86_BASE} \
${XSERVER_X86_MODESETTING} \
"
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d eee-acpi-scripts"
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware eee-acpi-scripts"
GLIBC_ADDONS = "nptl"

View File

@@ -7,8 +7,8 @@ KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
KMACHINE_genericx86 ?= "common-pc"
KMACHINE_genericx86-64 ?= "common-pc-64"
SRCREV_machine_genericx86 ?= "af1f7f586bd32d39c057f17606991b887eadb389"
SRCREV_machine_genericx86-64 ?= "578602a722dbfb260801f3b37c6eafd2abb2340d"
SRCREV_machine_genericx86 ?= "d9bf859dfae6f88b88b157119c20ae4d5e51420a"
SRCREV_machine_genericx86-64 ?= "93b2b800d85c1565af7d96f3776dc38c85ae1902"
SRCREV_machine_edgerouter ?= "578602a722dbfb260801f3b37c6eafd2abb2340d"
SRCREV_machine_beaglebone ?= "578602a722dbfb260801f3b37c6eafd2abb2340d"
SRCREV_machine_mpc8315e-rdb ?= "1cb1bbaf63cecc918cf36c89819a7464af4c4b13"
@@ -18,3 +18,6 @@ COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
COMPATIBLE_MACHINE_edgerouter = "edgerouter"
COMPATIBLE_MACHINE_beaglebone = "beaglebone"
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
LINUX_VERSION_genericx86 = "3.14.39"
LINUX_VERSION_genericx86-64 = "3.14.39"

View File

@@ -7,8 +7,8 @@ KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
KMACHINE_genericx86 ?= "common-pc"
KMACHINE_genericx86-64 ?= "common-pc-64"
SRCREV_machine_genericx86 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
SRCREV_machine_genericx86-64 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
SRCREV_machine_genericx86 ?= "1583bf79b946cd5581d84d8c369b819a5ecb94b4"
SRCREV_machine_genericx86-64 ?= "1583bf79b946cd5581d84d8c369b819a5ecb94b4"
SRCREV_machine_edgerouter ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
SRCREV_machine_beaglebone ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
SRCREV_machine_mpc8315e-rdb ?= "2893f3e8ece72f6f47329714d6afe4c9c545bbf9"

View File

@@ -7,8 +7,8 @@ KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
KMACHINE_genericx86 ?= "common-pc"
KMACHINE_genericx86-64 ?= "common-pc-64"
SRCREV_machine_genericx86 ?= "dbe692d91c8e55d1430f2c45fd578c8e4e71e482"
SRCREV_machine_genericx86-64 ?= "dbe692d91c8e55d1430f2c45fd578c8e4e71e482"
SRCREV_machine_genericx86 ?= "2e0ac7b6c4e3ada23a84756287e9b7051ace939a"
SRCREV_machine_genericx86-64 ?= "2e0ac7b6c4e3ada23a84756287e9b7051ace939a"
SRCREV_machine_edgerouter ?= "79a31b9d23db126f8a6be3eb88fd683056a213f1"
SRCREV_machine_beaglebone ?= "efb6ffb2ca96a364f916c9890ad023fc595e0e6e"
SRCREV_machine_mpc8315e-rdb ?= "79a31b9d23db126f8a6be3eb88fd683056a213f1"
@@ -18,3 +18,6 @@ COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
COMPATIBLE_MACHINE_edgerouter = "edgerouter"
COMPATIBLE_MACHINE_beaglebone = "beaglebone"
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
LINUX_VERSION_genericx86 = "4.1.17"
LINUX_VERSION_genericx86-64 = "4.1.17"

View File

@@ -1,6 +1,6 @@
DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "2.0"
DISTRO_VERSION = "2.0.2"
DISTRO_CODENAME = "jethro"
SDK_VENDOR = "-pokysdk"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
@@ -64,10 +64,7 @@ https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master
CONNECTIVITY_CHECK_URIS ?= " \
https://eula-downloads.yoctoproject.org/index.php \
http://bugzilla.yoctoproject.org/report.cgi"
CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
SANITY_TESTED_DISTROS ?= " \
poky-1.7 \n \

View File

@@ -225,11 +225,12 @@ BB_DISKMON_DIRS = "\
# Qemu configuration
#
# By default qemu will build with a builtin VNC server where graphical output can be
# seen. The two lines below enable the SDL backend too. This assumes there is a
# libsdl library available on your build system.
# seen. The two lines below enable the SDL backend too. By default libsdl-native will
# be built, if you want to use your host's libSDL instead of the minimal libsdl built
# by libsdl-native then uncomment the ASSUME_PROVIDED line below.
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
ASSUME_PROVIDED += "libsdl-native"
#ASSUME_PROVIDED += "libsdl-native"
# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to

View File

@@ -27,6 +27,10 @@ python () {
d.setVar("PACKAGE_EXTRA_ARCHS", "")
d.setVar("SDK_ARCH", "none")
d.setVar("SDK_CC_ARCH", "none")
d.setVar("TARGET_CPPFLAGS", "none")
d.setVar("TARGET_CFLAGS", "none")
d.setVar("TARGET_CXXFLAGS", "none")
d.setVar("TARGET_LDFLAGS", "none")
# Avoid this being unnecessarily different due to nuances of
# the target machine that aren't important for "all" arch

View File

@@ -77,16 +77,20 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
${@append_libtool_sysroot(d)}"
CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking"
AUTOTOOLS_SCRIPT_PATH ?= "${S}"
CONFIGURE_SCRIPT ?= "${AUTOTOOLS_SCRIPT_PATH}/configure"
AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}"
oe_runconf () {
cfgscript="${S}/configure"
cfgscript="${CONFIGURE_SCRIPT}"
if [ -x "$cfgscript" ] ; then
bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
set +e
${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
if [ "$?" != "0" ]; then
echo "Configure failed. The contents of all config.log files follows to aid debugging"
find ${S} -ignore_readdir_race -name config.log -print -exec cat {} \;
find ${B} -ignore_readdir_race -name config.log -print -exec cat {} \;
die "oe_runconf failed"
fi
set -e
@@ -95,8 +99,6 @@ oe_runconf () {
fi
}
AUTOTOOLS_AUXDIR ?= "${S}"
CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
autotools_preconfigure() {
@@ -134,7 +136,7 @@ do_configure[postfuncs] += "autotools_postconfigure"
ACLOCALDIR = "${B}/aclocal-copy"
python autotools_copy_aclocals () {
s = d.getVar("S", True)
s = d.getVar("AUTOTOOLS_SCRIPT_PATH", True)
if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"):
if not d.getVar("AUTOTOOLS_COPYACLOCAL", False):
return
@@ -228,13 +230,13 @@ autotools_do_configure() {
( for ac in `find ${S} -ignore_readdir_race -name configure.in -o -name configure.ac`; do
rm -f `dirname $ac`/configure
done )
if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then
if [ -e ${AUTOTOOLS_SCRIPT_PATH}/configure.in -o -e ${AUTOTOOLS_SCRIPT_PATH}/configure.ac ]; then
olddir=`pwd`
cd ${S}
cd ${AUTOTOOLS_SCRIPT_PATH}
ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/"
if [ x"${acpaths}" = xdefault ]; then
acpaths=
for i in `find ${S} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
for i in `find ${AUTOTOOLS_SCRIPT_PATH} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
grep -v 'acinclude.m4' | grep -v 'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
acpaths="$acpaths -I $i"
done
@@ -265,21 +267,20 @@ autotools_do_configure() {
bbnote Executing glib-gettextize --force --copy
echo "no" | glib-gettextize --force --copy
fi
else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
elif grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
# We'd call gettextize here if it wasn't so broken...
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
if [ -d ${S}/po/ ]; then
cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
if [ ! -e ${S}/po/remove-potcdate.sin ]; then
cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/
fi
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
if [ -d ${S}/po/ ]; then
cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
if [ ! -e ${S}/po/remove-potcdate.sin ]; then
cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/
fi
for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do
for j in `find ${S} -ignore_readdir_race -name $i | grep -v aclocal-copy`; do
rm $j
done
done
fi
for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do
for j in `find ${S} -ignore_readdir_race -name $i | grep -v aclocal-copy`; do
rm $j
done
done
fi
mkdir -p m4
if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
@@ -290,7 +291,7 @@ autotools_do_configure() {
ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
cd $olddir
fi
if [ -e ${S}/configure ]; then
if [ -e ${CONFIGURE_SCRIPT} ]; then
oe_runconf
else
bbnote "nothing to configure"

View File

@@ -363,7 +363,10 @@ python () {
newappends.append(a)
elif a.startswith("virtual/"):
subs = a.split("/", 1)[1]
newappends.append("virtual/" + prefix + subs + extension)
if subs.startswith(prefix):
newappends.append(a + extension)
else:
newappends.append("virtual/" + prefix + subs + extension)
else:
if a.startswith(prefix):
newappends.append(a + extension)

View File

@@ -121,6 +121,8 @@ build_boot_dd() {
# done in blocks, thus the mod by 16 instead of 32.
BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
# Remove it since mkdosfs would fail when it exists
rm -f $HDDIMG
mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS
mcopy -i $HDDIMG -s $HDDDIR/* ::/

View File

@@ -521,7 +521,7 @@ POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed_sdk_targ
POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed_sdk_host ;\
buildhistory_get_sdk_installed_host ; "
SDK_POSTPROCESS_COMMAND += "buildhistory_get_sdkinfo ; "
SDK_POSTPROCESS_COMMAND_append = " buildhistory_get_sdkinfo ; "
def buildhistory_get_build_id(d):
if d.getVar('BB_WORKERCONTEXT', True) != '1':

View File

@@ -271,9 +271,9 @@ python do_checkpkg() {
from bb.fetch2 import FetchError, NoMethodError, decodeurl
"""first check whether a uri is provided"""
src_uri = d.getVar('SRC_URI', True)
src_uri = (d.getVar('SRC_URI', True) or '').split()
if src_uri:
uri_type, _, _, _, _, _ = decodeurl(src_uri)
uri_type, _, _, _, _, _ = decodeurl(src_uri[0])
else:
uri_type = "none"

View File

@@ -170,15 +170,38 @@ IMAGE_CMD_ubi () {
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
WKS_FILE ?= "${IMAGE_BASENAME}.${MACHINE}.wks"
WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l for l in '${BBPATH}:${COREBASE}'.split(':'))}"
WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(), '${WKS_SEARCH_PATH}') or ''}"
def wks_search(files, search_path):
for f in files:
if os.path.isabs(f):
if os.path.exists(f):
return f
else:
searched = bb.utils.which(search_path, f)
if searched:
return searched
IMAGE_CMD_wic () {
out=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}
wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.${MACHINE}.wks
[ -e $wks ] || wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.wks
[ -e $wks ] || bbfatal "Kiskstart file $wks doesn't exist"
BUILDDIR=${TOPDIR} wic create $wks --vars ${STAGING_DIR_TARGET}/imgdata/ -e ${IMAGE_BASENAME} -o $out/
mv $out/build/${IMAGE_BASENAME}*.direct $out.rootfs.wic
rm -rf $out/
out="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}"
wks="${WKS_FULL_PATH}"
if [ -z "$wks" ]; then
bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
fi
BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR_TARGET}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"
mv "$out/build/$(basename "${wks%.wks}")"*.direct "$out.rootfs.wic"
rm -rf "$out/"
}
IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
# Rebuild when the wks file or vars in WICVARS change
USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${COMPRESSIONTYPES}'.split()), '1', '', d)}"
do_rootfs[file-checksums] += "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
do_rootfs[vardeps] += "${@bb.utils.contains("USING_WIC", "1", "${WICVARS}", "", d)}"
EXTRA_IMAGECMD = ""

View File

@@ -22,5 +22,5 @@ COMPRESS_CMD_bz2.u-boot = "${COMPRESS_CMD_bz2}; oe_mkimage ${IMAGE_NAME}.ro
COMPRESS_DEPENDS_lzma.u-boot = "u-boot-mkimage-native"
COMPRESS_CMD_lzma.u-boot = "${COMPRESS_CMD_lzma}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.lzma lzma clean"
IMAGE_TYPES += "ext2.u-boot ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot"
IMAGE_TYPES += "ext2.u-boot ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot cpio.gz.u-boot"

View File

@@ -184,11 +184,18 @@ do_kernel_checkout() {
source_dir=`echo ${S} | sed 's%/$%%'`
source_workdir="${WORKDIR}/git"
if [ -d "${WORKDIR}/git/" ]; then
# case: git repository (bare or non-bare)
# case: git repository
# if S is WORKDIR/git, then we shouldn't be moving or deleting the tree.
if [ "${source_dir}" != "${source_workdir}" ]; then
rm -rf ${S}
mv ${WORKDIR}/git ${S}
if [ -d "${source_workdir}/.git" ]; then
# regular git repository with .git
rm -rf ${S}
mv ${WORKDIR}/git ${S}
else
# create source for bare cloned git repository
git clone ${WORKDIR}/git ${S}
rm -rf ${WORKDIR}/git
fi
fi
cd ${S}
else

View File

@@ -185,6 +185,18 @@ def copy_license_files(lic_files_paths, destdir):
os.remove(dst)
if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev):
os.link(src, dst)
try:
os.chown(dst,0,0)
except OSError as err:
import errno
if err.errno in (errno.EPERM, errno.EINVAL):
# Suppress "Operation not permitted" error, as
# sometimes this function is not executed under pseudo.
# Also ignore "Invalid argument" errors that happen in
# some (unprivileged) container environments (no root).
pass
else:
raise
else:
shutil.copyfile(src, dst)
except Exception as e:
@@ -474,6 +486,7 @@ do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; license_create_manifest; "
do_rootfs[recrdeptask] += "do_populate_lic"
do_populate_lic_setscene[dirs] = "${LICSSTATEDIR}/${PN}"
do_populate_lic_setscene[cleandirs] = "${LICSSTATEDIR}"

View File

@@ -65,19 +65,19 @@ def base_get_metadata_svn_revision(path, d):
return revision
def base_get_metadata_git_branch(path, d):
import subprocess
import bb.process
try:
return subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"],
cwd=path).strip()
except:
return "<unknown>"
rev, _ = bb.process.run('git rev-parse --abbrev-ref HEAD', cwd=path)
except bb.process.ExecutionError:
rev = '<unknown>'
return rev.strip()
def base_get_metadata_git_revision(path, d):
import subprocess
import bb.process
try:
return subprocess.check_output(["git", "rev-parse", "HEAD"],
cwd=path).strip()
except:
return "<unknown>"
rev, _ = bb.process.run('git rev-parse HEAD', cwd=path)
except bb.process.ExecutionError:
rev = '<unknown>'
return rev.strip()

View File

@@ -51,7 +51,7 @@ python copy_buildsystem () {
core_meta_subdir = ''
# Copy in all metadata layers + bitbake (as repositories)
buildsystem = oe.copy_buildsystem.BuildSystem(d)
buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d)
baseoutpath = d.getVar('SDK_OUTPUT', True) + '/' + d.getVar('SDKPATH', True)
layers_copied = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers')
@@ -155,7 +155,7 @@ python copy_buildsystem () {
f.write('NATIVELSBSTRING_forcevariable = "%s"\n\n' % fixedlsbstring)
# Ensure locked sstate cache objects are re-used without error
f.write('SIGGEN_LOCKEDSIGS_CHECK_LEVEL = "warn"\n\n')
f.write('SIGGEN_LOCKEDSIGS_CHECK_LEVEL = "none"\n\n')
# If you define a sdk_extraconf() function then it can contain additional config
extraconf = (d.getVar('sdk_extraconf', True) or '').strip()
@@ -187,10 +187,7 @@ python copy_buildsystem () {
}
def extsdk_get_buildtools_filename(d):
# This is somewhat of a hack
localdata = bb.data.createCopy(d)
localdata.setVar('PN', 'buildtools-tarball')
return localdata.expand('${SDK_NAME}-buildtools-nativesdk-standalone-*.sh')
return '*-buildtools-nativesdk-standalone-*.sh'
install_tools() {
install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}
@@ -222,7 +219,7 @@ SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
sdk_ext_postinst() {
printf "\nExtracting buildtools...\n"
cd $target_sdk_dir
printf "buildtools\ny" | ./*buildtools-nativesdk-standalone* > /dev/null
printf "buildtools\ny" | ./*buildtools-nativesdk-standalone* > /dev/null || ( printf 'ERROR: buildtools installation failed\n' ; exit 1 )
# Make sure when the user sets up the environment, they also get
# the buildtools-tarball tools in their path.
@@ -249,7 +246,8 @@ sdk_ext_postinst() {
# dash which is /bin/sh on Ubuntu will not preserve the
# current working directory when first ran, nor will it set $1 when
# sourcing a script. That is why this has to look so ugly.
sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && $target_sdk_dir/ext-sdk-prepare.sh $target_sdk_dir '${SDK_TARGETS}' >> preparing_build_system.log 2>&1" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; }
LOGFILE="$target_sdk_dir/preparing_build_system.log"
sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && $target_sdk_dir/ext-sdk-prepare.sh $target_sdk_dir '${SDK_TARGETS}' >> $LOGFILE 2>&1" || { echo "ERROR: SDK preparation failed: see $LOGFILE"; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
fi
rm -f $target_sdk_dir/ext-sdk-prepare.sh
echo done
@@ -260,6 +258,11 @@ SDK_POST_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_postinst}"
SDK_POSTPROCESS_COMMAND_prepend_task-populate-sdk-ext = "copy_buildsystem; install_tools; "
fakeroot python do_populate_sdk_ext() {
# FIXME hopefully we can remove this restriction at some point, but uninative
# currently forces this upon us
if d.getVar('SDK_ARCH', True) != d.getVar('BUILD_ARCH', True):
bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH', True), d.getVar('BUILD_ARCH', True)))
bb.build.exec_func("do_populate_sdk", d)
}

View File

@@ -32,6 +32,7 @@ toolchain_create_sdk_env_script () {
echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script
echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script
echo "export PYTHONHOME=$sdkpathnative$prefix" >> $script
echo 'unset command_not_found_handle' >> $script
toolchain_shared_env_script
}

View File

@@ -1,6 +1,6 @@
NATIVELSBSTRING = "universal"
UNINATIVE_LOADER = "${STAGING_DIR_NATIVE}/lib/ld-linux-x86-64.so.2"
UNINATIVE_LOADER ?= "${@bb.utils.contains('BUILD_ARCH', 'x86_64', '${STAGING_DIR_NATIVE}/lib/ld-linux-x86-64.so.2', '${STAGING_DIR_NATIVE}/lib/ld-linux.so.2', d)}"
addhandler uninative_eventhandler
uninative_eventhandler[eventmask] = "bb.event.BuildStarted"

View File

@@ -20,7 +20,7 @@ AVAILTUNES += "corei7-32"
TUNE_FEATURES_tune-corei7-32 = "${TUNE_FEATURES_tune-x86} corei7"
BASE_LIB_tune-corei7-32 = "lib"
TUNE_PKGARCH_tune-corei7-32 = "corei7-32"
PACKAGE_EXTRA_ARCHS_tune-corei7-32 = "${PACKAGE_EXTRA_ARCHS_tune-core2} corei7-32"
PACKAGE_EXTRA_ARCHS_tune-corei7-32 = "${PACKAGE_EXTRA_ARCHS_tune-core2-32} corei7-32"
AVAILTUNES += "corei7-64"
TUNE_FEATURES_tune-corei7-64 = "${TUNE_FEATURES_tune-x86-64} corei7"

View File

@@ -101,9 +101,9 @@ fi
if [ "$SDK_EXTENSIBLE" = "1" ]; then
# We're going to be running the build system, additional restrictions apply
if echo "$target_sdk_dir" | grep -q '[+\ @]'; then
if echo "$target_sdk_dir" | grep -q '[+\ @$]'; then
echo "The target directory path ($target_sdk_dir) contains illegal" \
"characters such as spaces, @ or +. Abort!"
"characters such as spaces, @, \$ or +. Abort!"
exit 1
fi
else
@@ -169,9 +169,20 @@ echo "done"
printf "Setting it up..."
# fix environment paths
real_env_setup_script=""
for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
if grep -q 'OECORE_NATIVE_SYSROOT=' $env_setup_script; then
# Handle custom env setup scripts that are only named
# environment-setup-* so that they have relocation
# applied - what we want beyond here is the main one
# rather than the one that simply sorts last
real_env_setup_script="$env_setup_script"
fi
$SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $env_setup_script
done
if [ -n "$real_env_setup_script" ] ; then
env_setup_script="$real_env_setup_script"
fi
@SDK_POST_INSTALL_COMMAND@

View File

@@ -14,8 +14,9 @@ def _smart_copy(src, dest):
shutil.copymode(src, dest)
class BuildSystem(object):
def __init__(self, d):
def __init__(self, context, d):
self.d = d
self.context = context
self.layerdirs = d.getVar('BBLAYERS', True).split()
def copy_bitbake_and_layers(self, destdir):
@@ -38,7 +39,7 @@ class BuildSystem(object):
if os.path.exists(layerconf):
with open(layerconf, 'r') as f:
if f.readline().startswith("# ### workspace layer auto-generated by devtool ###"):
bb.warn("Skipping local workspace layer %s" % layer)
bb.plain("NOTE: Excluding local workspace layer %s from %s" % (layer, self.context))
continue
# If the layer was already under corebase, leave it there

View File

@@ -1471,6 +1471,16 @@ class OpkgPM(PackageManager):
self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
arch))
if self.opkg_dir != '/var/lib/opkg':
# There is no command line option for this anymore, we need to add
# info_dir and status_file to config file, if OPKGLIBDIR doesn't have
# the default value of "/var/lib" as defined in opkg:
# libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
# libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
def _create_config(self):
with open(self.config_file, "w+") as config_file:
priority = 1
@@ -1486,6 +1496,15 @@ class OpkgPM(PackageManager):
config_file.write("src oe-%s file:%s\n" %
(arch, pkgs_dir))
if self.opkg_dir != '/var/lib/opkg':
# There is no command line option for this anymore, we need to add
# info_dir and status_file to config file, if OPKGLIBDIR doesn't have
# the default value of "/var/lib" as defined in opkg:
# libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
# libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
def insert_feeds_uris(self):
if self.feed_uris == "":
return

View File

@@ -383,14 +383,15 @@ class GitApplyTree(PatchTree):
reporoot = (runcmd("git rev-parse --show-toplevel".split(), self.dir) or '').strip()
if not reporoot:
raise Exception("Cannot get repository root for directory %s" % self.dir)
commithook = os.path.join(reporoot, '.git', 'hooks', 'commit-msg')
commithook_backup = commithook + '.devtool-orig'
applyhook = os.path.join(reporoot, '.git', 'hooks', 'applypatch-msg')
applyhook_backup = applyhook + '.devtool-orig'
if os.path.exists(commithook):
shutil.move(commithook, commithook_backup)
if os.path.exists(applyhook):
shutil.move(applyhook, applyhook_backup)
hooks_dir = os.path.join(reporoot, '.git', 'hooks')
hooks_dir_backup = hooks_dir + '.devtool-orig'
if os.path.lexists(hooks_dir_backup):
raise Exception("Git hooks backup directory already exists: %s" % hooks_dir_backup)
if os.path.lexists(hooks_dir):
shutil.move(hooks_dir, hooks_dir_backup)
os.mkdir(hooks_dir)
commithook = os.path.join(hooks_dir, 'commit-msg')
applyhook = os.path.join(hooks_dir, 'applypatch-msg')
with open(commithook, 'w') as f:
# NOTE: the formatting here is significant; if you change it you'll also need to
# change other places which read it back
@@ -439,12 +440,9 @@ class GitApplyTree(PatchTree):
os.remove(tmpfile)
return output
finally:
os.remove(commithook)
os.remove(applyhook)
if os.path.exists(commithook_backup):
shutil.move(commithook_backup, commithook)
if os.path.exists(applyhook_backup):
shutil.move(applyhook_backup, applyhook)
shutil.rmtree(hooks_dir)
if os.path.lexists(hooks_dir_backup):
shutil.move(hooks_dir_backup, hooks_dir)
class QuiltTree(PatchSet):

View File

@@ -582,7 +582,7 @@ class DevtoolTests(DevtoolBase):
# Now try with auto mode
runCmd('cd %s; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, os.path.basename(recipefile)))
result = runCmd('devtool update-recipe %s' % testrecipe)
result = runCmd('git rev-parse --show-toplevel')
result = runCmd('git rev-parse --show-toplevel', cwd=os.path.dirname(recipefile))
topleveldir = result.output.strip()
relpatchpath = os.path.join(os.path.relpath(os.path.dirname(recipefile), topleveldir), testrecipe)
expected_status = [(' M', os.path.relpath(recipefile, topleveldir)),

View File

@@ -46,10 +46,11 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append += "file://appendtest.txt"
"""
layerappend = "BBLAYERS += \"COREBASE/meta-layertest0 COREBASE/meta-layertest1 COREBASE/meta-layertest2\""
layerappend = ''
def tearDownLocal(self):
ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/.."))
if self.layerappend:
ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
@testcase(1196)
def test_layer_appends(self):
@@ -79,7 +80,9 @@ SRC_URI_append += "file://appendtest.txt"
with open(layer + "/recipes-test/layerappendtest/appendtest.txt", "w") as f:
f.write("Layer 2 test")
self.track_for_cleanup(layer)
ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/.."))
self.layerappend = "BBLAYERS += \"{0}/meta-layertest0 {0}/meta-layertest1 {0}/meta-layertest2\"".format(corebase)
ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
bitbake("layerappendtest")
data = ftools.read_file(stagingdir + "/appendtest.txt")
self.assertEqual(data, "Layer 2 test")

View File

@@ -0,0 +1,59 @@
From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
From: Hector Marco-Gisbert <hecmargi@upv.es>
Date: Wed, 16 Dec 2015 07:57:18 +0300
Subject: [PATCH] Fix security issue when reading username and password
This patch fixes two integer underflows at:
* grub-core/lib/crypto.c
* grub-core/normal/auth.c
CVE-2015-8370
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
Also-By: Andrey Borzenkov <arvidjaar@gmail.com>
Upstream-Status: Backport
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432e109771bb8febafca7a5f1f2
CVE: CVE-2015-8370
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
grub-core/lib/crypto.c | 3 ++-
grub-core/normal/auth.c | 7 +++++--
2 files changed, 7 insertions(+), 3 deletions(-)
Index: git/grub-core/lib/crypto.c
===================================================================
--- git.orig/grub-core/lib/crypto.c
+++ git/grub-core/lib/crypto.c
@@ -458,7 +458,8 @@ grub_password_get (char buf[], unsigned
if (key == '\b')
{
- cur_len--;
+ if (cur_len)
+ cur_len--;
continue;
}
Index: git/grub-core/normal/auth.c
===================================================================
--- git.orig/grub-core/normal/auth.c
+++ git/grub-core/normal/auth.c
@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned
if (key == '\b')
{
- cur_len--;
- grub_printf ("\b");
+ if (cur_len)
+ {
+ cur_len--;
+ grub_printf ("\b");
+ }
continue;
}

View File

@@ -27,6 +27,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
file://grub2-fix-initrd-size-bug.patch \
file://CVE-2015-8370.patch \
"
DEPENDS = "flex-native bison-native xz"

View File

@@ -0,0 +1,278 @@
From 8259daad7242ab2af8731681177ef7e948a15ece Mon Sep 17 00:00:00 2001
From: Mark Andrews <marka@isc.org>
Date: Mon, 16 Nov 2015 13:12:20 +1100
Subject: [PATCH] 4260. [security] Insufficient testing when parsing a
message allowed records with an incorrect class to be
be accepted, triggering a REQUIRE failure when those
records were subsequently cached. (CVE-2015-8000) [RT
#4098]
(cherry picked from commit c8821d124c532e0a65752b378f924d4259499fd3)
(cherry picked from commit 3a4c24c4a52d4a2d21d2decbde3d4e514e27d51c)
Upstream-Status: Backport
https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=commit;h=8259daad7242ab2af8731681177ef7e948a15ece
CVE: CVE-2015-8000
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
CHANGES | 5 +++++
bin/tests/system/start.pl | 5 ++++-
doc/arm/notes.xml | 9 +++++++++
lib/dns/include/dns/message.h | 13 +++++++++++--
lib/dns/message.c | 45 ++++++++++++++++++++++++++++++++++++++-----
lib/dns/resolver.c | 9 +++++++++
lib/dns/xfrin.c | 2 ++
7 files changed, 80 insertions(+), 8 deletions(-)
Index: bind-9.10.2-P4/bin/tests/system/start.pl
===================================================================
--- bind-9.10.2-P4.orig/bin/tests/system/start.pl
+++ bind-9.10.2-P4/bin/tests/system/start.pl
@@ -68,6 +68,7 @@ my $NAMED = $ENV{'NAMED'};
my $LWRESD = $ENV{'LWRESD'};
my $DIG = $ENV{'DIG'};
my $PERL = $ENV{'PERL'};
+my $PYTHON = $ENV{'PYTHON'};
# Start the server(s)
@@ -213,7 +214,9 @@ sub start_server {
$pid_file = "lwresd.pid";
} elsif ($server =~ /^ans/) {
$cleanup_files = "{ans.run}";
- if (-e "$testdir/$server/ans.pl") {
+ if (-e "$testdir/$server/ans.py") {
+ $command = "$PYTHON ans.py 10.53.0.$' 5300";
+ } elsif (-e "$testdir/$server/ans.pl") {
$command = "$PERL ans.pl";
} else {
$command = "$PERL $topdir/ans.pl 10.53.0.$'";
Index: bind-9.10.2-P4/doc/arm/notes.xml
===================================================================
--- bind-9.10.2-P4.orig/doc/arm/notes.xml
+++ bind-9.10.2-P4/doc/arm/notes.xml
@@ -62,6 +62,15 @@
<itemizedlist>
<listitem>
<para>
+ Insufficient testing when parsing a message allowed
+ records with an incorrect class to be be accepted,
+ triggering a REQUIRE failure when those records
+ were subsequently cached. This flaw is disclosed
+ in CVE-2015-8000. [RT #4098]
+ </para>
+ </listitem>
+ <listitem>
+ <para>
An incorrect boundary check in the OPENPGPKEY rdatatype
could trigger an assertion failure. This flaw is disclosed
in CVE-2015-5986. [RT #40286]
Index: bind-9.10.2-P4/lib/dns/include/dns/message.h
===================================================================
--- bind-9.10.2-P4.orig/lib/dns/include/dns/message.h
+++ bind-9.10.2-P4/lib/dns/include/dns/message.h
@@ -15,8 +15,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id$ */
-
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
@@ -221,6 +219,8 @@ struct dns_message {
unsigned int free_saved : 1;
unsigned int sitok : 1;
unsigned int sitbad : 1;
+ unsigned int tkey : 1;
+ unsigned int rdclass_set : 1;
unsigned int opt_reserved;
unsigned int sig_reserved;
@@ -1400,6 +1400,15 @@ dns_message_buildopt(dns_message_t *msg,
* \li other.
*/
+void
+dns_message_setclass(dns_message_t *msg, dns_rdataclass_t rdclass);
+/*%<
+ * Set the expected class of records in the response.
+ *
+ * Requires:
+ * \li msg be a valid message with parsing intent.
+ */
+
ISC_LANG_ENDDECLS
#endif /* DNS_MESSAGE_H */
Index: bind-9.10.2-P4/lib/dns/message.c
===================================================================
--- bind-9.10.2-P4.orig/lib/dns/message.c
+++ bind-9.10.2-P4/lib/dns/message.c
@@ -439,6 +439,8 @@ msginit(dns_message_t *m) {
m->free_saved = 0;
m->sitok = 0;
m->sitbad = 0;
+ m->tkey = 0;
+ m->rdclass_set = 0;
m->querytsig = NULL;
}
@@ -1091,13 +1093,19 @@ getquestions(isc_buffer_t *source, dns_m
* If this class is different than the one we already read,
* this is an error.
*/
- if (msg->state == DNS_SECTION_ANY) {
- msg->state = DNS_SECTION_QUESTION;
+ if (msg->rdclass_set == 0) {
msg->rdclass = rdclass;
+ msg->rdclass_set = 1;
} else if (msg->rdclass != rdclass)
DO_FORMERR;
/*
+ * Is this a TKEY query?
+ */
+ if (rdtype == dns_rdatatype_tkey)
+ msg->tkey = 1;
+
+ /*
* Can't ask the same question twice.
*/
result = dns_message_find(name, rdclass, rdtype, 0, NULL);
@@ -1241,12 +1249,12 @@ getsection(isc_buffer_t *source, dns_mes
* If there was no question section, we may not yet have
* established a class. Do so now.
*/
- if (msg->state == DNS_SECTION_ANY &&
+ if (msg->rdclass_set == 0 &&
rdtype != dns_rdatatype_opt && /* class is UDP SIZE */
rdtype != dns_rdatatype_tsig && /* class is ANY */
rdtype != dns_rdatatype_tkey) { /* class is undefined */
msg->rdclass = rdclass;
- msg->state = DNS_SECTION_QUESTION;
+ msg->rdclass_set = 1;
}
/*
@@ -1256,7 +1264,7 @@ getsection(isc_buffer_t *source, dns_mes
if (msg->opcode != dns_opcode_update
&& rdtype != dns_rdatatype_tsig
&& rdtype != dns_rdatatype_opt
- && rdtype != dns_rdatatype_dnskey /* in a TKEY query */
+ && rdtype != dns_rdatatype_key /* in a TKEY query */
&& rdtype != dns_rdatatype_sig /* SIG(0) */
&& rdtype != dns_rdatatype_tkey /* Win2000 TKEY */
&& msg->rdclass != dns_rdataclass_any
@@ -1264,6 +1272,16 @@ getsection(isc_buffer_t *source, dns_mes
DO_FORMERR;
/*
+ * If this is not a TKEY query/response then the KEY
+ * record's class needs to match.
+ */
+ if (msg->opcode != dns_opcode_update && !msg->tkey &&
+ rdtype == dns_rdatatype_key &&
+ msg->rdclass != dns_rdataclass_any &&
+ msg->rdclass != rdclass)
+ DO_FORMERR;
+
+ /*
* Special type handling for TSIG, OPT, and TKEY.
*/
if (rdtype == dns_rdatatype_tsig) {
@@ -1377,6 +1395,10 @@ getsection(isc_buffer_t *source, dns_mes
skip_name_search = ISC_TRUE;
skip_type_search = ISC_TRUE;
issigzero = ISC_TRUE;
+ } else {
+ if (msg->rdclass != dns_rdataclass_any &&
+ msg->rdclass != rdclass)
+ DO_FORMERR;
}
} else
covers = 0;
@@ -1625,6 +1647,7 @@ dns_message_parse(dns_message_t *msg, is
msg->counts[DNS_SECTION_ADDITIONAL] = isc_buffer_getuint16(source);
msg->header_ok = 1;
+ msg->state = DNS_SECTION_QUESTION;
/*
* -1 means no EDNS.
@@ -3706,3 +3729,15 @@ dns_message_buildopt(dns_message_t *mess
dns_message_puttemprdatalist(message, &rdatalist);
return (result);
}
+
+void
+dns_message_setclass(dns_message_t *msg, dns_rdataclass_t rdclass) {
+
+ REQUIRE(DNS_MESSAGE_VALID(msg));
+ REQUIRE(msg->from_to_wire == DNS_MESSAGE_INTENTPARSE);
+ REQUIRE(msg->state == DNS_SECTION_ANY);
+ REQUIRE(msg->rdclass_set == 0);
+
+ msg->rdclass = rdclass;
+ msg->rdclass_set = 1;
+}
Index: bind-9.10.2-P4/lib/dns/resolver.c
===================================================================
--- bind-9.10.2-P4.orig/lib/dns/resolver.c
+++ bind-9.10.2-P4/lib/dns/resolver.c
@@ -7309,6 +7309,8 @@ resquery_response(isc_task_t *task, isc_
goto done;
}
+ dns_message_setclass(message, fctx->res->rdclass);
+
if ((options & DNS_FETCHOPT_TCP) == 0) {
if ((options & DNS_FETCHOPT_NOEDNS0) == 0)
dns_adb_setudpsize(fctx->adb, query->addrinfo,
@@ -7391,6 +7393,13 @@ resquery_response(isc_task_t *task, isc_
&dns_master_style_comment,
ISC_LOG_DEBUG(10),
fctx->res->mctx);
+
+ if (message->rdclass != fctx->res->rdclass) {
+ resend = ISC_TRUE;
+ FCTXTRACE("bad class");
+ goto done;
+ }
+
/*
* Process receive opt record.
*/
Index: bind-9.10.2-P4/lib/dns/xfrin.c
===================================================================
--- bind-9.10.2-P4.orig/lib/dns/xfrin.c
+++ bind-9.10.2-P4/lib/dns/xfrin.c
@@ -1225,6 +1225,8 @@ xfrin_recv_done(isc_task_t *task, isc_ev
msg->tsigctx = xfr->tsigctx;
xfr->tsigctx = NULL;
+ dns_message_setclass(msg, xfr->rdclass);
+
if (xfr->nmsg > 0)
msg->tcp_continuation = 1;
Index: bind-9.10.2-P4/CHANGES
===================================================================
--- bind-9.10.2-P4.orig/CHANGES
+++ bind-9.10.2-P4/CHANGES
@@ -1,4 +1,9 @@
- --- 9.10.2-P4 released ---
+4260. [security] Insufficient testing when parsing a message allowed
+ records with an incorrect class to be be accepted,
+ triggering a REQUIRE failure when those records
+ were subsequently cached. (CVE-2015-8000) [RT #4098]
+
+ --- 9.10.2-P4 released ---
4170. [security] An incorrect boundary check in the OPENPGPKEY
rdatatype could trigger an assertion failure.

View File

@@ -0,0 +1,44 @@
From adbf81335b67be0cebdcf9f1f4fcb38ef4814f4d Mon Sep 17 00:00:00 2001
From: Mark Andrews <marka@isc.org>
Date: Thu, 25 Jun 2015 18:36:27 +1000
Subject: [PATCH] 4146. [bug] Address reference leak that could
prevent a clean shutdown. [RT #37125]
Upstream-Status: Backport
https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=commit;h=adbf81335b67be0cebdcf9f1f4fcb38ef4814f4d
CVE: CVE-2015-8461
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
CHANGES | 3 +++
lib/dns/resolver.c | 5 +++++
2 files changed, 8 insertions(+)
Index: bind-9.10.2-P4/CHANGES
===================================================================
--- bind-9.10.2-P4.orig/CHANGES
+++ bind-9.10.2-P4/CHANGES
@@ -1,3 +1,6 @@
+4146. [bug] Address reference leak that could prevent a clean
+ shutdown. [RT #37125]
+
4260. [security] Insufficient testing when parsing a message allowed
records with an incorrect class to be be accepted,
triggering a REQUIRE failure when those records
Index: bind-9.10.2-P4/lib/dns/resolver.c
===================================================================
--- bind-9.10.2-P4.orig/lib/dns/resolver.c
+++ bind-9.10.2-P4/lib/dns/resolver.c
@@ -1649,6 +1649,11 @@ fctx_query(fetchctx_t *fctx, dns_adbaddr
if (query->dispatch != NULL)
dns_dispatch_detach(&query->dispatch);
+ LOCK(&res->buckets[fctx->bucketnum].lock);
+ INSIST(fctx->references > 1);
+ fctx->references--;
+ UNLOCK(&res->buckets[fctx->bucketnum].lock);
+
cleanup_query:
if (query->connects == 0) {
query->magic = 0;

View File

@@ -0,0 +1,28 @@
a buffer size check can cause denial of service under certain circumstances
[security]
The following flaw in BIND was reported by ISC:
A buffer size check used to guard against overflow could cause named to exit with an INSIST failure In apl_42.c.
A server could exit due to an INSIST failure in apl_42.c when performing certain string formatting operations.
Upstream-Status: Backport
CVE: CVE-2015-8704
[The patch is taken from BIND 9.10.3:
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-8704]
Signed-off-by: Derek Straka <derek@asterius.io>
diff --git a/lib/dns/rdata/in_1/apl_42.c b/lib/dns/rdata/in_1/apl_42.c
index bedd38e..28eb7f2 100644
--- a/lib/dns/rdata/in_1/apl_42.c
+++ b/lib/dns/rdata/in_1/apl_42.c
@@ -116,7 +116,7 @@ totext_in_apl(ARGS_TOTEXT) {
isc_uint8_t len;
isc_boolean_t neg;
unsigned char buf[16];
- char txt[sizeof(" !64000")];
+ char txt[sizeof(" !64000:")];
const char *sep = "";
int n;

View File

@@ -0,0 +1,44 @@
a crash or assertion failure can during format processing
[security]
The following flaw in BIND was reported by ISC:
In versions of BIND 9.10, errors can occur when OPT pseudo-RR data or ECS options are formatted to text. In 9.10.3 through 9.10.3-P2, the issue may result in a REQUIRE assertion failure in buffer.c.
This issue can affect both authoritative and recursive servers if they are performing debug logging. (It may also crash related tools which use the same code, such as dig or delv.)
A server could exit due to an INSIST failure in apl_42.c when performing certain string formatting operations.
Upstream-Status: Backport
CVE: CVE-2015-8705
[The patch is taken from BIND 9.10.3:
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-8705]
Signed-off-by: Derek Straka <derek@asterius.io>
diff --git a/lib/dns/message.c b/lib/dns/message.c
index ea7b93a..810c58e 100644
--- a/lib/dns/message.c
+++ b/lib/dns/message.c
@@ -3310,9 +3310,19 @@
} else if (optcode == DNS_OPT_SIT) {
ADD_STRING(target, "; SIT");
} else if (optcode == DNS_OPT_CLIENT_SUBNET) {
+ isc_buffer_t ecsbuf;
ADD_STRING(target, "; CLIENT-SUBNET: ");
- render_ecs(&optbuf, target);
- ADD_STRING(target, "\n");
+ isc_buffer_init(&ecsbuf,
+ isc_buffer_current(&optbuf),
+ optlen);
+ isc_buffer_add(&ecsbuf, optlen);
+ result = render_ecs(&ecsbuf, target);
+ if (result == ISC_R_NOSPACE)
+ return (result);
+ if (result == ISC_R_SUCCESS) {
+ isc_buffer_forward(&optbuf, optlen);
+ ADD_STRING(target, "\n");
+ }
continue;
} else if (optcode == DNS_OPT_EXPIRE) {
if (optlen == 4) {

View File

@@ -0,0 +1,138 @@
From e7e15d1302b26a96fa0a5307d6f2cb0d8ad4ea63 Mon Sep 17 00:00:00 2001
From: Mark Andrews <marka@isc.org>
Date: Thu, 18 Feb 2016 12:11:27 +1100
Subject: [PATCH] 4318. [security] Malformed control messages can
trigger assertions in named and rndc. (CVE-2016-1285) [RT #41666]
(cherry picked from commit a2b15b3305acd52179e6f3dc7d073b07fbc40b8e)
Hand applied Changelog changes.
CVE: CVE-2016-1285
Upstream-Status: Backport
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
---
diff -ruN a/bin/named/control.c b/bin/named/control.c
--- a/bin/named/control.c 2015-08-15 02:28:49.000000000 +0200
+++ b/bin/named/control.c 2016-04-11 09:38:20.940827528 +0200
@@ -69,7 +69,7 @@
#endif
data = isccc_alist_lookup(message, "_data");
- if (data == NULL) {
+ if (!isccc_alist_alistp(data)) {
/*
* No data section.
*/
diff -ruN a/bin/named/controlconf.c b/bin/named/controlconf.c
--- a/bin/named/controlconf.c 2015-08-15 02:28:49.000000000 +0200
+++ b/bin/named/controlconf.c 2016-04-11 09:38:20.944827355 +0200
@@ -402,7 +402,7 @@
* Limit exposure to replay attacks.
*/
_ctrl = isccc_alist_lookup(request, "_ctrl");
- if (_ctrl == NULL) {
+ if (!isccc_alist_alistp(_ctrl)) {
log_invalid(&conn->ccmsg, ISC_R_FAILURE);
goto cleanup_request;
}
diff -ruN a/bin/rndc/rndc.c b/bin/rndc/rndc.c
--- a/bin/rndc/rndc.c 2015-08-15 02:28:49.000000000 +0200
+++ b/bin/rndc/rndc.c 2016-04-11 09:38:20.944827355 +0200
@@ -254,8 +254,8 @@
isccc_cc_fromwire(&source, &response, algorithm, &secret));
data = isccc_alist_lookup(response, "_data");
- if (data == NULL)
- fatal("no data section in response");
+ if (!isccc_alist_alistp(data))
+ fatal("bad or missing data section in response");
result = isccc_cc_lookupstring(data, "err", &errormsg);
if (result == ISC_R_SUCCESS) {
failed = ISC_TRUE;
@@ -320,8 +320,8 @@
isccc_cc_fromwire(&source, &response, algorithm, &secret));
_ctrl = isccc_alist_lookup(response, "_ctrl");
- if (_ctrl == NULL)
- fatal("_ctrl section missing");
+ if (!isccc_alist_alistp(_ctrl))
+ fatal("bad or missing ctrl section in response");
nonce = 0;
if (isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS)
nonce = 0;
diff -ruN a/CHANGES b/CHANGES
--- a/CHANGES 2016-04-11 09:36:08.546578759 +0200
+++ b/CHANGES 2016-04-11 09:39:59.356552273 +0200
@@ -1,3 +1,6 @@
+4318. [security] Malformed control messages can trigger assertions
+ in named and rndc. (CVE-2016-1285) [RT #41666]
+
4146. [bug] Address reference leak that could prevent a clean
shutdown. [RT #37125]
diff -ruN a/lib/isccc/cc.c b/lib/isccc/cc.c
--- a/lib/isccc/cc.c 2015-08-15 02:28:49.000000000 +0200
+++ b/lib/isccc/cc.c 2016-04-11 09:38:20.944827355 +0200
@@ -403,13 +403,13 @@
* Extract digest.
*/
_auth = isccc_alist_lookup(alist, "_auth");
- if (_auth == NULL)
+ if (!isccc_alist_alistp(_auth))
return (ISC_R_FAILURE);
if (algorithm == ISCCC_ALG_HMACMD5)
hmac = isccc_alist_lookup(_auth, "hmd5");
else
hmac = isccc_alist_lookup(_auth, "hsha");
- if (hmac == NULL)
+ if (!isccc_sexpr_binaryp(hmac))
return (ISC_R_FAILURE);
/*
* Compute digest.
@@ -728,7 +728,7 @@
REQUIRE(ackp != NULL && *ackp == NULL);
_ctrl = isccc_alist_lookup(message, "_ctrl");
- if (_ctrl == NULL ||
+ if (!isccc_alist_alistp(_ctrl) ||
isccc_cc_lookupuint32(_ctrl, "_ser", &serial) != ISC_R_SUCCESS ||
isccc_cc_lookupuint32(_ctrl, "_tim", &t) != ISC_R_SUCCESS)
return (ISC_R_FAILURE);
@@ -773,7 +773,7 @@
isccc_sexpr_t *_ctrl;
_ctrl = isccc_alist_lookup(message, "_ctrl");
- if (_ctrl == NULL)
+ if (!isccc_alist_alistp(_ctrl))
return (ISC_FALSE);
if (isccc_cc_lookupstring(_ctrl, "_ack", NULL) == ISC_R_SUCCESS)
return (ISC_TRUE);
@@ -786,7 +786,7 @@
isccc_sexpr_t *_ctrl;
_ctrl = isccc_alist_lookup(message, "_ctrl");
- if (_ctrl == NULL)
+ if (!isccc_alist_alistp(_ctrl))
return (ISC_FALSE);
if (isccc_cc_lookupstring(_ctrl, "_rpl", NULL) == ISC_R_SUCCESS)
return (ISC_TRUE);
@@ -806,7 +806,7 @@
_ctrl = isccc_alist_lookup(message, "_ctrl");
_data = isccc_alist_lookup(message, "_data");
- if (_ctrl == NULL || _data == NULL ||
+ if (!isccc_alist_alistp(_ctrl) || !isccc_alist_alistp(_data) ||
isccc_cc_lookupuint32(_ctrl, "_ser", &serial) != ISC_R_SUCCESS ||
isccc_cc_lookupstring(_data, "type", &type) != ISC_R_SUCCESS)
return (ISC_R_FAILURE);
@@ -995,7 +995,7 @@
isccc_sexpr_t *_ctrl;
_ctrl = isccc_alist_lookup(message, "_ctrl");
- if (_ctrl == NULL ||
+ if (!isccc_alist_alistp(_ctrl) ||
isccc_cc_lookupstring(_ctrl, "_ser", &_ser) != ISC_R_SUCCESS ||
isccc_cc_lookupstring(_ctrl, "_tim", &_tim) != ISC_R_SUCCESS)
return (ISC_R_FAILURE);

View File

@@ -0,0 +1,79 @@
From 456e1eadd2a3a2fb9617e60d4db90ef4ba7c6ba3 Mon Sep 17 00:00:00 2001
From: Mukund Sivaraman <muks@isc.org>
Date: Mon, 22 Feb 2016 12:22:43 +0530
Subject: [PATCH] Fix resolver assertion failure due to improper DNAME handling
(CVE-2016-1286) (#41753)
(cherry picked from commit 5995fec51cc8bb7e53804e4936e60aa1537f3673)
Hand applied Changelog changes.
CVE: CVE-2016-1286
Upstream-Status: Backport
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
---
diff -ruN a/CHANGES b/CHANGES
--- a/CHANGES 2016-04-11 09:46:42.075057394 +0200
+++ b/CHANGES 2016-04-11 09:44:21.857148819 +0200
@@ -1,3 +1,7 @@
+4319. [security] Fix resolver assertion failure due to improper
+ DNAME handling when parsing fetch reply messages.
+ (CVE-2016-1286) [RT #41753]
+
4318. [security] Malformed control messages can trigger assertions
in named and rndc. (CVE-2016-1285) [RT #41666]
diff -ruN a/lib/dns/resolver.c b/lib/dns/resolver.c
--- a/lib/dns/resolver.c 2016-04-11 09:36:08.550578585 +0200
+++ b/lib/dns/resolver.c 2016-04-11 09:43:23.091701714 +0200
@@ -6634,21 +6634,26 @@
isc_boolean_t found_dname = ISC_FALSE;
dns_name_t *dname_name;
+ /*
+ * Only pass DNAME or RRSIG(DNAME).
+ */
+ if (rdataset->type != dns_rdatatype_dname &&
+ (rdataset->type != dns_rdatatype_rrsig ||
+ rdataset->covers != dns_rdatatype_dname))
+ continue;
+
+ /*
+ * If we're not chaining, then the DNAME and
+ * its signature should not be external.
+ */
+ if (!chaining && external) {
+ log_formerr(fctx, "external DNAME");
+ return (DNS_R_FORMERR);
+ }
+
found = ISC_FALSE;
aflag = 0;
if (rdataset->type == dns_rdatatype_dname) {
- /*
- * We're looking for something else,
- * but we found a DNAME.
- *
- * If we're not chaining, then the
- * DNAME should not be external.
- */
- if (!chaining && external) {
- log_formerr(fctx,
- "external DNAME");
- return (DNS_R_FORMERR);
- }
found = ISC_TRUE;
want_chaining = ISC_TRUE;
POST(want_chaining);
@@ -6677,9 +6682,7 @@
&fctx->domain)) {
return (DNS_R_SERVFAIL);
}
- } else if (rdataset->type == dns_rdatatype_rrsig
- && rdataset->covers ==
- dns_rdatatype_dname) {
+ } else {
/*
* We've found a signature that
* covers the DNAME.

View File

@@ -0,0 +1,318 @@
From 499952eb459c9a41d2092f1d98899c131f9103b2 Mon Sep 17 00:00:00 2001
From: Mark Andrews <marka@isc.org>
Date: Mon, 29 Feb 2016 07:16:48 +1100
Subject: [PATCH] Part 2 of: 4319.[security] Fix resolver assertion
failure due to improper DNAME handling when parsing fetch reply messages.
(CVE-2016-1286) [RT #41753]
(cherry picked from commit 2de89ee9de8c8da9dc153a754b02dcdbb7fe2374)
CVE: CVE-2016-1286 [part 2]
Upstream-Status: Backport
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
---
lib/dns/resolver.c | 192 ++++++++++++++++++++++++++---------------------------
1 file changed, 93 insertions(+), 99 deletions(-)
diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
index 23d636b..fbc0af0 100644
--- a/lib/dns/resolver.c
+++ b/lib/dns/resolver.c
@@ -6088,14 +6088,11 @@ cname_target(dns_rdataset_t *rdataset, dns_name_t *tname) {
}
static inline isc_result_t
-dname_target(fetchctx_t *fctx, dns_rdataset_t *rdataset, dns_name_t *qname,
- dns_name_t *oname, dns_fixedname_t *fixeddname)
+dname_target(dns_rdataset_t *rdataset, dns_name_t *qname,
+ unsigned int nlabels, dns_fixedname_t *fixeddname)
{
isc_result_t result;
dns_rdata_t rdata = DNS_RDATA_INIT;
- unsigned int nlabels;
- int order;
- dns_namereln_t namereln;
dns_rdata_dname_t dname;
dns_fixedname_t prefix;
@@ -6110,21 +6107,6 @@ dname_target(fetchctx_t *fctx, dns_rdataset_t *rdataset, dns_name_t *qname,
if (result != ISC_R_SUCCESS)
return (result);
- /*
- * Get the prefix of qname.
- */
- namereln = dns_name_fullcompare(qname, oname, &order, &nlabels);
- if (namereln != dns_namereln_subdomain) {
- char qbuf[DNS_NAME_FORMATSIZE];
- char obuf[DNS_NAME_FORMATSIZE];
-
- dns_rdata_freestruct(&dname);
- dns_name_format(qname, qbuf, sizeof(qbuf));
- dns_name_format(oname, obuf, sizeof(obuf));
- log_formerr(fctx, "unrelated DNAME in answer: "
- "%s is not in %s", qbuf, obuf);
- return (DNS_R_FORMERR);
- }
dns_fixedname_init(&prefix);
dns_name_split(qname, nlabels, dns_fixedname_name(&prefix), NULL);
dns_fixedname_init(fixeddname);
@@ -6750,13 +6732,13 @@ static isc_result_t
answer_response(fetchctx_t *fctx) {
isc_result_t result;
dns_message_t *message;
- dns_name_t *name, *qname, tname, *ns_name;
+ dns_name_t *name, *dname, *qname, tname, *ns_name;
dns_rdataset_t *rdataset, *ns_rdataset;
isc_boolean_t done, external, chaining, aa, found, want_chaining;
isc_boolean_t have_answer, found_cname, found_type, wanted_chaining;
unsigned int aflag;
dns_rdatatype_t type;
- dns_fixedname_t dname, fqname;
+ dns_fixedname_t fdname, fqname;
dns_view_t *view;
FCTXTRACE("answer_response");
@@ -6784,10 +6766,15 @@ answer_response(fetchctx_t *fctx) {
view = fctx->res->view;
result = dns_message_firstname(message, DNS_SECTION_ANSWER);
while (!done && result == ISC_R_SUCCESS) {
+ dns_namereln_t namereln;
+ int order;
+ unsigned int nlabels;
+
name = NULL;
dns_message_currentname(message, DNS_SECTION_ANSWER, &name);
external = ISC_TF(!dns_name_issubdomain(name, &fctx->domain));
- if (dns_name_equal(name, qname)) {
+ namereln = dns_name_fullcompare(qname, name, &order, &nlabels);
+ if (namereln == dns_namereln_equal) {
wanted_chaining = ISC_FALSE;
for (rdataset = ISC_LIST_HEAD(name->list);
rdataset != NULL;
@@ -6912,10 +6899,11 @@ answer_response(fetchctx_t *fctx) {
*/
INSIST(!external);
if (aflag ==
- DNS_RDATASETATTR_ANSWER)
+ DNS_RDATASETATTR_ANSWER) {
have_answer = ISC_TRUE;
- name->attributes |=
- DNS_NAMEATTR_ANSWER;
+ name->attributes |=
+ DNS_NAMEATTR_ANSWER;
+ }
rdataset->attributes |= aflag;
if (aa)
rdataset->trust =
@@ -6970,6 +6958,8 @@ answer_response(fetchctx_t *fctx) {
if (wanted_chaining)
chaining = ISC_TRUE;
} else {
+ dns_rdataset_t *dnameset = NULL;
+
/*
* Look for a DNAME (or its SIG). Anything else is
* ignored.
@@ -6977,10 +6967,8 @@ answer_response(fetchctx_t *fctx) {
wanted_chaining = ISC_FALSE;
for (rdataset = ISC_LIST_HEAD(name->list);
rdataset != NULL;
- rdataset = ISC_LIST_NEXT(rdataset, link)) {
- isc_boolean_t found_dname = ISC_FALSE;
- dns_name_t *dname_name;
-
+ rdataset = ISC_LIST_NEXT(rdataset, link))
+ {
/*
* Only pass DNAME or RRSIG(DNAME).
*/
@@ -6994,20 +6982,41 @@ answer_response(fetchctx_t *fctx) {
* its signature should not be external.
*/
if (!chaining && external) {
- log_formerr(fctx, "external DNAME");
+ char qbuf[DNS_NAME_FORMATSIZE];
+ char obuf[DNS_NAME_FORMATSIZE];
+
+ dns_name_format(name, qbuf,
+ sizeof(qbuf));
+ dns_name_format(&fctx->domain, obuf,
+ sizeof(obuf));
+ log_formerr(fctx, "external DNAME or "
+ "RRSIG covering DNAME "
+ "in answer: %s is "
+ "not in %s", qbuf, obuf);
+ return (DNS_R_FORMERR);
+ }
+
+ if (namereln != dns_namereln_subdomain) {
+ char qbuf[DNS_NAME_FORMATSIZE];
+ char obuf[DNS_NAME_FORMATSIZE];
+
+ dns_name_format(qname, qbuf,
+ sizeof(qbuf));
+ dns_name_format(name, obuf,
+ sizeof(obuf));
+ log_formerr(fctx, "unrelated DNAME "
+ "in answer: %s is "
+ "not in %s", qbuf, obuf);
return (DNS_R_FORMERR);
}
- found = ISC_FALSE;
aflag = 0;
if (rdataset->type == dns_rdatatype_dname) {
- found = ISC_TRUE;
want_chaining = ISC_TRUE;
POST(want_chaining);
aflag = DNS_RDATASETATTR_ANSWER;
- result = dname_target(fctx, rdataset,
- qname, name,
- &dname);
+ result = dname_target(rdataset, qname,
+ nlabels, &fdname);
if (result == ISC_R_NOSPACE) {
/*
* We can't construct the
@@ -7019,14 +7028,12 @@ answer_response(fetchctx_t *fctx) {
} else if (result != ISC_R_SUCCESS)
return (result);
else
- found_dname = ISC_TRUE;
+ dnameset = rdataset;
- dname_name = dns_fixedname_name(&dname);
+ dname = dns_fixedname_name(&fdname);
if (!is_answertarget_allowed(view,
- qname,
- rdataset->type,
- dname_name,
- &fctx->domain)) {
+ qname, rdataset->type,
+ dname, &fctx->domain)) {
return (DNS_R_SERVFAIL);
}
} else {
@@ -7034,73 +7041,60 @@ answer_response(fetchctx_t *fctx) {
* We've found a signature that
* covers the DNAME.
*/
- found = ISC_TRUE;
aflag = DNS_RDATASETATTR_ANSWERSIG;
}
- if (found) {
+ /*
+ * We've found an answer to our
+ * question.
+ */
+ name->attributes |= DNS_NAMEATTR_CACHE;
+ rdataset->attributes |= DNS_RDATASETATTR_CACHE;
+ rdataset->trust = dns_trust_answer;
+ if (!chaining) {
/*
- * We've found an answer to our
- * question.
+ * This data is "the" answer to
+ * our question only if we're
+ * not chaining.
*/
- name->attributes |=
- DNS_NAMEATTR_CACHE;
- rdataset->attributes |=
- DNS_RDATASETATTR_CACHE;
- rdataset->trust = dns_trust_answer;
- if (!chaining) {
- /*
- * This data is "the" answer
- * to our question only if
- * we're not chaining.
- */
- INSIST(!external);
- if (aflag ==
- DNS_RDATASETATTR_ANSWER)
- have_answer = ISC_TRUE;
+ INSIST(!external);
+ if (aflag == DNS_RDATASETATTR_ANSWER) {
+ have_answer = ISC_TRUE;
name->attributes |=
DNS_NAMEATTR_ANSWER;
- rdataset->attributes |= aflag;
- if (aa)
- rdataset->trust =
- dns_trust_authanswer;
- } else if (external) {
- rdataset->attributes |=
- DNS_RDATASETATTR_EXTERNAL;
- }
-
- /*
- * DNAME chaining.
- */
- if (found_dname) {
- /*
- * Copy the dname into the
- * qname fixed name.
- *
- * Although we check for
- * failure of the copy
- * operation, in practice it
- * should never fail since
- * we already know that the
- * result fits in a fixedname.
- */
- dns_fixedname_init(&fqname);
- result = dns_name_copy(
- dns_fixedname_name(&dname),
- dns_fixedname_name(&fqname),
- NULL);
- if (result != ISC_R_SUCCESS)
- return (result);
- wanted_chaining = ISC_TRUE;
- name->attributes |=
- DNS_NAMEATTR_CHAINING;
- rdataset->attributes |=
- DNS_RDATASETATTR_CHAINING;
- qname = dns_fixedname_name(
- &fqname);
}
+ rdataset->attributes |= aflag;
+ if (aa)
+ rdataset->trust =
+ dns_trust_authanswer;
+ } else if (external) {
+ rdataset->attributes |=
+ DNS_RDATASETATTR_EXTERNAL;
}
}
+
+ /*
+ * DNAME chaining.
+ */
+ if (dnameset != NULL) {
+ /*
+ * Copy the dname into the qname fixed name.
+ *
+ * Although we check for failure of the copy
+ * operation, in practice it should never fail
+ * since we already know that the result fits
+ * in a fixedname.
+ */
+ dns_fixedname_init(&fqname);
+ qname = dns_fixedname_name(&fqname);
+ result = dns_name_copy(dname, qname, NULL);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+ wanted_chaining = ISC_TRUE;
+ name->attributes |= DNS_NAMEATTR_CHAINING;
+ dnameset->attributes |=
+ DNS_RDATASETATTR_CHAINING;
+ }
if (wanted_chaining)
chaining = ISC_TRUE;
}
--
1.9.1

View File

@@ -21,6 +21,13 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
file://0001-lib-dns-gen.c-fix-too-long-error.patch \
file://CVE-2015-8704.patch \
file://CVE-2015-8705.patch \
file://CVE-2015-8000.patch \
file://CVE-2015-8461.patch \
file://CVE-2016-1285.patch \
file://CVE-2016-1286_1.patch \
file://CVE-2016-1286_2.patch \
"
SRC_URI[md5sum] = "8b1f5064837756c938eadc1537dec5c7"

View File

@@ -18,6 +18,7 @@ PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
SRC_URI = "\
${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
"
S = "${WORKDIR}/bluez-${PV}"

View File

@@ -0,0 +1,63 @@
From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org>
Date: Sat, 12 Oct 2013 17:45:25 +0200
Subject: [PATCH] Allow using obexd without systemd in the user session
Not all sessions run systemd --user (actually, the majority
doesn't), so the dbus daemon must be able to spawn obexd
directly, and to do so it needs the full path of the daemon.
Upstream-Status: Denied
Not accepted by upstream maintainer for being a distro specific
configuration. See thread:
http://thread.gmane.org/gmane.linux.bluez.kernel/38725/focus=38843
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
Makefile.obexd | 4 ++--
obexd/src/org.bluez.obex.service | 4 ----
obexd/src/org.bluez.obex.service.in | 4 ++++
3 files changed, 6 insertions(+), 6 deletions(-)
delete mode 100644 obexd/src/org.bluez.obex.service
create mode 100644 obexd/src/org.bluez.obex.service.in
diff --git a/Makefile.obexd b/Makefile.obexd
index 2e33cbc72f2b..d5d858c857b4 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -2,12 +2,12 @@
if SYSTEMD
systemduserunitdir = @SYSTEMD_USERUNITDIR@
systemduserunit_DATA = obexd/src/obex.service
+endif
dbussessionbusdir = @DBUS_SESSIONBUSDIR@
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
-endif
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
obex_plugindir = $(libdir)/obex/plugins
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
deleted file mode 100644
index a53808884554..000000000000
--- a/obexd/src/org.bluez.obex.service
+++ /dev/null
@@ -1,4 +0,0 @@
-[D-BUS Service]
-Name=org.bluez.obex
-Exec=/bin/false
-SystemdService=dbus-org.bluez.obex.service
diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
new file mode 100644
index 000000000000..9c815f246b77
--- /dev/null
+++ b/obexd/src/org.bluez.obex.service.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.bluez.obex
+Exec=@libexecdir@/obexd
+SystemdService=dbus-org.bluez.obex.service

View File

@@ -0,0 +1,99 @@
Solves CVE-2015-8605 that caused DoS when an invalid lenght field in IPv4 UDP
was recived by the server.
Upstream-Status: Backport
CVE: CVE-2015-8605
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
=======================================================================
diff --git a/common/packet.c b/common/packet.c
index b530432..e600e37 100644
--- a/common/packet.c
+++ b/common/packet.c
@@ -220,7 +220,28 @@ ssize_t decode_hw_header (interface, buf, bufix, from)
}
}
-/* UDP header and IP header decoded together for convenience. */
+/*!
+ *
+ * \brief UDP header and IP header decoded together for convenience.
+ *
+ * Attempt to decode the UDP and IP headers and, if necessary, checksum
+ * the packet.
+ *
+ * \param inteface - the interface on which the packet was recevied
+ * \param buf - a pointer to the buffer for the received packet
+ * \param bufix - where to start processing the buffer, previous
+ * routines may have processed parts of the buffer already
+ * \param from - space to return the address of the packet sender
+ * \param buflen - remaining length of the buffer, this will have been
+ * decremented by bufix by the caller
+ * \param rbuflen - space to return the length of the payload from the udp
+ * header
+ * \param csum_ready - indication if the checksum is valid for use
+ * non-zero indicates the checksum should be validated
+ *
+ * \return - the index to the first byte of the udp payload (that is the
+ * start of the DHCP packet
+ */
ssize_t
decode_udp_ip_header(struct interface_info *interface,
@@ -231,7 +252,7 @@ decode_udp_ip_header(struct interface_info *interface,
unsigned char *data;
struct ip ip;
struct udphdr udp;
- unsigned char *upp, *endbuf;
+ unsigned char *upp;
u_int32_t ip_len, ulen, pkt_len;
static unsigned int ip_packets_seen = 0;
static unsigned int ip_packets_bad_checksum = 0;
@@ -241,11 +262,8 @@ decode_udp_ip_header(struct interface_info *interface,
static unsigned int udp_packets_length_overflow = 0;
unsigned len;
- /* Designate the end of the input buffer for bounds checks. */
- endbuf = buf + bufix + buflen;
-
/* Assure there is at least an IP header there. */
- if ((buf + bufix + sizeof(ip)) > endbuf)
+ if (sizeof(ip) > buflen)
return -1;
/* Copy the IP header into a stack aligned structure for inspection.
@@ -257,13 +275,17 @@ decode_udp_ip_header(struct interface_info *interface,
ip_len = (*upp & 0x0f) << 2;
upp += ip_len;
- /* Check the IP packet length. */
+ /* Check packet lengths are within the buffer:
+ * first the ip header (ip_len)
+ * then the packet length from the ip header (pkt_len)
+ * then the udp header (ip_len + sizeof(udp)
+ * We are liberal in what we accept, the udp payload should fit within
+ * pkt_len, but we only check against the full buffer size.
+ */
pkt_len = ntohs(ip.ip_len);
- if (pkt_len > buflen)
- return -1;
-
- /* Assure after ip_len bytes that there is enough room for a UDP header. */
- if ((upp + sizeof(udp)) > endbuf)
+ if ((ip_len > buflen) ||
+ (pkt_len > buflen) ||
+ ((ip_len + sizeof(udp)) > buflen))
return -1;
/* Copy the UDP header into a stack aligned structure for inspection. */
@@ -284,7 +306,8 @@ decode_udp_ip_header(struct interface_info *interface,
return -1;
udp_packets_length_checked++;
- if ((upp + ulen) > endbuf) {
+ /* verify that the payload length from the udp packet fits in the buffer */
+ if ((ip_len + ulen) > buflen) {
udp_packets_length_overflow++;
if (((udp_packets_length_checked > 4) &&
(udp_packets_length_overflow != 0)) &&

View File

@@ -6,6 +6,7 @@ SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
file://fixsepbuild.patch \
file://dhclient-script-drop-resolv.conf.dhclient.patch \
file://replace-ifconfig-route.patch \
file://CVE-2015-8605.patch \
"
SRC_URI[md5sum] = "5a284875dd2c12ddd388416d69156a67"

View File

@@ -0,0 +1,34 @@
From 398fed3bb0350cb1229e54e7020ae0e044c206d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de>
Date: Wed, 17 Feb 2016 08:33:45 +0100
Subject: bugfix: adjust statd service name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream uses 'rpc-statd.service' and Yocto introduced 'nfs-statd.service'
instead but forgot to update the mount.nfs helper 'start-statd' accordingly.
Upstream-Status: Inappropriate [other]
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
---
utils/statd/start-statd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/statd/start-statd b/utils/statd/start-statd
index 8211a90..3c2aa6f 100755
--- a/utils/statd/start-statd
+++ b/utils/statd/start-statd
@@ -16,7 +16,7 @@ fi
# First try systemd if it's installed.
if [ -d /run/systemd/system ]; then
# Quit only if the call worked.
- systemctl start rpc-statd.service && exit
+ systemctl start nfs-statd.service && exit
fi
# Fall back to launching it ourselves.
--
2.1.4

View File

@@ -31,6 +31,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
file://proc-fs-nfsd.mount \
file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
file://nfs-utils-debianize-start-statd.patch \
file://bugfix-adjust-statd-service-name.patch \
"
SRC_URI[md5sum] = "8de676b9ff34b8f9addc1d0800fabdf8"

View File

@@ -0,0 +1,65 @@
From f98a09cacff7baad8748c9aa217afd155a4d493f Mon Sep 17 00:00:00 2001
From: "mmcc@openbsd.org" <mmcc@openbsd.org>
Date: Tue, 20 Oct 2015 03:36:35 +0000
Subject: [PATCH] upstream commit
Replace a function-local allocation with stack memory.
ok djm@
Upstream-ID: c09fbbab637053a2ab9f33ca142b4e20a4c5a17e
Upstream-Status: Backport
CVE: CVE-2016-1907
[YOCTO #8935]
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
clientloop.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/clientloop.c b/clientloop.c
index 87ceb3d..1e05cba 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.275 2015/07/10 06:21:53 markus Exp $ */
+/* $OpenBSD: clientloop.c,v 1.276 2015/10/20 03:36:35 mmcc Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -311,11 +311,10 @@ client_x11_get_proto(const char *display, const char *xauth_path,
static char proto[512], data[512];
FILE *f;
int got_data = 0, generated = 0, do_unlink = 0, i;
- char *xauthdir, *xauthfile;
+ char xauthdir[PATH_MAX] = "", xauthfile[PATH_MAX] = "";
struct stat st;
u_int now, x11_timeout_real;
- xauthdir = xauthfile = NULL;
*_proto = proto;
*_data = data;
proto[0] = data[0] = '\0';
@@ -343,8 +342,6 @@ client_x11_get_proto(const char *display, const char *xauth_path,
display = xdisplay;
}
if (trusted == 0) {
- xauthdir = xmalloc(PATH_MAX);
- xauthfile = xmalloc(PATH_MAX);
mktemp_proto(xauthdir, PATH_MAX);
/*
* The authentication cookie should briefly outlive
@@ -407,8 +404,6 @@ client_x11_get_proto(const char *display, const char *xauth_path,
unlink(xauthfile);
rmdir(xauthdir);
}
- free(xauthdir);
- free(xauthfile);
/*
* If we didn't get authentication data, just make up some
--
1.9.1

View File

@@ -0,0 +1,329 @@
From ed4ce82dbfa8a3a3c8ea6fa0db113c71e234416c Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Wed, 13 Jan 2016 23:04:47 +0000
Subject: [PATCH] upstream commit
eliminate fallback from untrusted X11 forwarding to trusted
forwarding when the X server disables the SECURITY extension; Reported by
Thomas Hoger; ok deraadt@
Upstream-ID: f76195bd2064615a63ef9674a0e4096b0713f938
Upstream-Status: Backport
CVE: CVE-2016-1907
[YOCTO #8935]
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
clientloop.c | 114 ++++++++++++++++++++++++++++++++++++-----------------------
clientloop.h | 4 +--
mux.c | 22 ++++++------
ssh.c | 23 +++++-------
4 files changed, 93 insertions(+), 70 deletions(-)
Index: openssh-7.1p2/clientloop.c
===================================================================
--- openssh-7.1p2.orig/clientloop.c
+++ openssh-7.1p2/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.276 2015/10/20 03:36:35 mmcc Exp $ */
+/* $OpenBSD: clientloop.c,v 1.279 2016/01/13 23:04:47 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -288,6 +288,9 @@ client_x11_display_valid(const char *dis
{
size_t i, dlen;
+ if (display == NULL)
+ return 0;
+
dlen = strlen(display);
for (i = 0; i < dlen; i++) {
if (!isalnum((u_char)display[i]) &&
@@ -301,34 +304,33 @@ client_x11_display_valid(const char *dis
#define SSH_X11_PROTO "MIT-MAGIC-COOKIE-1"
#define X11_TIMEOUT_SLACK 60
-void
+int
client_x11_get_proto(const char *display, const char *xauth_path,
u_int trusted, u_int timeout, char **_proto, char **_data)
{
- char cmd[1024];
- char line[512];
- char xdisplay[512];
+ char cmd[1024], line[512], xdisplay[512];
+ char xauthfile[PATH_MAX], xauthdir[PATH_MAX];
static char proto[512], data[512];
FILE *f;
- int got_data = 0, generated = 0, do_unlink = 0, i;
- char xauthdir[PATH_MAX] = "", xauthfile[PATH_MAX] = "";
+ int got_data = 0, generated = 0, do_unlink = 0, i, r;
struct stat st;
u_int now, x11_timeout_real;
*_proto = proto;
*_data = data;
- proto[0] = data[0] = '\0';
+ proto[0] = data[0] = xauthfile[0] = xauthdir[0] = '\0';
- if (xauth_path == NULL ||(stat(xauth_path, &st) == -1)) {
- debug("No xauth program.");
- } else if (!client_x11_display_valid(display)) {
- logit("DISPLAY '%s' invalid, falling back to fake xauth data",
+ if (!client_x11_display_valid(display)) {
+ logit("DISPLAY \"%s\" invalid; disabling X11 forwarding",
display);
- } else {
- if (display == NULL) {
- debug("x11_get_proto: DISPLAY not set");
- return;
- }
+ return -1;
+ }
+ if (xauth_path != NULL && stat(xauth_path, &st) == -1) {
+ debug("No xauth program.");
+ xauth_path = NULL;
+ }
+
+ if (xauth_path != NULL) {
/*
* Handle FamilyLocal case where $DISPLAY does
* not match an authorization entry. For this we
@@ -337,43 +339,60 @@ client_x11_get_proto(const char *display
* is not perfect.
*/
if (strncmp(display, "localhost:", 10) == 0) {
- snprintf(xdisplay, sizeof(xdisplay), "unix:%s",
- display + 10);
+ if ((r = snprintf(xdisplay, sizeof(xdisplay), "unix:%s",
+ display + 10)) < 0 ||
+ (size_t)r >= sizeof(xdisplay)) {
+ error("%s: display name too long", __func__);
+ return -1;
+ }
display = xdisplay;
}
if (trusted == 0) {
- mktemp_proto(xauthdir, PATH_MAX);
/*
+ * Generate an untrusted X11 auth cookie.
+ *
* The authentication cookie should briefly outlive
* ssh's willingness to forward X11 connections to
* avoid nasty fail-open behaviour in the X server.
*/
+ mktemp_proto(xauthdir, sizeof(xauthdir));
+ if (mkdtemp(xauthdir) == NULL) {
+ error("%s: mkdtemp: %s",
+ __func__, strerror(errno));
+ return -1;
+ }
+ do_unlink = 1;
+ if ((r = snprintf(xauthfile, sizeof(xauthfile),
+ "%s/xauthfile", xauthdir)) < 0 ||
+ (size_t)r >= sizeof(xauthfile)) {
+ error("%s: xauthfile path too long", __func__);
+ unlink(xauthfile);
+ rmdir(xauthdir);
+ return -1;
+ }
+
if (timeout >= UINT_MAX - X11_TIMEOUT_SLACK)
x11_timeout_real = UINT_MAX;
else
x11_timeout_real = timeout + X11_TIMEOUT_SLACK;
- if (mkdtemp(xauthdir) != NULL) {
- do_unlink = 1;
- snprintf(xauthfile, PATH_MAX, "%s/xauthfile",
- xauthdir);
- snprintf(cmd, sizeof(cmd),
- "%s -f %s generate %s " SSH_X11_PROTO
- " untrusted timeout %u 2>" _PATH_DEVNULL,
- xauth_path, xauthfile, display,
- x11_timeout_real);
- debug2("x11_get_proto: %s", cmd);
- if (x11_refuse_time == 0) {
- now = monotime() + 1;
- if (UINT_MAX - timeout < now)
- x11_refuse_time = UINT_MAX;
- else
- x11_refuse_time = now + timeout;
- channel_set_x11_refuse_time(
- x11_refuse_time);
- }
- if (system(cmd) == 0)
- generated = 1;
+ if ((r = snprintf(cmd, sizeof(cmd),
+ "%s -f %s generate %s " SSH_X11_PROTO
+ " untrusted timeout %u 2>" _PATH_DEVNULL,
+ xauth_path, xauthfile, display,
+ x11_timeout_real)) < 0 ||
+ (size_t)r >= sizeof(cmd))
+ fatal("%s: cmd too long", __func__);
+ debug2("%s: %s", __func__, cmd);
+ if (x11_refuse_time == 0) {
+ now = monotime() + 1;
+ if (UINT_MAX - timeout < now)
+ x11_refuse_time = UINT_MAX;
+ else
+ x11_refuse_time = now + timeout;
+ channel_set_x11_refuse_time(x11_refuse_time);
}
+ if (system(cmd) == 0)
+ generated = 1;
}
/*
@@ -395,9 +414,7 @@ client_x11_get_proto(const char *display
got_data = 1;
if (f)
pclose(f);
- } else
- error("Warning: untrusted X11 forwarding setup failed: "
- "xauth key data not generated");
+ }
}
if (do_unlink) {
@@ -405,6 +422,13 @@ client_x11_get_proto(const char *display
rmdir(xauthdir);
}
+ /* Don't fall back to fake X11 data for untrusted forwarding */
+ if (!trusted && !got_data) {
+ error("Warning: untrusted X11 forwarding setup failed: "
+ "xauth key data not generated");
+ return -1;
+ }
+
/*
* If we didn't get authentication data, just make up some
* data. The forwarding code will check the validity of the
@@ -427,6 +451,8 @@ client_x11_get_proto(const char *display
rnd >>= 8;
}
}
+
+ return 0;
}
/*
Index: openssh-7.1p2/clientloop.h
===================================================================
--- openssh-7.1p2.orig/clientloop.h
+++ openssh-7.1p2/clientloop.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.h,v 1.31 2013/06/02 23:36:29 dtucker Exp $ */
+/* $OpenBSD: clientloop.h,v 1.32 2016/01/13 23:04:47 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -39,7 +39,7 @@
/* Client side main loop for the interactive session. */
int client_loop(int, int, int);
-void client_x11_get_proto(const char *, const char *, u_int, u_int,
+int client_x11_get_proto(const char *, const char *, u_int, u_int,
char **, char **);
void client_global_request_reply_fwd(int, u_int32_t, void *);
void client_session2_setup(int, int, int, const char *, struct termios *,
Index: openssh-7.1p2/mux.c
===================================================================
--- openssh-7.1p2.orig/mux.c
+++ openssh-7.1p2/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.54 2015/08/19 23:18:26 djm Exp $ */
+/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success,
char *proto, *data;
/* Get reasonable local authentication information. */
- client_x11_get_proto(display, options.xauth_location,
+ if (client_x11_get_proto(display, options.xauth_location,
options.forward_x11_trusted, options.forward_x11_timeout,
- &proto, &data);
- /* Request forwarding with authentication spoofing. */
- debug("Requesting X11 forwarding with authentication "
- "spoofing.");
- x11_request_forwarding_with_spoofing(id, display, proto,
- data, 1);
- client_expect_confirm(id, "X11 forwarding", CONFIRM_WARN);
- /* XXX exit_on_forward_failure */
+ &proto, &data) == 0) {
+ /* Request forwarding with authentication spoofing. */
+ debug("Requesting X11 forwarding with authentication "
+ "spoofing.");
+ x11_request_forwarding_with_spoofing(id, display, proto,
+ data, 1);
+ /* XXX exit_on_forward_failure */
+ client_expect_confirm(id, "X11 forwarding",
+ CONFIRM_WARN);
+ }
}
if (cctx->want_agent_fwd && options.forward_agent) {
Index: openssh-7.1p2/ssh.c
===================================================================
--- openssh-7.1p2.orig/ssh.c
+++ openssh-7.1p2/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.420 2015/07/30 00:01:34 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1604,6 +1604,7 @@ ssh_session(void)
struct winsize ws;
char *cp;
const char *display;
+ char *proto = NULL, *data = NULL;
/* Enable compression if requested. */
if (options.compression) {
@@ -1674,13 +1675,9 @@ ssh_session(void)
display = getenv("DISPLAY");
if (display == NULL && options.forward_x11)
debug("X11 forwarding requested but DISPLAY not set");
- if (options.forward_x11 && display != NULL) {
- char *proto, *data;
- /* Get reasonable local authentication information. */
- client_x11_get_proto(display, options.xauth_location,
- options.forward_x11_trusted,
- options.forward_x11_timeout,
- &proto, &data);
+ if (options.forward_x11 && client_x11_get_proto(display,
+ options.xauth_location, options.forward_x11_trusted,
+ options.forward_x11_timeout, &proto, &data) == 0) {
/* Request forwarding with authentication spoofing. */
debug("Requesting X11 forwarding with authentication "
"spoofing.");
@@ -1770,6 +1767,7 @@ ssh_session2_setup(int id, int success,
extern char **environ;
const char *display;
int interactive = tty_flag;
+ char *proto = NULL, *data = NULL;
if (!success)
return; /* No need for error message, channels code sens one */
@@ -1777,12 +1775,9 @@ ssh_session2_setup(int id, int success,
display = getenv("DISPLAY");
if (display == NULL && options.forward_x11)
debug("X11 forwarding requested but DISPLAY not set");
- if (options.forward_x11 && display != NULL) {
- char *proto, *data;
- /* Get reasonable local authentication information. */
- client_x11_get_proto(display, options.xauth_location,
- options.forward_x11_trusted,
- options.forward_x11_timeout, &proto, &data);
+ if (options.forward_x11 && client_x11_get_proto(display,
+ options.xauth_location, options.forward_x11_trusted,
+ options.forward_x11_timeout, &proto, &data) == 0) {
/* Request forwarding with authentication spoofing. */
debug("Requesting X11 forwarding with authentication "
"spoofing.");

View File

@@ -0,0 +1,33 @@
From d77148e3a3ef6c29b26ec74331455394581aa257 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Sun, 8 Nov 2015 21:59:11 +0000
Subject: [PATCH] upstream commit
fix OOB read in packet code caused by missing return
statement found by Ben Hawkes; ok markus@ deraadt@
Upstream-ID: a3e3a85434ebfa0690d4879091959591f30efc62
Upstream-Status: Backport
CVE: CVE-2016-1907
[YOCTO #8935]
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
packet.c | 1 +
1 file changed, 1 insertion(+)
Index: openssh-7.1p2/packet.c
===================================================================
--- openssh-7.1p2.orig/packet.c
+++ openssh-7.1p2/packet.c
@@ -1855,6 +1855,7 @@ ssh_packet_process_incoming(struct ssh *
if (len >= state->packet_discard) {
if ((r = ssh_packet_stop_discard(ssh)) != 0)
return r;
+ return SSH_ERR_CONN_CORRUPT;
}
state->packet_discard -= len;
return 0;

View File

@@ -0,0 +1,84 @@
From 4b4bfb01cd40b9ddb948e6026ddd287cc303d871 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Thu, 10 Mar 2016 11:47:57 +0000
Subject: [PATCH] upstream commit
sanitise characters destined for xauth reported by
github.com/tintinweb feedback and ok deraadt and markus
Upstream-ID: 18ad8d0d74cbd2ea3306a16595a306ee356aa261
Upstream-Status: Backport
CVE: CVE-2016-3115
https://anongit.mindrot.org/openssh.git/commit/?id=4b4bfb01cd40b9ddb948e6026ddd287cc303d871
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
session.c | 34 +++++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
Index: openssh-7.1p2/session.c
===================================================================
--- openssh-7.1p2.orig/session.c
+++ openssh-7.1p2/session.c
@@ -46,6 +46,7 @@
#include <arpa/inet.h>
+#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
@@ -273,6 +274,21 @@ do_authenticated(Authctxt *authctxt)
do_cleanup(authctxt);
}
+/* Check untrusted xauth strings for metacharacters */
+static int
+xauth_valid_string(const char *s)
+{
+ size_t i;
+
+ for (i = 0; s[i] != '\0'; i++) {
+ if (!isalnum((u_char)s[i]) &&
+ s[i] != '.' && s[i] != ':' && s[i] != '/' &&
+ s[i] != '-' && s[i] != '_')
+ return 0;
+ }
+ return 1;
+}
+
/*
* Prepares for an interactive session. This is called after the user has
* been successfully authenticated. During this message exchange, pseudo
@@ -346,7 +362,13 @@ do_authenticated1(Authctxt *authctxt)
s->screen = 0;
}
packet_check_eom();
- success = session_setup_x11fwd(s);
+ if (xauth_valid_string(s->auth_proto) &&
+ xauth_valid_string(s->auth_data))
+ success = session_setup_x11fwd(s);
+ else {
+ success = 0;
+ error("Invalid X11 forwarding data");
+ }
if (!success) {
free(s->auth_proto);
free(s->auth_data);
@@ -2181,7 +2203,13 @@ session_x11_req(Session *s)
s->screen = packet_get_int();
packet_check_eom();
- success = session_setup_x11fwd(s);
+ if (xauth_valid_string(s->auth_proto) &&
+ xauth_valid_string(s->auth_data))
+ success = session_setup_x11fwd(s);
+ else {
+ success = 0;
+ error("Invalid X11 forwarding data");
+ }
if (!success) {
free(s->auth_proto);
free(s->auth_data);

View File

@@ -20,12 +20,17 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
file://sshdgenkeys.service \
file://volatiles.99_sshd \
file://add-test-support-for-busybox.patch \
file://run-ptest"
file://run-ptest \
file://CVE-2016-1907_upstream_commit.patch \
file://CVE-2016-1907_2.patch \
file://CVE-2016-1907_3.patch \
file://CVE-2016-3115.patch \
"
PAM_SRC_URI = "file://sshd"
SRC_URI[md5sum] = "8709736bc8a8c253bc4eeb4829888ca5"
SRC_URI[sha256sum] = "fc0a6d2d1d063d5c66dffd952493d0cda256cad204f681de0f84ef85b2ad8428"
SRC_URI[md5sum] = "4d8547670e2a220d5ef805ad9e47acf2"
SRC_URI[sha256sum] = "dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd"
inherit useradd update-rc.d update-alternatives systemd

View File

@@ -17,15 +17,13 @@ URL: https://bugs.gentoo.org/542618
Signed-off-By: Armin Kuster <akuster@mvista.com>
Index: openssl-1.0.2a/crypto/perlasm/x86_64-xlate.pl
===================================================================
--- openssl-1.0.2a.orig/crypto/perlasm/x86_64-xlate.pl
+++ openssl-1.0.2a/crypto/perlasm/x86_64-xlate.pl
@@ -194,7 +194,10 @@ my %globals;
}
sub out {
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
--- a/crypto/perlasm/x86_64-xlate.pl
+++ b/crypto/perlasm/x86_64-xlate.pl
@@ -196,6 +196,10 @@ my %globals;
my $self = shift;
-
$self->{value} =~ s/\b(0b[0-1]+)/oct($1)/eig;
+ # When building on x32 ABIs, the expanded hex value might be too
+ # big to fit into 32bits. Enable transparent 64bit support here
+ # so we can safely print it out.

View File

@@ -9,14 +9,15 @@ Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Dr Stephen N Henson <shenson@drh-consultancy.co.uk>
This is not meant as final patch.
Upstream-Status: Backport [debian]
Signed-off-by: Armin Kuster <akuster@mvista.com>
Index: openssl-1.0.2/crypto/x509/x509_vfy.c
Index: openssl-1.0.2g/crypto/x509/x509_vfy.c
===================================================================
--- openssl-1.0.2.orig/crypto/x509/x509_vfy.c
+++ openssl-1.0.2/crypto/x509/x509_vfy.c
--- openssl-1.0.2g.orig/crypto/x509/x509_vfy.c
+++ openssl-1.0.2g/crypto/x509/x509_vfy.c
@@ -119,6 +119,7 @@ static int check_trust(X509_STORE_CTX *c
static int check_revocation(X509_STORE_CTX *ctx);
static int check_cert(X509_STORE_CTX *ctx);
@@ -25,17 +26,17 @@ Index: openssl-1.0.2/crypto/x509/x509_vfy.c
static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer,
unsigned int *preasons, X509_CRL *crl, X509 *x);
@@ -438,6 +439,9 @@ int X509_verify_cert(X509_STORE_CTX *ctx
@@ -489,6 +490,9 @@ int X509_verify_cert(X509_STORE_CTX *ctx
if (!ok)
goto end;
goto err;
+ ok = check_ca_blacklist(ctx);
+ if(!ok) goto end;
+ if(!ok) goto err;
+
#ifndef OPENSSL_NO_RFC3779
/* RFC 3779 path validation, now that CRL check has been done */
ok = v3_asid_validate_path(ctx);
@@ -938,6 +942,29 @@ static int check_crl_time(X509_STORE_CTX
@@ -996,6 +1000,29 @@ static int check_crl_time(X509_STORE_CTX
return 1;
}

View File

@@ -15,7 +15,7 @@ Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld 2014-02-24 22:19:08.601827266 +0100
@@ -0,0 +1,4615 @@
@@ -0,0 +1,4621 @@
+OPENSSL_1.0.0 {
+ global:
+ BIO_f_ssl;
@@ -4631,6 +4631,12 @@ Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld
+ SSL_test_functions;
+} OPENSSL_1.0.1d;
+
+OPENSSL_1.0.2g {
+ global:
+ SRP_VBASE_get1_by_user;
+ SRP_user_pwd_free;
+} OPENSSL_1.0.2;
+
Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/openssl.ld
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000

View File

@@ -8,16 +8,16 @@ http://www.mail-archive.com/openssl-dev@openssl.org/msg32860.html
Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
---
Index: openssl-1.0.2/crypto/evp/digest.c
Index: openssl-1.0.2h/crypto/evp/digest.c
===================================================================
--- openssl-1.0.2.orig/crypto/evp/digest.c
+++ openssl-1.0.2/crypto/evp/digest.c
@@ -208,7 +208,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, c
return 0;
--- openssl-1.0.2h.orig/crypto/evp/digest.c
+++ openssl-1.0.2h/crypto/evp/digest.c
@@ -211,7 +211,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, c
type = ctx->digest;
}
#endif
- if (ctx->digest != type) {
+ if (type && (ctx->digest != type)) {
if (ctx->digest && ctx->digest->ctx_size)
if (ctx->digest && ctx->digest->ctx_size) {
OPENSSL_free(ctx->md_data);
ctx->digest = type;
ctx->md_data = NULL;

View File

@@ -6,7 +6,7 @@ DEPENDS += "cryptodev-linux"
CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
LIC_FILES_CHKSUM = "file://LICENSE;md5=27ffa5d74bb5a337056c14b2ef93fbf6"
export DIRS = "crypto ssl apps engines"
export OE_LDFLAGS="${LDFLAGS}"
@@ -25,7 +25,7 @@ SRC_URI += "file://configure-targets.patch \
file://debian/no-rpath.patch \
file://debian/no-symbolic.patch \
file://debian/pic.patch \
file://debian/version-script.patch \
file://debian1.0.2/version-script.patch \
file://openssl_fix_for_x32.patch \
file://fix-cipher-des-ede3-cfb1.patch \
file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \
@@ -39,8 +39,8 @@ SRC_URI += "file://configure-targets.patch \
file://ptest_makefile_deps.patch \
"
SRC_URI[md5sum] = "38dd619b2e77cbac69b99f52a053d25a"
SRC_URI[sha256sum] = "671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8"
SRC_URI[md5sum] = "9392e65072ce4b614c1392eefc1f23d0"
SRC_URI[sha256sum] = "1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c74332919"
PACKAGES =+ " \
${PN}-engines \
@@ -56,3 +56,13 @@ PARALLEL_MAKEINST = ""
do_configure_prepend() {
cp ${WORKDIR}/find.pl ${S}/util/find.pl
}
# The crypto_use_bigint patch means that perl's bignum module needs to be
# installed, but some distributions (for example Fedora 23) don't ship it by
# default. As the resulting error is very misleading check for bignum before
# building.
do_configure_prepend() {
if ! perl -Mbigint -e true; then
bbfatal "The perl module 'bignum' was not found but this is required to build openssl. Please install this module (often packaged as perl-bignum) and re-run bitbake."
fi
}

View File

@@ -0,0 +1,372 @@
Upstream-Status: Backport
http://www.dest-unreach.org/socat/download/socat-1.7.3.1.patch
CVE: CVE-2016-2217
[Yocto # 9024]
Singed-off-by: Armin Kuster <akuster@mvista.com>
Index: socat-1.7.3.0/CHANGES
===================================================================
--- socat-1.7.3.0.orig/CHANGES
+++ socat-1.7.3.0/CHANGES
@@ -1,8 +1,39 @@
+####################### V 1.7.3.1:
+
+security:
+ Socat security advisory 8
+ A stack overflow in vulnerability was found that can be triggered when
+ command line arguments (complete address specifications, host names,
+ file names) are longer than 512 bytes.
+ Successful exploitation might allow an attacker to execute arbitrary
+ code with the privileges of the socat process.
+ This vulnerability can only be exploited when an attacker is able to
+ inject data into socat's command line.
+ A vulnerable scenario would be a CGI script that reads data from clients
+ and uses (parts of) this data as hostname for a Socat invocation.
+ Test: NESTEDOVFL
+ Credits to Takumi Akiyama for finding and reporting this issue.
+
+ Socat security advisory 7
+ MSVR-1499
+ In the OpenSSL address implementation the hard coded 1024 bit DH p
+ parameter was not prime. The effective cryptographic strength of a key
+ exchange using these parameters was weaker than the one one could get by
+ using a prime p. Moreover, since there is no indication of how these
+ parameters were chosen, the existence of a trapdoor that makes possible
+ for an eavesdropper to recover the shared secret from a key exchange
+ that uses them cannot be ruled out.
+ Futhermore, 1024bit is not considered sufficiently secure.
+ Fix: generated a new 2048bit prime.
+ Thanks to Santiago Zanella-Beguelin and Microsoft Vulnerability
+ Research (MSVR) for finding and reporting this issue.
+
####################### V 1.7.3.0:
security:
- (CVE Id pending)
+ Socat security advisory 6
+ CVE-2015-1379: Possible DoS with fork
Fixed problems with signal handling caused by use of not async signal
safe functions in signal handlers that could freeze socat, allowing
denial of service attacks.
@@ -240,6 +271,7 @@ docu:
####################### V 1.7.2.3:
security:
+ Socat security advisory 5
CVE-2014-0019: socats PROXY-CONNECT address was vulnerable to a buffer
overflow with data from command line (see socat-secadv5.txt)
Credits to Florian Weimer of the Red Hat Product Security Team
@@ -247,6 +279,7 @@ security:
####################### V 1.7.2.2:
security:
+ Socat security advisory 4
CVE-2013-3571:
after refusing a client connection due to bad source address or source
port socat shutdown() the socket but did not close() it, resulting in
@@ -258,6 +291,7 @@ security:
####################### V 1.7.2.1:
security:
+ Socat security advisory 3
CVE-2012-0219:
fixed a possible heap buffer overflow in the readline address. This bug
could be exploited when all of the following conditions were met:
@@ -391,6 +425,7 @@ docu:
####################### V 1.7.1.3:
security:
+ Socat security advisory 2
CVE-2010-2799:
fixed a stack overflow vulnerability that occurred when command
line arguments (whole addresses, host names, file names) were longer
@@ -892,6 +927,7 @@ further corrections:
####################### V 1.4.0.3:
security:
+ Socat security advisory 1
CVE-2004-1484:
fix to a syslog() based format string vulnerability that can lead to
remote code execution. See advisory socat-adv-1.txt
Index: socat-1.7.3.0/VERSION
===================================================================
--- socat-1.7.3.0.orig/VERSION
+++ socat-1.7.3.0/VERSION
@@ -1 +1 @@
-"1.7.3.0"
+"1.7.3.1"
Index: socat-1.7.3.0/nestlex.c
===================================================================
--- socat-1.7.3.0.orig/nestlex.c
+++ socat-1.7.3.0/nestlex.c
@@ -1,5 +1,5 @@
/* source: nestlex.c */
-/* Copyright Gerhard Rieger 2006-2010 */
+/* Copyright Gerhard Rieger */
/* Published under the GNU General Public License V.2, see file COPYING */
/* a function for lexical scanning of nested character patterns */
@@ -9,6 +9,17 @@
#include "sysincludes.h"
+static int _nestlex(const char **addr,
+ char **token,
+ ptrdiff_t *len,
+ const char *ends[],
+ const char *hquotes[],
+ const char *squotes[],
+ const char *nests[],
+ bool dropquotes,
+ bool c_esc,
+ bool html_esc
+ );
/* sub: scan a string and copy its value to output string
end scanning when an unescaped, unnested string from ends array is found
@@ -33,6 +44,22 @@ int nestlex(const char **addr, /* input
bool c_esc, /* solve C char escapes: \n \t \0 etc */
bool html_esc /* solve HTML char escapes: %0d %08 etc */
) {
+ return
+ _nestlex(addr, token, (ptrdiff_t *)len, ends, hquotes, squotes, nests,
+ dropquotes, c_esc, html_esc);
+}
+
+static int _nestlex(const char **addr,
+ char **token,
+ ptrdiff_t *len,
+ const char *ends[],
+ const char *hquotes[],
+ const char *squotes[],
+ const char *nests[],
+ bool dropquotes,
+ bool c_esc,
+ bool html_esc
+ ) {
const char *in = *addr; /* pointer into input string */
const char **endx; /* loops over end patterns */
const char **quotx; /* loops over quote patterns */
@@ -77,16 +104,18 @@ int nestlex(const char **addr, /* input
if (--*len <= 0) { *addr = in; *token = out; return -1; }
}
}
- /* we call nestlex recursively */
+ /* we call _nestlex recursively */
endnest[0] = *quotx;
endnest[1] = NULL;
result =
- nestlex(&in, &out, len, endnest, NULL/*hquotes*/,
+ _nestlex(&in, &out, len, endnest, NULL/*hquotes*/,
NULL/*squotes*/, NULL/*nests*/,
false, c_esc, html_esc);
if (result == 0 && dropquotes) {
/* we strip this quote */
in += strlen(*quotx);
+ } else if (result < 0) {
+ *addr = in; *token = out; return result;
} else {
/* we copy the trailing quote */
for (i = strlen(*quotx); i > 0; --i) {
@@ -110,7 +139,7 @@ int nestlex(const char **addr, /* input
if (!strncmp(in, *quotx, strlen(*quotx))) {
/* this quote pattern matches */
/* we strip this quote */
- /* we call nestlex recursively */
+ /* we call _nestlex recursively */
const char *endnest[2];
if (dropquotes) {
/* we strip this quote */
@@ -124,13 +153,15 @@ int nestlex(const char **addr, /* input
endnest[0] = *quotx;
endnest[1] = NULL;
result =
- nestlex(&in, &out, len, endnest, hquotes,
+ _nestlex(&in, &out, len, endnest, hquotes,
squotes, nests,
false, c_esc, html_esc);
if (result == 0 && dropquotes) {
/* we strip the trailing quote */
in += strlen(*quotx);
+ } else if (result < 0) {
+ *addr = in; *token = out; return result;
} else {
/* we copy the trailing quote */
for (i = strlen(*quotx); i > 0; --i) {
@@ -162,7 +193,7 @@ int nestlex(const char **addr, /* input
}
result =
- nestlex(&in, &out, len, endnest, hquotes, squotes, nests,
+ _nestlex(&in, &out, len, endnest, hquotes, squotes, nests,
false, c_esc, html_esc);
if (result == 0) {
/* copy endnest */
@@ -175,6 +206,8 @@ int nestlex(const char **addr, /* input
}
--i;
}
+ } else if (result < 0) {
+ *addr = in; *token = out; return result;
}
break;
}
@@ -211,7 +244,7 @@ int nestlex(const char **addr, /* input
}
*out++ = c;
--*len;
- if (*len == 0) {
+ if (*len <= 0) {
*addr = in;
*token = out;
return -1; /* output overflow */
@@ -222,7 +255,7 @@ int nestlex(const char **addr, /* input
/* just a simple char */
*out++ = c;
--*len;
- if (*len == 0) {
+ if (*len <= 0) {
*addr = in;
*token = out;
return -1; /* output overflow */
Index: socat-1.7.3.0/nestlex.h
===================================================================
--- socat-1.7.3.0.orig/nestlex.h
+++ socat-1.7.3.0/nestlex.h
@@ -1,5 +1,5 @@
/* source: nestlex.h */
-/* Copyright Gerhard Rieger 2006 */
+/* Copyright Gerhard Rieger */
/* Published under the GNU General Public License V.2, see file COPYING */
#ifndef __nestlex_h_included
Index: socat-1.7.3.0/socat.spec
===================================================================
--- socat-1.7.3.0.orig/socat.spec
+++ socat-1.7.3.0/socat.spec
@@ -1,6 +1,6 @@
%define majorver 1.7
-%define minorver 3.0
+%define minorver 3.1
Summary: socat - multipurpose relay
Name: socat
Index: socat-1.7.3.0/test.sh
===================================================================
--- socat-1.7.3.0.orig/test.sh
+++ socat-1.7.3.0/test.sh
@@ -2266,8 +2266,8 @@ gentestcert () {
gentestdsacert () {
local name="$1"
if [ -s $name.key -a -s $name.crt -a -s $name.pem ]; then return; fi
- openssl dsaparam -out $name-dsa.pem 512 >/dev/null 2>&1
- openssl dhparam -dsaparam -out $name-dh.pem 512 >/dev/null 2>&1
+ openssl dsaparam -out $name-dsa.pem 1024 >/dev/null 2>&1
+ openssl dhparam -dsaparam -out $name-dh.pem 1024 >/dev/null 2>&1
openssl req -newkey dsa:$name-dsa.pem -keyout $name.key -nodes -x509 -config $TESTCERT_CONF -out $name.crt -days 3653 >/dev/null 2>&1
cat $name-dsa.pem $name-dh.pem $name.key $name.crt >$name.pem
}
@@ -10973,6 +10973,42 @@ CMD0="$TRACE $SOCAT $opts OPENSSL:localh
printf "test $F_n $TEST... " $N
$CMD0 </dev/null 1>&0 2>"${te}0"
rc0=$?
+if [ $rc0 -lt 128 ] || [ $rc0 -eq 255 ]; then
+ $PRINTF "$OK\n"
+ numOK=$((numOK+1))
+else
+ $PRINTF "$FAILED\n"
+ echo "$CMD0"
+ cat "${te}0"
+ numFAIL=$((numFAIL+1))
+ listFAIL="$listFAIL $N"
+fi
+fi # NUMCOND
+ ;;
+esac
+PORT=$((PORT+1))
+N=$((N+1))
+
+# socat up to 1.7.3.0 had a stack overflow vulnerability that occurred when
+# command line arguments (whole addresses, host names, file names) were longer
+# than 512 bytes and specially crafted.
+NAME=NESTEDOVFL
+case "$TESTS" in
+*%$N%*|*%functions%*|*%bugs%*|*%security%*|*%exec%*|*%$NAME%*)
+TEST="$NAME: stack overflow on overly long nested arg"
+# provide a long host name to TCP-CONNECT and check socats exit code
+if ! eval $NUMCOND; then :; else
+tf="$td/test$N.stdout"
+te="$td/test$N.stderr"
+tdiff="$td/test$N.diff"
+da="test$N $(date) $RANDOM"
+# prepare long data - perl might not be installed
+rm -f "$td/test$N.dat"
+i=0; while [ $i -lt 64 ]; do echo -n "AAAAAAAAAAAAAAAA" >>"$td/test$N.dat"; i=$((i+1)); done
+CMD0="$TRACE $SOCAT $opts EXEC:[$(cat "$td/test$N.dat")] STDIO"
+printf "test $F_n $TEST... " $N
+$CMD0 </dev/null 1>&0 2>"${te}0"
+rc0=$?
if [ $rc0 -lt 128 ] || [ $rc0 -eq 255 ]; then
$PRINTF "$OK\n"
numOK=$((numOK+1))
Index: socat-1.7.3.0/xio-openssl.c
===================================================================
--- socat-1.7.3.0.orig/xio-openssl.c
+++ socat-1.7.3.0/xio-openssl.c
@@ -912,20 +912,27 @@ int
}
{
- static unsigned char dh1024_p[] = {
- 0xCC,0x17,0xF2,0xDC,0x96,0xDF,0x59,0xA4,0x46,0xC5,0x3E,0x0E,
- 0xB8,0x26,0x55,0x0C,0xE3,0x88,0xC1,0xCE,0xA7,0xBC,0xB3,0xBF,
- 0x16,0x94,0xD8,0xA9,0x45,0xA2,0xCE,0xA9,0x5B,0x22,0x25,0x5F,
- 0x92,0x59,0x94,0x1C,0x22,0xBF,0xCB,0xC8,0xC8,0x57,0xCB,0xBF,
- 0xBC,0x0E,0xE8,0x40,0xF9,0x87,0x03,0xBF,0x60,0x9B,0x08,0xC6,
- 0x8E,0x99,0xC6,0x05,0xFC,0x00,0xD6,0x6D,0x90,0xA8,0xF5,0xF8,
- 0xD3,0x8D,0x43,0xC8,0x8F,0x7A,0xBD,0xBB,0x28,0xAC,0x04,0x69,
- 0x4A,0x0B,0x86,0x73,0x37,0xF0,0x6D,0x4F,0x04,0xF6,0xF5,0xAF,
- 0xBF,0xAB,0x8E,0xCE,0x75,0x53,0x4D,0x7F,0x7D,0x17,0x78,0x0E,
- 0x12,0x46,0x4A,0xAF,0x95,0x99,0xEF,0xBC,0xA6,0xC5,0x41,0x77,
- 0x43,0x7A,0xB9,0xEC,0x8E,0x07,0x3C,0x6D,
+ static unsigned char dh2048_p[] = {
+ 0x00,0xdc,0x21,0x64,0x56,0xbd,0x9c,0xb2,0xac,0xbe,0xc9,0x98,0xef,0x95,0x3e,
+ 0x26,0xfa,0xb5,0x57,0xbc,0xd9,0xe6,0x75,0xc0,0x43,0xa2,0x1c,0x7a,0x85,0xdf,
+ 0x34,0xab,0x57,0xa8,0xf6,0xbc,0xf6,0x84,0x7d,0x05,0x69,0x04,0x83,0x4c,0xd5,
+ 0x56,0xd3,0x85,0x09,0x0a,0x08,0xff,0xb5,0x37,0xa1,0xa3,0x8a,0x37,0x04,0x46,
+ 0xd2,0x93,0x31,0x96,0xf4,0xe4,0x0d,0x9f,0xbd,0x3e,0x7f,0x9e,0x4d,0xaf,0x08,
+ 0xe2,0xe8,0x03,0x94,0x73,0xc4,0xdc,0x06,0x87,0xbb,0x6d,0xae,0x66,0x2d,0x18,
+ 0x1f,0xd8,0x47,0x06,0x5c,0xcf,0x8a,0xb5,0x00,0x51,0x57,0x9b,0xea,0x1e,0xd8,
+ 0xdb,0x8e,0x3c,0x1f,0xd3,0x2f,0xba,0x1f,0x5f,0x3d,0x15,0xc1,0x3b,0x2c,0x82,
+ 0x42,0xc8,0x8c,0x87,0x79,0x5b,0x38,0x86,0x3a,0xeb,0xfd,0x81,0xa9,0xba,0xf7,
+ 0x26,0x5b,0x93,0xc5,0x3e,0x03,0x30,0x4b,0x00,0x5c,0xb6,0x23,0x3e,0xea,0x94,
+ 0xc3,0xb4,0x71,0xc7,0x6e,0x64,0x3b,0xf8,0x92,0x65,0xad,0x60,0x6c,0xd4,0x7b,
+ 0xa9,0x67,0x26,0x04,0xa8,0x0a,0xb2,0x06,0xeb,0xe0,0x7d,0x90,0xdd,0xdd,0xf5,
+ 0xcf,0xb4,0x11,0x7c,0xab,0xc1,0xa3,0x84,0xbe,0x27,0x77,0xc7,0xde,0x20,0x57,
+ 0x66,0x47,0xa7,0x35,0xfe,0x0d,0x6a,0x1c,0x52,0xb8,0x58,0xbf,0x26,0x33,0x81,
+ 0x5e,0xb7,0xa9,0xc0,0xee,0x58,0x11,0x74,0x86,0x19,0x08,0x89,0x1c,0x37,0x0d,
+ 0x52,0x47,0x70,0x75,0x8b,0xa8,0x8b,0x30,0x11,0x71,0x36,0x62,0xf0,0x73,0x41,
+ 0xee,0x34,0x9d,0x0a,0x2b,0x67,0x4e,0x6a,0xa3,0xe2,0x99,0x92,0x1b,0xf5,0x32,
+ 0x73,0x63
};
- static unsigned char dh1024_g[] = {
+ static unsigned char dh2048_g[] = {
0x02,
};
DH *dh;
@@ -938,8 +945,8 @@ int
}
Error("DH_new() failed");
} else {
- dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
- dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
+ dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
+ dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
if ((dh->p == NULL) || (dh->g == NULL)) {
while (err = ERR_get_error()) {
Warn1("BN_bin2bn(): %s",

View File

@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
file://Makefile.in-fix-for-parallel-build.patch \
file://CVE-2016-2217.patch \
"
SRC_URI[md5sum] = "b607edb65bc6c57f4a43f06247504274"

View File

@@ -0,0 +1,64 @@
From c13401c723a039971bcd91b3856d76c6041b15f2 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <j@w1.fi>
Date: Fri, 13 Nov 2015 05:54:18 -0500
Subject: [PATCH] NFC: Fix payload length validation in NDEF record parser
It was possible for the 32-bit record->total_length value to end up
wrapping around due to integer overflow if the longer form of payload
length field is used and record->payload_length gets a value close to
2^32. This could result in ndef_parse_record() accepting a too large
payload length value and the record type filter reading up to about 20
bytes beyond the end of the buffer and potentially killing the process.
This could also result in an attempt to allocate close to 2^32 bytes of
heap memory and if that were to succeed, a buffer read overflow of the
same length which would most likely result in the process termination.
In case of record->total_length ending up getting the value 0, there
would be no buffer read overflow, but record parsing would result in an
infinite loop in ndef_parse_records().
Any of these error cases could potentially be used for denial of service
attacks over NFC by using a malformed NDEF record on an NFC Tag or
sending them during NFC connection handover if the application providing
the NDEF message to hostapd/wpa_supplicant did no validation of the
received records. While such validation is likely done in the NFC stack
that needs to parse the NFC messages before further processing,
hostapd/wpa_supplicant better be prepared for any data being included
here.
Fix this by validating record->payload_length value in a way that
detects integer overflow. (CID 122668)
Signed-off-by: Jouni Malinen <j@w1.fi>
Upstream-Status: Backport [from http://w1.fi/security/2015-5/]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
src/wps/ndef.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/wps/ndef.c b/src/wps/ndef.c
index d45dfc8..f7f729b 100644
--- a/src/wps/ndef.c
+++ b/src/wps/ndef.c
@@ -48,6 +48,8 @@ static int ndef_parse_record(const u8 *data, u32 size,
if (size < 6)
return -1;
record->payload_length = ntohl(*(u32 *)pos);
+ if (record->payload_length > size - 6)
+ return -1;
pos += sizeof(u32);
}
@@ -68,7 +70,8 @@ static int ndef_parse_record(const u8 *data, u32 size,
pos += record->payload_length;
record->total_length = pos - data;
- if (record->total_length > size)
+ if (record->total_length > size ||
+ record->total_length < record->payload_length)
return -1;
return 0;
}
--
1.9.1

View File

@@ -32,6 +32,7 @@ SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
file://0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch \
file://0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch \
file://0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch \
file://0001-NFC-Fix-payload-length-validation-in-NDEF-record-par.patch \
"
SRC_URI[md5sum] = "f0037dbe03897dcaf2ad2722e659095d"
SRC_URI[sha256sum] = "058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122"

View File

@@ -0,0 +1,33 @@
If CONFIG_FEATURE_LAST_SMALL is enabled the build fails because of a broken
__UT_NAMESIZE test.
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
From 932302666b0354ede63504d1bef8393cab28db8b Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Sun, 11 Oct 2015 16:58:18 +0200
Subject: [PATCH] randconfig fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
miscutils/last.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/miscutils/last.c b/miscutils/last.c
index 6d8b584..f8f3437 100644
--- a/miscutils/last.c
+++ b/miscutils/last.c
@@ -34,7 +34,8 @@
&& ((UT_LINESIZE != 32) || (UT_NAMESIZE != 32) || (UT_HOSTSIZE != 256))
#error struct utmpx member char[] size(s) have changed!
#elif defined __UT_LINESIZE \
- && ((__UT_LINESIZE != 32) || (__UT_NAMESIZE != 64) || (__UT_HOSTSIZE != 256))
+ && ((__UT_LINESIZE != 32) || (__UT_NAMESIZE != 32) || (__UT_HOSTSIZE != 256))
+/* __UT_NAMESIZE was checked with 64 above, but glibc-2.11 definitely uses 32! */
#error struct utmpx member char[] size(s) have changed!
#endif
--
2.6.4

View File

@@ -0,0 +1,38 @@
From 4d15068d83054a9f82b3f8842706cd6deb401e25 Mon Sep 17 00:00:00 2001
From: Vladislav Grishenko <themiron@mail.ru>
Date: Thu, 19 Mar 2015 16:19:35 +0500
Subject: [PATCH] zcip: fix wrong comparison of source IP with our IP
Commit "zcip: fix link-local IP conflict detection" has introduced
wrong comparsion of source IP with our IP. This leads to a new IP
being picked unnecessarily on every incoming ARP packet.
Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This change was picked from Busybox without modification
(git://git.busybox.net/busybox, commit 4d15068)
Upstream-Status: Backport (added in 1.24)
Signed-off-by: Brad Mouring <brad.mouring@ni.com>
---
networking/zcip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/networking/zcip.c b/networking/zcip.c
index a3307c5..962ba2e 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -521,7 +521,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
target_ip_conflict = 0;
if (memcmp(&p.arp.arp_sha, &eth_addr, ETH_ALEN) != 0) {
- if (memcmp(p.arp.arp_spa, &ip.s_addr, sizeof(struct in_addr))) {
+ if (memcmp(p.arp.arp_spa, &ip.s_addr, sizeof(struct in_addr)) == 0) {
/* A probe or reply with source_ip == chosen ip */
source_ip_conflict = 1;
}
--
2.7.3

View File

@@ -0,0 +1,57 @@
From d474ffc68290e0a83651c4432eeabfa62cd51e87 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Thu, 10 Mar 2016 11:47:58 +0100
Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Upstream-Status: Backport
CVE: CVE-2016-2147
https://git.busybox.net/busybox/commit/?id=d474ffc
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
networking/udhcp/domain_codec.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
Index: busybox-1.23.2/networking/udhcp/domain_codec.c
===================================================================
--- busybox-1.23.2.orig/networking/udhcp/domain_codec.c
+++ busybox-1.23.2/networking/udhcp/domain_codec.c
@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t
if (crtpos + *c + 1 > clen) /* label too long? abort */
return NULL;
if (dst)
- memcpy(dst + len, c + 1, *c);
+ /* \3com ---> "com." */
+ ((char*)mempcpy(dst + len, c + 1, *c))[0] = '.';
len += *c + 1;
crtpos += *c + 1;
- if (dst)
- dst[len - 1] = '.';
} else {
/* NUL: end of current domain name */
if (retpos == 0) {
@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t
crtpos = retpos;
retpos = depth = 0;
}
- if (dst)
+ if (dst && len != 0)
+ /* \4host\3com\0\4host and we are at \0:
+ * \3com was converted to "com.", change dot to space.
+ */
dst[len - 1] = ' ';
}
@@ -228,6 +230,9 @@ int main(int argc, char **argv)
int len;
uint8_t *encoded;
+ uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 };
+ printf("NUL:'%s'\n", dname_dec(str, 6, ""));
+
#define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), sizeof(encoded), (pre))
printf("'%s'\n", DNAME_DEC("\4host\3com\0", "test1:"));
printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", ""));

View File

@@ -0,0 +1,32 @@
From 1b7c17391de66502dd7a97c866e0a33681edbb1f Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Fri, 11 Mar 2016 00:26:58 +0100
Subject: [PATCH] udhcpc: fix a warning in debug code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Upsteam-Status: Backport
CVE: CVE-2016-2147 regression fix
https://git.busybox.net/busybox/commit/?id=1b7c17
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
networking/udhcp/domain_codec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
index cee31f1..5a923cc 100644
--- a/networking/udhcp/domain_codec.c
+++ b/networking/udhcp/domain_codec.c
@@ -7,6 +7,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#ifdef DNS_COMPR_TESTING
+# define _GNU_SOURCE
# define FAST_FUNC /* nothing */
# define xmalloc malloc
# include <stdlib.h>
--
2.3.5

View File

@@ -0,0 +1,74 @@
From 352f79acbd759c14399e39baef21fc4ffe180ac2 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Fri, 26 Feb 2016 15:54:56 +0100
Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced
buffer)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Upstream-Status: Backport
CVE: CVE-2016-2148
https://git.busybox.net/busybox/commit/?id=352f79
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
networking/udhcp/common.c | 15 +++++++++++++--
networking/udhcp/dhcpc.c | 4 ++--
2 files changed, 15 insertions(+), 4 deletions(-)
Index: busybox-1.23.2/networking/udhcp/common.c
===================================================================
--- busybox-1.23.2.orig/networking/udhcp/common.c
+++ busybox-1.23.2/networking/udhcp/common.c
@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1
* udhcp_str2optset: to determine how many bytes to allocate.
* xmalloc_optname_optval: to estimate string length
* from binary option length: (option[LEN] / dhcp_option_lengths[opt_type])
- * is the number of elements, multiply in by one element's string width
+ * is the number of elements, multiply it by one element's string width
* (len_of_option_as_string[opt_type]) and you know how wide string you need.
*/
const uint8_t dhcp_option_lengths[] ALIGN1 = {
@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIG
[OPTION_S32] = 4,
/* Just like OPTION_STRING, we use minimum length here */
[OPTION_STATIC_ROUTES] = 5,
- [OPTION_6RD] = 22, /* ignored by udhcp_str2optset */
+ [OPTION_6RD] = 12, /* ignored by udhcp_str2optset */
+ /* The above value was chosen as follows:
+ * len_of_option_as_string[] for this option is >60: it's a string of the form
+ * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ".
+ * Each additional ipv4 address takes 4 bytes in binary option and appends
+ * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 4
+ * but this severely overestimates string length: instead of 16 bytes,
+ * it adds >60 for every 4 bytes in binary option.
+ * We cheat and declare here that option is in units of 12 bytes.
+ * This adds more than 60 bytes for every three ipv4 addresses - more than enough.
+ * (Even 16 instead of 12 should work, but let's be paranoid).
+ */
};
Index: busybox-1.23.2/networking/udhcp/dhcpc.c
===================================================================
--- busybox-1.23.2.orig/networking/udhcp/dhcpc.c
+++ busybox-1.23.2/networking/udhcp/dhcpc.c
@@ -103,7 +103,7 @@ static const uint8_t len_of_option_as_st
[OPTION_IP ] = sizeof("255.255.255.255 "),
[OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
[OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
- [OPTION_6RD ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
+ [OPTION_6RD ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
[OPTION_STRING ] = 1,
[OPTION_STRING_HOST ] = 1,
#if ENABLE_FEATURE_UDHCP_RFC3397
@@ -214,7 +214,7 @@ static NOINLINE char *xmalloc_optname_op
type = optflag->flags & OPTION_TYPE_MASK;
optlen = dhcp_option_lengths[type];
upper_length = len_of_option_as_string[type]
- * ((unsigned)(len + optlen - 1) / (unsigned)optlen);
+ * ((unsigned)(len + optlen) / (unsigned)optlen);
dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
dest += sprintf(ret, "%s=", opt_name);

View File

@@ -35,10 +35,15 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://0001-chown-fix-help-text.patch \
file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
file://0002-Passthrough-r-to-linker.patch \
file://0001-randconfig-fix.patch \
file://0001-zcip-fix-wrong-comparison-of-source-IP-with-our-IP.patch \
file://mount-via-label.cfg \
file://sha1sum.cfg \
file://sha256sum.cfg \
file://getopts.cfg \
file://CVE-2016-2148.patch \
file://CVE-2016-2147.patch \
file://CVE-2016-2147_2.patch \
"
SRC_URI[tarball.md5sum] = "7925683d7dd105aabe9b6b618d48cc73"

View File

@@ -1,6 +1,6 @@
require busybox.inc
SRCREV = "be947c4d97c0dacb703a6f24dd813ff6dd3a33b6"
SRCREV = "4d15068d83054a9f82b3f8842706cd6deb401e25"
# Lookout for PV bump too when SRCREV is changed
PV = "1.23.2+git${SRCPV}"

View File

@@ -20,6 +20,7 @@ GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
file://fix_for_centos_5.8.patch \
file://strcoll-Remove-incorrect-STRDIFF-based-optimization-.patch \
${EGLIBCPATCHES} \
"
EGLIBCPATCHES = "\

View File

@@ -87,7 +87,7 @@ do_install () {
if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then
cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}
fi
chown root.root -R ${D}
chown root:root -R ${D}
cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR}
}

View File

@@ -0,0 +1,84 @@
From cadaf1336332ca7bcdfe4a400776e5782a20e26d Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Wed, 28 Oct 2015 07:49:44 -0700
Subject: [PATCH] Keep only ELF_RTYPE_CLASS_{PLT|COPY} bits for prelink
prelink runs ld.so with the environment variable LD_TRACE_PRELINKING
set to dump the relocation type class from _dl_debug_bindings. prelink
has the following relocation type classes:
#define RTYPE_CLASS_VALID 8
#define RTYPE_CLASS_PLT (8|1)
#define RTYPE_CLASS_COPY (8|2)
#define RTYPE_CLASS_TLS (8|4)
where ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA has a conflict with
RTYPE_CLASS_TLS.
Since prelink only uses ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY
bits, we should clear the other bits when the DL_DEBUG_PRELINK bit is
set.
[BZ #19178]
* elf/dl-lookup.c (RTYPE_CLASS_VALID): New.
(RTYPE_CLASS_PLT): Likewise.
(RTYPE_CLASS_COPY): Likewise.
(RTYPE_CLASS_TLS): Likewise.
(_dl_debug_bindings): Use RTYPE_CLASS_TLS and RTYPE_CLASS_VALID
to set relocation type class for DL_DEBUG_PRELINK. Keep only
ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY bits for
DL_DEBUG_PRELINK.
Upstream-Status: submitted (https://sourceware.org/bugzilla/show_bug.cgi?id=19178)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
elf/dl-lookup.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 581fb20..6ae6cc3 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -1016,6 +1016,18 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
#ifdef SHARED
if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
{
+/* ELF_RTYPE_CLASS_XXX must match RTYPE_CLASS_XXX used by prelink with
+ LD_TRACE_PRELINKING. */
+#define RTYPE_CLASS_VALID 8
+#define RTYPE_CLASS_PLT (8|1)
+#define RTYPE_CLASS_COPY (8|2)
+#define RTYPE_CLASS_TLS (8|4)
+#if ELF_RTYPE_CLASS_PLT != 0 && ELF_RTYPE_CLASS_PLT != 1
+# error ELF_RTYPE_CLASS_PLT must be 0 or 1!
+#endif
+#if ELF_RTYPE_CLASS_COPY != 0 && ELF_RTYPE_CLASS_COPY != 2
+# error ELF_RTYPE_CLASS_COPY must be 0 or 2!
+#endif
int conflict = 0;
struct sym_val val = { NULL, NULL };
@@ -1071,12 +1083,17 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
if (value->s)
{
+ /* Keep only ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY
+ bits since since prelink only uses them. */
+ type_class &= ELF_RTYPE_CLASS_PLT | ELF_RTYPE_CLASS_COPY;
if (__glibc_unlikely (ELFW(ST_TYPE) (value->s->st_info)
== STT_TLS))
- type_class = 4;
+ /* Clear the RTYPE_CLASS_VALID bit in RTYPE_CLASS_TLS. */
+ type_class = RTYPE_CLASS_TLS & ~RTYPE_CLASS_VALID;
else if (__glibc_unlikely (ELFW(ST_TYPE) (value->s->st_info)
== STT_GNU_IFUNC))
- type_class |= 8;
+ /* Set the RTYPE_CLASS_VALID bit. */
+ type_class |= RTYPE_CLASS_VALID;
}
if (conflict
--
1.9.3

View File

@@ -0,0 +1,642 @@
From e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca Mon Sep 17 00:00:00 2001
From: Carlos O'Donell <carlos@systemhalted.org>
Date: Tue, 16 Feb 2016 21:26:37 -0500
Subject: [PATCH] CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug
18665).
* A stack-based buffer overflow was found in libresolv when invoked from
libnss_dns, allowing specially crafted DNS responses to seize control
of execution flow in the DNS client. The buffer overflow occurs in
the functions send_dg (send datagram) and send_vc (send TCP) for the
NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
family. The use of AF_UNSPEC triggers the low-level resolver code to
send out two parallel queries for A and AAAA. A mismanagement of the
buffers used for those queries could result in the response of a query
writing beyond the alloca allocated buffer created by
_nss_dns_gethostbyname4_r. Buffer management is simplified to remove
the overflow. Thanks to the Google Security Team and Red Hat for
reporting the security impact of this issue, and Robert Holiday of
Ciena for reporting the related bug 18665. (CVE-2015-7547)
See also:
https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html
https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html
Upstream-Status: Backport
CVE: CVE-2015-7547
https://sourceware.org/git/?p=glibc.git;a=commit;h=e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca
minor tweeking to apply to Changelog and res_send.c
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
ChangeLog | 17 ++-
NEWS | 14 +++
resolv/nss_dns/dns-host.c | 111 +++++++++++++++++++-
resolv/res_query.c | 3 +
resolv/res_send.c | 260 +++++++++++++++++++++++++++++++++++-----------
5 files changed, 339 insertions(+), 66 deletions(-)
Index: git/NEWS
===================================================================
--- git.orig/NEWS
+++ git/NEWS
@@ -105,6 +105,20 @@ Security related changes:
depending on the length of the string passed as an argument to the
functions. Reported by Joseph Myers.
+* A stack-based buffer overflow was found in libresolv when invoked from
+ libnss_dns, allowing specially crafted DNS responses to seize control
+ of execution flow in the DNS client. The buffer overflow occurs in
+ the functions send_dg (send datagram) and send_vc (send TCP) for the
+ NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
+ family. The use of AF_UNSPEC triggers the low-level resolver code to
+ send out two parallel queries for A and AAAA. A mismanagement of the
+ buffers used for those queries could result in the response of a query
+ writing beyond the alloca allocated buffer created by
+ _nss_dns_gethostbyname4_r. Buffer management is simplified to remove
+ the overflow. Thanks to the Google Security Team and Red Hat for
+ reporting the security impact of this issue, and Robert Holiday of
+ Ciena for reporting the related bug 18665. (CVE-2015-7547)
+
* The following bugs are resolved with this release:
6652, 10672, 12674, 12847, 12926, 13862, 14132, 14138, 14171, 14498,
Index: git/resolv/nss_dns/dns-host.c
===================================================================
--- git.orig/resolv/nss_dns/dns-host.c
+++ git/resolv/nss_dns/dns-host.c
@@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *an
int h_namelen = 0;
if (ancount == 0)
- return NSS_STATUS_NOTFOUND;
+ {
+ *h_errnop = HOST_NOT_FOUND;
+ return NSS_STATUS_NOTFOUND;
+ }
while (ancount-- > 0 && cp < end_of_message && had_error == 0)
{
@@ -1208,7 +1211,14 @@ gaih_getanswer_slice (const querybuf *an
/* Special case here: if the resolver sent a result but it only
contains a CNAME while we are looking for a T_A or T_AAAA record,
we fail with NOTFOUND instead of TRYAGAIN. */
- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND;
+ if (canon != NULL)
+ {
+ *h_errnop = HOST_NOT_FOUND;
+ return NSS_STATUS_NOTFOUND;
+ }
+
+ *h_errnop = NETDB_INTERNAL;
+ return NSS_STATUS_TRYAGAIN;
}
@@ -1222,11 +1232,101 @@ gaih_getanswer (const querybuf *answer1,
enum nss_status status = NSS_STATUS_NOTFOUND;
+ /* Combining the NSS status of two distinct queries requires some
+ compromise and attention to symmetry (A or AAAA queries can be
+ returned in any order). What follows is a breakdown of how this
+ code is expected to work and why. We discuss only SUCCESS,
+ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns
+ that apply (though RETURN and MERGE exist). We make a distinction
+ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable).
+ A recoverable TRYAGAIN is almost always due to buffer size issues
+ and returns ERANGE in errno and the caller is expected to retry
+ with a larger buffer.
+
+ Lastly, you may be tempted to make significant changes to the
+ conditions in this code to bring about symmetry between responses.
+ Please don't change anything without due consideration for
+ expected application behaviour. Some of the synthesized responses
+ aren't very well thought out and sometimes appear to imply that
+ IPv4 responses are always answer 1, and IPv6 responses are always
+ answer 2, but that's not true (see the implementation of send_dg
+ and send_vc to see response can arrive in any order, particularly
+ for UDP). However, we expect it holds roughly enough of the time
+ that this code works, but certainly needs to be fixed to make this
+ a more robust implementation.
+
+ ----------------------------------------------
+ | Answer 1 Status / | Synthesized | Reason |
+ | Answer 2 Status | Status | |
+ |--------------------------------------------|
+ | SUCCESS/SUCCESS | SUCCESS | [1] |
+ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] |
+ | SUCCESS/TRYAGAIN' | SUCCESS | [1] |
+ | SUCCESS/NOTFOUND | SUCCESS | [1] |
+ | SUCCESS/UNAVAIL | SUCCESS | [1] |
+ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] |
+ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] |
+ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] |
+ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] |
+ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] |
+ | TRYAGAIN'/SUCCESS | SUCCESS | [3] |
+ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] |
+ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] |
+ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] |
+ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] |
+ | NOTFOUND/SUCCESS | SUCCESS | [3] |
+ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] |
+ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] |
+ | NOTFOUND/NOTFOUND | NOTFOUND | [3] |
+ | NOTFOUND/UNAVAIL | UNAVAIL | [3] |
+ | UNAVAIL/SUCCESS | UNAVAIL | [4] |
+ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] |
+ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] |
+ | UNAVAIL/NOTFOUND | UNAVAIL | [4] |
+ | UNAVAIL/UNAVAIL | UNAVAIL | [4] |
+ ----------------------------------------------
+
+ [1] If the first response is a success we return success.
+ This ignores the state of the second answer and in fact
+ incorrectly sets errno and h_errno to that of the second
+ answer. However because the response is a success we ignore
+ *errnop and *h_errnop (though that means you touched errno on
+ success). We are being conservative here and returning the
+ likely IPv4 response in the first answer as a success.
+
+ [2] If the first response is a recoverable TRYAGAIN we return
+ that instead of looking at the second response. The
+ expectation here is that we have failed to get an IPv4 response
+ and should retry both queries.
+
+ [3] If the first response was not a SUCCESS and the second
+ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN,
+ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the
+ result from the second response, otherwise the first responses
+ status is used. Again we have some odd side-effects when the
+ second response is NOTFOUND because we overwrite *errnop and
+ *h_errnop that means that a first answer of NOTFOUND might see
+ its *errnop and *h_errnop values altered. Whether it matters
+ in practice that a first response NOTFOUND has the wrong
+ *errnop and *h_errnop is undecided.
+
+ [4] If the first response is UNAVAIL we return that instead of
+ looking at the second response. The expectation here is that
+ it will have failed similarly e.g. configuration failure.
+
+ [5] Testing this code is complicated by the fact that truncated
+ second response buffers might be returned as SUCCESS if the
+ first answer is a SUCCESS. To fix this we add symmetry to
+ TRYAGAIN with the second response. If the second response
+ is a recoverable error we now return TRYAGIN even if the first
+ response was SUCCESS. */
+
if (anslen1 > 0)
status = gaih_getanswer_slice(answer1, anslen1, qname,
&pat, &buffer, &buflen,
errnop, h_errnop, ttlp,
&first);
+
if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND
|| (status == NSS_STATUS_TRYAGAIN
/* We want to look at the second answer in case of an
@@ -1242,8 +1342,15 @@ gaih_getanswer (const querybuf *answer1,
&pat, &buffer, &buflen,
errnop, h_errnop, ttlp,
&first);
+ /* Use the second response status in some cases. */
if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND)
status = status2;
+ /* Do not return a truncated second response (unless it was
+ unavoidable e.g. unrecoverable TRYAGAIN). */
+ if (status == NSS_STATUS_SUCCESS
+ && (status2 == NSS_STATUS_TRYAGAIN
+ && *errnop == ERANGE && *h_errnop != NO_RECOVERY))
+ status = NSS_STATUS_TRYAGAIN;
}
return status;
Index: git/resolv/res_query.c
===================================================================
--- git.orig/resolv/res_query.c
+++ git/resolv/res_query.c
@@ -396,6 +396,7 @@ __libc_res_nsearch(res_state statp,
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
*answerp2_malloced = 0;
}
}
@@ -447,6 +448,7 @@ __libc_res_nsearch(res_state statp,
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
*answerp2_malloced = 0;
}
@@ -521,6 +523,7 @@ __libc_res_nsearch(res_state statp,
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
*answerp2_malloced = 0;
}
if (saved_herrno != -1)
Index: git/resolv/res_send.c
===================================================================
--- git.orig/resolv/res_send.c
+++ git/resolv/res_send.c
@@ -1,3 +1,20 @@
+/* Copyright (C) 2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
/*
* Copyright (c) 1985, 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -363,6 +380,8 @@ __libc_res_nsend(res_state statp, const
#ifdef USE_HOOKS
if (__glibc_unlikely (statp->qhook || statp->rhook)) {
if (anssiz < MAXPACKET && ansp) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *buf = malloc (MAXPACKET);
if (buf == NULL)
return (-1);
@@ -638,6 +657,77 @@ get_nsaddr (res_state statp, int n)
return (struct sockaddr *) (void *) &statp->nsaddr_list[n];
}
+/* The send_vc function is responsible for sending a DNS query over TCP
+ to the nameserver numbered NS from the res_state STATP i.e.
+ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and
+ IPv6 queries at the same serially on the same socket.
+
+ Please note that for TCP there is no way to disable sending both
+ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP
+ and sends the queries serially and waits for the result after each
+ sent query. This implemetnation should be corrected to honour these
+ options.
+
+ Please also note that for TCP we send both queries over the same
+ socket one after another. This technically violates best practice
+ since the server is allowed to read the first query, respond, and
+ then close the socket (to service another client). If the server
+ does this, then the remaining second query in the socket data buffer
+ will cause the server to send the client an RST which will arrive
+ asynchronously and the client's OS will likely tear down the socket
+ receive buffer resulting in a potentially short read and lost
+ response data. This will force the client to retry the query again,
+ and this process may repeat until all servers and connection resets
+ are exhausted and then the query will fail. It's not known if this
+ happens with any frequency in real DNS server implementations. This
+ implementation should be corrected to use two sockets by default for
+ parallel queries.
+
+ The query stored in BUF of BUFLEN length is sent first followed by
+ the query stored in BUF2 of BUFLEN2 length. Queries are sent
+ serially on the same socket.
+
+ Answers to the query are stored firstly in *ANSP up to a max of
+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
+ is non-NULL (to indicate that modifying the answer buffer is allowed)
+ then malloc is used to allocate a new response buffer and ANSCP and
+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
+ are needed but ANSCP is NULL, then as much of the response as
+ possible is read into the buffer, but the results will be truncated.
+ When truncation happens because of a small answer buffer the DNS
+ packets header field TC will bet set to 1, indicating a truncated
+ message and the rest of the socket data will be read and discarded.
+
+ Answers to the query are stored secondly in *ANSP2 up to a max of
+ *ANSSIZP2 bytes, with the actual response length stored in
+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
+ is non-NULL (required for a second query) then malloc is used to
+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
+ size and *ANSP2_MALLOCED is set to 1.
+
+ The ANSP2_MALLOCED argument will eventually be removed as the
+ change in buffer pointer can be used to detect the buffer has
+ changed and that the caller should use free on the new buffer.
+
+ Note that the answers may arrive in any order from the server and
+ therefore the first and second answer buffers may not correspond to
+ the first and second queries.
+
+ It is not supported to call this function with a non-NULL ANSP2
+ but a NULL ANSCP. Put another way, you can call send_vc with a
+ single unmodifiable buffer or two modifiable buffers, but no other
+ combination is supported.
+
+ It is the caller's responsibility to free the malloc allocated
+ buffers by detecting that the pointers have changed from their
+ original values i.e. *ANSCP or *ANSP2 has changed.
+
+ If errors are encountered then *TERRNO is set to an appropriate
+ errno value and a zero result is returned for a recoverable error,
+ and a less-than zero result is returned for a non-recoverable error.
+
+ If no errors are encountered then *TERRNO is left unmodified and
+ a the length of the first response in bytes is returned. */
static int
send_vc(res_state statp,
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
@@ -647,11 +737,7 @@ send_vc(res_state statp,
{
const HEADER *hp = (HEADER *) buf;
const HEADER *hp2 = (HEADER *) buf2;
- u_char *ans = *ansp;
- int orig_anssizp = *anssizp;
- // XXX REMOVE
- // int anssiz = *anssizp;
- HEADER *anhp = (HEADER *) ans;
+ HEADER *anhp = (HEADER *) *ansp;
struct sockaddr *nsap = get_nsaddr (statp, ns);
int truncating, connreset, n;
/* On some architectures compiler might emit a warning indicating
@@ -743,6 +829,8 @@ send_vc(res_state statp,
* Receive length & response
*/
int recvresp1 = 0;
+ /* Skip the second response if there is no second query.
+ To do that we mark the second response as received. */
int recvresp2 = buf2 == NULL;
uint16_t rlen16;
read_len:
@@ -779,40 +867,14 @@ send_vc(res_state statp,
u_char **thisansp;
int *thisresplenp;
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
+ /* We have not received any responses
+ yet or we only have one response to
+ receive. */
thisanssizp = anssizp;
thisansp = anscp ?: ansp;
assert (anscp != NULL || ansp2 == NULL);
thisresplenp = &resplen;
} else {
- if (*anssizp != MAXPACKET) {
- /* No buffer allocated for the first
- reply. We can try to use the rest
- of the user-provided buffer. */
-#if __GNUC_PREREQ (4, 7)
- DIAG_PUSH_NEEDS_COMMENT;
- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
-#endif
-#if _STRING_ARCH_unaligned
- *anssizp2 = orig_anssizp - resplen;
- *ansp2 = *ansp + resplen;
-#else
- int aligned_resplen
- = ((resplen + __alignof__ (HEADER) - 1)
- & ~(__alignof__ (HEADER) - 1));
- *anssizp2 = orig_anssizp - aligned_resplen;
- *ansp2 = *ansp + aligned_resplen;
-#endif
-#if __GNUC_PREREQ (4, 7)
- DIAG_POP_NEEDS_COMMENT;
-#endif
- } else {
- /* The first reply did not fit into the
- user-provided buffer. Maybe the second
- answer will. */
- *anssizp2 = orig_anssizp;
- *ansp2 = *ansp;
- }
-
thisanssizp = anssizp2;
thisansp = ansp2;
thisresplenp = resplen2;
@@ -820,10 +882,14 @@ send_vc(res_state statp,
anhp = (HEADER *) *thisansp;
*thisresplenp = rlen;
- if (rlen > *thisanssizp) {
- /* Yes, we test ANSCP here. If we have two buffers
- both will be allocatable. */
- if (__glibc_likely (anscp != NULL)) {
+ /* Is the answer buffer too small? */
+ if (*thisanssizp < rlen) {
+ /* If the current buffer is not the the static
+ user-supplied buffer then we can reallocate
+ it. */
+ if (thisansp != NULL && thisansp != ansp) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *newp = malloc (MAXPACKET);
if (newp == NULL) {
*terrno = ENOMEM;
@@ -835,6 +901,9 @@ send_vc(res_state statp,
if (thisansp == ansp2)
*ansp2_malloced = 1;
anhp = (HEADER *) newp;
+ /* A uint16_t can't be larger than MAXPACKET
+ thus it's safe to allocate MAXPACKET but
+ read RLEN bytes instead. */
len = rlen;
} else {
Dprint(statp->options & RES_DEBUG,
@@ -997,6 +1066,66 @@ reopen (res_state statp, int *terrno, in
return 1;
}
+/* The send_dg function is responsible for sending a DNS query over UDP
+ to the nameserver numbered NS from the res_state STATP i.e.
+ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries
+ along with the ability to send the query in parallel for both stacks
+ (default) or serially (RES_SINGLKUP). It also supports serial lookup
+ with a close and reopen of the socket used to talk to the server
+ (RES_SNGLKUPREOP) to work around broken name servers.
+
+ The query stored in BUF of BUFLEN length is sent first followed by
+ the query stored in BUF2 of BUFLEN2 length. Queries are sent
+ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP).
+
+ Answers to the query are stored firstly in *ANSP up to a max of
+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
+ is non-NULL (to indicate that modifying the answer buffer is allowed)
+ then malloc is used to allocate a new response buffer and ANSCP and
+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
+ are needed but ANSCP is NULL, then as much of the response as
+ possible is read into the buffer, but the results will be truncated.
+ When truncation happens because of a small answer buffer the DNS
+ packets header field TC will bet set to 1, indicating a truncated
+ message, while the rest of the UDP packet is discarded.
+
+ Answers to the query are stored secondly in *ANSP2 up to a max of
+ *ANSSIZP2 bytes, with the actual response length stored in
+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
+ is non-NULL (required for a second query) then malloc is used to
+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
+ size and *ANSP2_MALLOCED is set to 1.
+
+ The ANSP2_MALLOCED argument will eventually be removed as the
+ change in buffer pointer can be used to detect the buffer has
+ changed and that the caller should use free on the new buffer.
+
+ Note that the answers may arrive in any order from the server and
+ therefore the first and second answer buffers may not correspond to
+ the first and second queries.
+
+ It is not supported to call this function with a non-NULL ANSP2
+ but a NULL ANSCP. Put another way, you can call send_vc with a
+ single unmodifiable buffer or two modifiable buffers, but no other
+ combination is supported.
+
+ It is the caller's responsibility to free the malloc allocated
+ buffers by detecting that the pointers have changed from their
+ original values i.e. *ANSCP or *ANSP2 has changed.
+
+ If an answer is truncated because of UDP datagram DNS limits then
+ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to
+ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1
+ if any progress was made reading a response from the nameserver and
+ is used by the caller to distinguish between ECONNREFUSED and
+ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1).
+
+ If errors are encountered then *TERRNO is set to an appropriate
+ errno value and a zero result is returned for a recoverable error,
+ and a less-than zero result is returned for a non-recoverable error.
+
+ If no errors are encountered then *TERRNO is left unmodified and
+ a the length of the first response in bytes is returned. */
static int
send_dg(res_state statp,
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
@@ -1006,8 +1135,6 @@ send_dg(res_state statp,
{
const HEADER *hp = (HEADER *) buf;
const HEADER *hp2 = (HEADER *) buf2;
- u_char *ans = *ansp;
- int orig_anssizp = *anssizp;
struct timespec now, timeout, finish;
struct pollfd pfd[1];
int ptimeout;
@@ -1040,6 +1167,8 @@ send_dg(res_state statp,
int need_recompute = 0;
int nwritten = 0;
int recvresp1 = 0;
+ /* Skip the second response if there is no second query.
+ To do that we mark the second response as received. */
int recvresp2 = buf2 == NULL;
pfd[0].fd = EXT(statp).nssocks[ns];
pfd[0].events = POLLOUT;
@@ -1203,55 +1332,56 @@ send_dg(res_state statp,
int *thisresplenp;
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
+ /* We have not received any responses
+ yet or we only have one response to
+ receive. */
thisanssizp = anssizp;
thisansp = anscp ?: ansp;
assert (anscp != NULL || ansp2 == NULL);
thisresplenp = &resplen;
} else {
- if (*anssizp != MAXPACKET) {
- /* No buffer allocated for the first
- reply. We can try to use the rest
- of the user-provided buffer. */
-#if _STRING_ARCH_unaligned
- *anssizp2 = orig_anssizp - resplen;
- *ansp2 = *ansp + resplen;
-#else
- int aligned_resplen
- = ((resplen + __alignof__ (HEADER) - 1)
- & ~(__alignof__ (HEADER) - 1));
- *anssizp2 = orig_anssizp - aligned_resplen;
- *ansp2 = *ansp + aligned_resplen;
-#endif
- } else {
- /* The first reply did not fit into the
- user-provided buffer. Maybe the second
- answer will. */
- *anssizp2 = orig_anssizp;
- *ansp2 = *ansp;
- }
-
thisanssizp = anssizp2;
thisansp = ansp2;
thisresplenp = resplen2;
}
if (*thisanssizp < MAXPACKET
- /* Yes, we test ANSCP here. If we have two buffers
- both will be allocatable. */
- && anscp
+ /* If the current buffer is not the the static
+ user-supplied buffer then we can reallocate
+ it. */
+ && (thisansp != NULL && thisansp != ansp)
#ifdef FIONREAD
+ /* Is the size too small? */
&& (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
|| *thisanssizp < *thisresplenp)
#endif
) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *newp = malloc (MAXPACKET);
if (newp != NULL) {
- *anssizp = MAXPACKET;
- *thisansp = ans = newp;
+ *thisanssizp = MAXPACKET;
+ *thisansp = newp;
if (thisansp == ansp2)
*ansp2_malloced = 1;
}
}
+ /* We could end up with truncation if anscp was NULL
+ (not allowed to change caller's buffer) and the
+ response buffer size is too small. This isn't a
+ reliable way to detect truncation because the ioctl
+ may be an inaccurate report of the UDP message size.
+ Therefore we use this only to issue debug output.
+ To do truncation accurately with UDP we need
+ MSG_TRUNC which is only available on Linux. We
+ can abstract out the Linux-specific feature in the
+ future to detect truncation. */
+ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) {
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; response may be truncated (UDP)\n")
+ );
+ }
+
HEADER *anhp = (HEADER *) *thisansp;
socklen_t fromlen = sizeof(struct sockaddr_in6);
assert (sizeof(from) <= fromlen);
Index: git/ChangeLog
===================================================================
--- git.orig/ChangeLog
+++ git/ChangeLog
@@ -1,3 +1,18 @@
+2016-02-15 Carlos O'Donell <carlos@redhat.com>
+
+ [BZ #18665]
+ * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
+ *herrno_p.
+ (gaih_getanswer): Document functional behviour. Return tryagain
+ if any result is tryagain.
+ * resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
+ when freed.
+ * resolv/res_send.c: Add copyright text.
+ (__libc_res_nsend): Document that MAXPACKET is expected.
+ (send_vc): Document. Remove buffer reuse.
+ (send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
+ size of the buffer. Add Dprint for truncated UDP buffer.
+
2015-09-26 Paul Pluzhnikov <ppluzhnikov@google.com>
[BZ #18985]

View File

@@ -0,0 +1,155 @@
From d36c75fc0d44deec29635dd239b0fbd206ca49b7 Mon Sep 17 00:00:00 2001
From: Paul Pluzhnikov <ppluzhnikov@google.com>
Date: Sat, 26 Sep 2015 13:27:48 -0700
Subject: [PATCH] Fix BZ #18985 -- out of range data to strftime() causes a
segfault
Upstream-Status: Backport
CVE: CVE-2015-8776
[Yocto # 8980]
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d36c75fc0d44deec29635dd239b0fbd206ca49b7
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
ChangeLog | 8 ++++++++
NEWS | 2 +-
time/strftime_l.c | 20 +++++++++++++-------
time/tst-strftime.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 73 insertions(+), 9 deletions(-)
Index: git/ChangeLog
===================================================================
--- git.orig/ChangeLog
+++ git/ChangeLog
@@ -1,3 +1,11 @@
+2015-09-26 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ [BZ #18985]
+ * time/strftime_l.c (a_wkday, f_wkday, a_month, f_month): Range check.
+ (__strftime_internal): Likewise.
+ * time/tst-strftime.c (do_bz18985): New test.
+ (do_test): Call it.
+
2015-12-04 Joseph Myers <joseph@codesourcery.com>
[BZ #16961]
Index: git/time/strftime_l.c
===================================================================
--- git.orig/time/strftime_l.c
+++ git/time/strftime_l.c
@@ -514,13 +514,17 @@ __strftime_internal (s, maxsize, format,
only a few elements. Dereference the pointers only if the format
requires this. Then it is ok to fail if the pointers are invalid. */
# define a_wkday \
- ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday))
+ ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6 \
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)))
# define f_wkday \
- ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday))
+ ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6 \
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)))
# define a_month \
- ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon))
+ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)))
# define f_month \
- ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon))
+ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
# define ampm \
((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \
? NLW(PM_STR) : NLW(AM_STR)))
@@ -530,8 +534,10 @@ __strftime_internal (s, maxsize, format,
# define ap_len STRLEN (ampm)
#else
# if !HAVE_STRFTIME
-# define f_wkday (weekday_name[tp->tm_wday])
-# define f_month (month_name[tp->tm_mon])
+# define f_wkday (tp->tm_wday < 0 || tp->tm_wday > 6 \
+ ? "?" : weekday_name[tp->tm_wday])
+# define f_month (tp->tm_mon < 0 || tp->tm_mon > 11 \
+ ? "?" : month_name[tp->tm_mon])
# define a_wkday f_wkday
# define a_month f_month
# define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11))
@@ -1325,7 +1331,7 @@ __strftime_internal (s, maxsize, format,
*tzset_called = true;
}
# endif
- zone = tzname[tp->tm_isdst];
+ zone = tp->tm_isdst <= 1 ? tzname[tp->tm_isdst] : "?";
}
#endif
if (! zone)
Index: git/time/tst-strftime.c
===================================================================
--- git.orig/time/tst-strftime.c
+++ git/time/tst-strftime.c
@@ -4,6 +4,56 @@
#include <time.h>
+static int
+do_bz18985 (void)
+{
+ char buf[1000];
+ struct tm ttm;
+ int rc, ret = 0;
+
+ memset (&ttm, 1, sizeof (ttm));
+ ttm.tm_zone = NULL; /* Dereferenced directly if non-NULL. */
+ rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm);
+
+ if (rc == 66)
+ {
+ const char expected[]
+ = "? ? ? ? ? ? 16843009 16843009:16843009:16843009 16844909 +467836 ?";
+ if (0 != strcmp (buf, expected))
+ {
+ printf ("expected:\n %s\ngot:\n %s\n", expected, buf);
+ ret += 1;
+ }
+ }
+ else
+ {
+ printf ("expected 66, got %d\n", rc);
+ ret += 1;
+ }
+
+ /* Check negative values as well. */
+ memset (&ttm, 0xFF, sizeof (ttm));
+ ttm.tm_zone = NULL; /* Dereferenced directly if non-NULL. */
+ rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm);
+
+ if (rc == 30)
+ {
+ const char expected[] = "? ? ? ? ? ? -1 -1:-1:-1 1899 ";
+ if (0 != strcmp (buf, expected))
+ {
+ printf ("expected:\n %s\ngot:\n %s\n", expected, buf);
+ ret += 1;
+ }
+ }
+ else
+ {
+ printf ("expected 30, got %d\n", rc);
+ ret += 1;
+ }
+
+ return ret;
+}
+
static struct
{
const char *fmt;
@@ -104,7 +154,7 @@ do_test (void)
}
}
- return result;
+ return result + do_bz18985 ();
}
#define TEST_FUNCTION do_test ()

View File

@@ -0,0 +1,123 @@
From a014cecd82b71b70a6a843e250e06b541ad524f7 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 15 Oct 2015 09:23:07 +0200
Subject: [PATCH] Always enable pointer guard [BZ #18928]
Honoring the LD_POINTER_GUARD environment variable in AT_SECURE mode
has security implications. This commit enables pointer guard
unconditionally, and the environment variable is now ignored.
[BZ #18928]
* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
_dl_pointer_guard member.
* elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
initializer.
(security_init): Always set up pointer guard.
(process_envvars): Do not process LD_POINTER_GUARD.
Upstream-Status: Backport
CVE: CVE-2015-8777
[Yocto # 8980]
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=a014cecd82b71b70a6a843e250e06b541ad524f7
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
ChangeLog | 10 ++++++++++
NEWS | 13 ++++++++-----
elf/rtld.c | 15 ++++-----------
sysdeps/generic/ldsodefs.h | 3 ---
4 files changed, 22 insertions(+), 19 deletions(-)
Index: git/ChangeLog
===================================================================
--- git.orig/ChangeLog
+++ git/ChangeLog
@@ -1,3 +1,14 @@
+2015-10-15 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #18928]
+ * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
+ _dl_pointer_guard member.
+ * elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
+ initializer.
+ (security_init): Always set up pointer guard.
+ (process_envvars): Do not process LD_POINTER_GUARD.
+
+
2015-08-10 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
[BZ #18778]
Index: git/NEWS
===================================================================
--- git.orig/NEWS
+++ git/NEWS
@@ -34,7 +34,10 @@ Version 2.22
18533, 18534, 18536, 18539, 18540, 18542, 18544, 18545, 18546, 18547,
18549, 18553, 18557, 18558, 18569, 18583, 18585, 18586, 18592, 18593,
18594, 18602, 18612, 18613, 18619, 18633, 18635, 18641, 18643, 18648,
- 18657, 18676, 18694, 18696.
+ 18657, 18676, 18694, 18696, 18928.
+
+* The LD_POINTER_GUARD environment variable can no longer be used to
+ disable the pointer guard feature. It is always enabled.
* Cache information can be queried via sysconf() function on s390 e.g. with
_SC_LEVEL1_ICACHE_SIZE as argument.
Index: git/elf/rtld.c
===================================================================
--- git.orig/elf/rtld.c
+++ git/elf/rtld.c
@@ -163,7 +163,6 @@ struct rtld_global_ro _rtld_global_ro at
._dl_hwcap_mask = HWCAP_IMPORTANT,
._dl_lazy = 1,
._dl_fpu_control = _FPU_DEFAULT,
- ._dl_pointer_guard = 1,
._dl_pagesize = EXEC_PAGESIZE,
._dl_inhibit_cache = 0,
@@ -710,15 +709,12 @@ security_init (void)
#endif
/* Set up the pointer guard as well, if necessary. */
- if (GLRO(dl_pointer_guard))
- {
- uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
- stack_chk_guard);
+ uintptr_t pointer_chk_guard
+ = _dl_setup_pointer_guard (_dl_random, stack_chk_guard);
#ifdef THREAD_SET_POINTER_GUARD
- THREAD_SET_POINTER_GUARD (pointer_chk_guard);
+ THREAD_SET_POINTER_GUARD (pointer_chk_guard);
#endif
- __pointer_chk_guard_local = pointer_chk_guard;
- }
+ __pointer_chk_guard_local = pointer_chk_guard;
/* We do not need the _dl_random value anymore. The less
information we leave behind, the better, so clear the
@@ -2478,9 +2474,6 @@ process_envvars (enum mode *modep)
GLRO(dl_use_load_bias) = envline[14] == '1' ? -1 : 0;
break;
}
-
- if (memcmp (envline, "POINTER_GUARD", 13) == 0)
- GLRO(dl_pointer_guard) = envline[14] != '0';
break;
case 14:
Index: git/sysdeps/generic/ldsodefs.h
===================================================================
--- git.orig/sysdeps/generic/ldsodefs.h
+++ git/sysdeps/generic/ldsodefs.h
@@ -600,9 +600,6 @@ struct rtld_global_ro
/* List of auditing interfaces. */
struct audit_ifaces *_dl_audit;
unsigned int _dl_naudit;
-
- /* 0 if internal pointer values should not be guarded, 1 if they should. */
- EXTERN int _dl_pointer_guard;
};
# define __rtld_global_attribute__
# if IS_IN (rtld)

View File

@@ -0,0 +1,199 @@
From d0f05d1e39adb336a8bbccbc276a344e6ff427e3 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 28 Jan 2016 13:59:11 +0100
Subject: [PATCH] Improve check against integer wraparound in hcreate_r [BZ
#18240]
CVE: CVE-2015-8778
Improve check against integer wraparound in hcreate_r [BZ #18240]
This is an integer overflow in hcreate and hcreate_r which can result in
an out-of-bound memory access. This could lead to application crashes
or, potentially, arbitrary code execution.
Upstream-Status: Backport [2.23]
(cherry-picked from commit bae7c7c7, 4bd228c8)
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
---
ChangeLog | 6 +++++
NEWS | 2 +-
misc/Makefile | 2 +-
misc/bug18240.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
misc/hsearch_r.c | 28 ++++++++++++---------
5 files changed, 100 insertions(+), 13 deletions(-)
create mode 100644 misc/bug18240.c
diff --git a/ChangeLog b/ChangeLog
index b7701d1..a9dc8a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ [BZ #18240]
+ * misc/hsearch_r.c (isprime, __hcreate_r): Protect against
+ unsigned int wraparound.
+
2016-02-15 Carlos O'Donell <carlos@redhat.com>
[BZ #18665]
diff --git a/NEWS b/NEWS
index cda7a73..fd77c27 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.22.1
* The following bugs are resolved with this release:
- 18778, 18781, 18787, 17905.
+ 18240, 18778, 18781, 18787, 17905.
Version 2.22
diff --git a/misc/Makefile b/misc/Makefile
index e6b7c23..463a238 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -83,7 +83,7 @@ install-lib := libg.a
gpl2lgpl := error.c error.h
tests := tst-dirname tst-tsearch tst-fdset tst-mntent tst-hsearch \
- tst-pselect tst-insremque tst-mntent2 bug-hsearch1
+ tst-pselect tst-insremque tst-mntent2 bug-hsearch1 bug18240
tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += tst-error1
tests-$(OPTION_EGLIBC_FCVT) += tst-efgcvt
ifeq ($(run-built-tests),yes)
diff --git a/misc/bug18240.c b/misc/bug18240.c
new file mode 100644
index 0000000..4b26865
--- /dev/null
+++ b/misc/bug18240.c
@@ -0,0 +1,75 @@
+/* Test integer wraparound in hcreate.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <limits.h>
+#include <search.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static void
+test_size (size_t size)
+{
+ int res = hcreate (size);
+ if (res == 0)
+ {
+ if (errno == ENOMEM)
+ return;
+ printf ("error: hcreate (%zu): %m\n", size);
+ exit (1);
+ }
+ char *keys[100];
+ for (int i = 0; i < 100; ++i)
+ {
+ if (asprintf (keys + i, "%d", i) < 0)
+ {
+ printf ("error: asprintf: %m\n");
+ exit (1);
+ }
+ ENTRY e = { keys[i], (char *) "value" };
+ if (hsearch (e, ENTER) == NULL)
+ {
+ printf ("error: hsearch (\"%s\"): %m\n", keys[i]);
+ exit (1);
+ }
+ }
+ hdestroy ();
+
+ for (int i = 0; i < 100; ++i)
+ free (keys[i]);
+}
+
+static int
+do_test (void)
+{
+ test_size (500);
+ test_size (-1);
+ test_size (-3);
+ test_size (INT_MAX - 2);
+ test_size (INT_MAX - 1);
+ test_size (INT_MAX);
+ test_size (((unsigned) INT_MAX) + 1);
+ test_size (UINT_MAX - 2);
+ test_size (UINT_MAX - 1);
+ test_size (UINT_MAX);
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c
index 9f55e84..6000ce2 100644
--- a/misc/hsearch_r.c
+++ b/misc/hsearch_r.c
@@ -46,15 +46,12 @@ static int
isprime (unsigned int number)
{
/* no even number will be passed */
- unsigned int div = 3;
-
- while (div * div < number && number % div != 0)
- div += 2;
-
- return number % div != 0;
+ for (unsigned int div = 3; div <= number / div; div += 2)
+ if (number % div == 0)
+ return 0;
+ return 1;
}
-
/* Before using the hash table we must allocate memory for it.
Test for an existing table are done. We allocate one element
more as the found prime number says. This is done for more effective
@@ -81,10 +78,19 @@ __hcreate_r (nel, htab)
use will not work. */
if (nel < 3)
nel = 3;
- /* Change nel to the first prime number not smaller as nel. */
- nel |= 1; /* make odd */
- while (!isprime (nel))
- nel += 2;
+
+ /* Change nel to the first prime number in the range [nel, UINT_MAX - 2],
+ The '- 2' means 'nel += 2' cannot overflow. */
+ for (nel |= 1; ; nel += 2)
+ {
+ if (UINT_MAX - 2 < nel)
+ {
+ __set_errno (ENOMEM);
+ return 0;
+ }
+ if (isprime (nel))
+ break;
+ }
htab->size = nel;
htab->filled = 0;
--
2.7.4

View File

@@ -0,0 +1,262 @@
From 0f58539030e436449f79189b6edab17d7479796e Mon Sep 17 00:00:00 2001
From: Paul Pluzhnikov <ppluzhnikov@google.com>
Date: Sat, 8 Aug 2015 15:53:03 -0700
Subject: [PATCH] Fix BZ #17905
Upstream-Status: Backport
CVE: CVE-2015-8779
[Yocto # 8980]
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f58539030e436449f79189b6edab17d7479796e
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
ChangeLog | 8 ++++++++
NEWS | 2 +-
catgets/Makefile | 9 ++++++++-
catgets/catgets.c | 19 ++++++++++++-------
catgets/open_catalog.c | 23 ++++++++++++++---------
catgets/tst-catgets.c | 31 +++++++++++++++++++++++++++++++
6 files changed, 74 insertions(+), 18 deletions(-)
Index: git/catgets/Makefile
===================================================================
--- git.orig/catgets/Makefile
+++ git/catgets/Makefile
@@ -37,6 +37,7 @@ ifeq (y,$(OPTION_EGLIBC_CATGETS))
ifeq ($(run-built-tests),yes)
tests-special += $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
$(objpfx)sample.SJIS.cat $(objpfx)test-gencat.out
+tests-special += $(objpfx)tst-catgets-mem.out
endif
endif
gencat-modules = xmalloc
@@ -53,9 +54,11 @@ catgets-CPPFLAGS := -DNLSPATH='"$(msgcat
generated += de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
test-gencat.h
+generated += tst-catgets.mtrace tst-catgets-mem.out
+
generated-dirs += de
-tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de
+tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de MALLOC_TRACE=$(objpfx)tst-catgets.mtrace
ifeq ($(run-built-tests),yes)
# This test just checks whether the program produces any error or not.
@@ -89,4 +92,8 @@ $(objpfx)test-gencat.out: test-gencat.sh
$(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
$(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@; \
$(evaluate-test)
+
+$(objpfx)tst-catgets-mem.out: $(objpfx)tst-catgets.out
+ $(common-objpfx)malloc/mtrace $(objpfx)tst-catgets.mtrace > $@; \
+ $(evaluate-test)
endif
Index: git/catgets/catgets.c
===================================================================
--- git.orig/catgets/catgets.c
+++ git/catgets/catgets.c
@@ -16,7 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <alloca.h>
#include <errno.h>
#include <locale.h>
#include <nl_types.h>
@@ -35,6 +34,7 @@ catopen (const char *cat_name, int flag)
__nl_catd result;
const char *env_var = NULL;
const char *nlspath = NULL;
+ char *tmp = NULL;
if (strchr (cat_name, '/') == NULL)
{
@@ -54,7 +54,10 @@ catopen (const char *cat_name, int flag)
{
/* Append the system dependent directory. */
size_t len = strlen (nlspath) + 1 + sizeof NLSPATH;
- char *tmp = alloca (len);
+ tmp = malloc (len);
+
+ if (__glibc_unlikely (tmp == NULL))
+ return (nl_catd) -1;
__stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
nlspath = tmp;
@@ -65,16 +68,18 @@ catopen (const char *cat_name, int flag)
result = (__nl_catd) malloc (sizeof (*result));
if (result == NULL)
- /* We cannot get enough memory. */
- return (nl_catd) -1;
-
- if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
+ {
+ /* We cannot get enough memory. */
+ result = (nl_catd) -1;
+ }
+ else if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
{
/* Couldn't open the file. */
free ((void *) result);
- return (nl_catd) -1;
+ result = (nl_catd) -1;
}
+ free (tmp);
return (nl_catd) result;
}
Index: git/catgets/open_catalog.c
===================================================================
--- git.orig/catgets/open_catalog.c
+++ git/catgets/open_catalog.c
@@ -47,6 +47,7 @@ __open_catalog (const char *cat_name, co
size_t tab_size;
const char *lastp;
int result = -1;
+ char *buf = NULL;
if (strchr (cat_name, '/') != NULL || nlspath == NULL)
fd = open_not_cancel_2 (cat_name, O_RDONLY);
@@ -57,23 +58,23 @@ __open_catalog (const char *cat_name, co
if (__glibc_unlikely (bufact + (n) >= bufmax)) \
{ \
char *old_buf = buf; \
- bufmax += 256 + (n); \
- buf = (char *) alloca (bufmax); \
- memcpy (buf, old_buf, bufact); \
+ bufmax += (bufmax < 256 + (n)) ? 256 + (n) : bufmax; \
+ buf = realloc (buf, bufmax); \
+ if (__glibc_unlikely (buf == NULL)) \
+ { \
+ free (old_buf); \
+ return -1; \
+ } \
}
/* The RUN_NLSPATH variable contains a colon separated list of
descriptions where we expect to find catalogs. We have to
recognize certain % substitutions and stop when we found the
first existing file. */
- char *buf;
size_t bufact;
- size_t bufmax;
+ size_t bufmax = 0;
size_t len;
- buf = NULL;
- bufmax = 0;
-
fd = -1;
while (*run_nlspath != '\0')
{
@@ -188,7 +189,10 @@ __open_catalog (const char *cat_name, co
/* Avoid dealing with directories and block devices */
if (__builtin_expect (fd, 0) < 0)
- return -1;
+ {
+ free (buf);
+ return -1;
+ }
if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0)
goto close_unlock_return;
@@ -325,6 +329,7 @@ __open_catalog (const char *cat_name, co
/* Release the lock again. */
close_unlock_return:
close_not_cancel_no_status (fd);
+ free (buf);
return result;
}
Index: git/catgets/tst-catgets.c
===================================================================
--- git.orig/catgets/tst-catgets.c
+++ git/catgets/tst-catgets.c
@@ -1,7 +1,10 @@
+#include <assert.h>
#include <mcheck.h>
#include <nl_types.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#include <sys/resource.h>
static const char *msgs[] =
@@ -12,6 +15,33 @@ static const char *msgs[] =
};
#define nmsgs (sizeof (msgs) / sizeof (msgs[0]))
+
+/* Test for unbounded alloca. */
+static int
+do_bz17905 (void)
+{
+ char *buf;
+ struct rlimit rl;
+ nl_catd result;
+
+ const int sz = 1024 * 1024;
+
+ getrlimit (RLIMIT_STACK, &rl);
+ rl.rlim_cur = sz;
+ setrlimit (RLIMIT_STACK, &rl);
+
+ buf = malloc (sz + 1);
+ memset (buf, 'A', sz);
+ buf[sz] = '\0';
+ setenv ("NLSPATH", buf, 1);
+
+ result = catopen (buf, NL_CAT_LOCALE);
+ assert (result == (nl_catd) -1);
+
+ free (buf);
+ return 0;
+}
+
#define ROUNDS 5
static int
@@ -62,6 +92,7 @@ do_test (void)
}
}
+ result += do_bz17905 ();
return result;
}
Index: git/ChangeLog
===================================================================
--- git.orig/ChangeLog
+++ git/ChangeLog
@@ -1,3 +1,11 @@
+2015-08-08 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ [BZ #17905]
+ * catgets/Makefile (tst-catgets-mem): New test.
+ * catgets/catgets.c (catopen): Don't use unbounded alloca.
+ * catgets/open_catalog.c (__open_catalog): Likewise.
+ * catgets/tst-catgets.c (do_bz17905): Test unbounded alloca.
+
2015-10-15 Florian Weimer <fweimer@redhat.com>
[BZ #18928]
Index: git/NEWS
===================================================================
--- git.orig/NEWS
+++ git/NEWS
@@ -9,7 +9,7 @@ Version 2.22.1
* The following bugs are resolved with this release:
- 18778, 18781, 18787.
+ 18778, 18781, 18787, 17905.
Version 2.22

Some files were not shown because too many files have changed in this diff Show More