Commit Graph

2987 Commits

Author SHA1 Message Date
Fathi Boudra 4b15cf9c62 glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions
Patch submitted upstream, pending to be merged:
https://sourceware.org/bugzilla/show_bug.cgi?id=21286

(From OE-Core rev: 11ebb5054e5ec1171ade90249e3a30ac8174a35a)

(From OE-Core rev: 77ddd969569c91b705db2307af450b4e0574ee87)

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-07 15:57:43 +01:00
Ross Burton 796efea2d2 cross-localedef-native: add way to specify which locale archive to write
localedef has no way to specify which locale archive to use, and the
compile-time default isn't useful as it points to the work directory.

Add support to read an environmental variable for the path, and don't fail to
write a new locale archive.

(From OE-Core rev: bf0f205a3c3714926649bd69db29e4df1c0ea112)

(From OE-Core rev: 72ab0e7d49610f6ffcc99fa8723aeeaada852d88)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton 541c5c7fc0 populate_sdk: install UTF-8 locales in SDKs
As glibc 2.27 can't read older locale-archives, SDKs using glibc 2.27 on hosts
using glibc earlier than 2.27 won't be able to find any locales, so bitbake
won't start and Python can't use UTF-8.

So by default install all locales into the SDK.  Special-case Extensible SDKs by
installing no locales as they ship glibc in a buildtools, and that will have the
locales.

Locale installation requires cross-localedef, so add that to DEPENDS.

Also remove the explicit en_US addition in buildtools-tarball as it is now
redundant.

(From OE-Core rev: 96896568d197cd06302713c24c0f7d91bfaea6c1)

(From OE-Core rev: af9eb2ef36cb5bfd87ea61ff3390949810097c9b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton 3c22a6c998 glibc: relocate locale paths in nativesdk
nativesdk is built with a specific prefix but this will be different at install
time, however glibc hard-codes the path to locale files. Expand these strings to 4K and move them to a magic segment which we can relocate when the SDK is installed.

(From OE-Core rev: 59e0679378aac27c4fea0b06721e0a184a93c100)

(From OE-Core rev: 839479f63a6b927606742b15000d55b1223cb3af)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton 0562b462d4 glibc: don't use host locales in nativesdk
(From OE-Core rev: d7ded85766852689a0d774c896a11d0609004ab2)

(From OE-Core rev: 6ffd0764677197e134386f2147c204823a88cfca)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Armin Kuster dd44b2c92f ovmf-native: fix compile issue on new OS like FC27 and Ubuntu 17
Fixed this error:
| VfrUtilityLib.cpp:3375:26: error: ISO C++ forbids comparison between
pointer and integer [-fpermissive]
|    if (mStringFileName == '\0' ) {
|                           ^~~~
| VfrUtilityLib.cpp:3398:9: warning: ignoring return value of ‘size_t
fread(void*, size_t, size_t, FILE*)’, declared with attribute
warn_unused_result [-Wunused-result]
|    fread ((char *)StringPtr, sizeof (UINT8), Length, pInFile);
|    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ../Makefiles/footer.makefile:30: recipe for target 'VfrUtilityLib.o'
failed

[Yocto #12530]

(From OE-Core rev: ac0ec9936b54d46491c56af3e6c372ff670b585f)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Khem Raj 333b79aea3 ovmf: Fix build with gcc7
backport a patch which fixing warnings with gcc7

(From OE-Core rev: 9c75151116aa293dc8567c237d7e4da5bdec90e3)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 74fb6043f6d74b84f7efc282ac6cfc54fcb71882)
Fixed up patch to apply agains this version
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07 17:07:57 +00:00
Richard Purdie 022df46535 build-appliance-image: Update to pyro head revision
(From OE-Core rev: 10a75d2f1004c4cdf3fbe850c41ff47721eb139a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-14 13:29:44 +00:00
Joshua Watt a75a2f4272 cross-localedef-native: Include locale_t.h
Newer versions of glibc (2.26) moved the struct locale definition from
xlocale.h to bits/types/locale_t.h. For compatibility with build hosts
using this version of glibc, include this header.

See f0be25b6336db7492e47d2e8e72eb8af53b5506d in glibc

(From OE-Core rev: 4e9bb9ab2e5c603f3eb2d52ce272401c8e320cc0)

(From OE-Core rev: ab2bbccf9afb1db05a1f9fbcb5ec31bc1e4cb5eb)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Andre McCurdy 3413d7ac24 glibc_2.25: fix building for x86 with -Os (or -fno-omit-frame-pointer)
Glibc 2.25 fails to build for x86 when frame pointers are enabled (ie
when optimised for size or when -fno-omit-frame-pointer is explicitly
included in CFLAGS etc). Backport the upstream fix from glibc 2.26.

  https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=3b33d6ed6096c1d20d05a650b06026d673f7399a

(From OE-Core rev: 81ba29c7b9c872d9a9c2efe5f9f8fe6a492af813)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
André Draszik cd28daadfd busybox: add backported patch to support iproute 'scope'
This is needed for avahi-autoipd, which attempts to
create a link-scope route as part of its work.

Without iproute scope support in busybox, the route is
not created due to an error message, and hence we
aren't accessible by, and can't access ourselves,
IP addresses outside the link-local scope
(169.254.0.0/16) unless we also have a proper
non link-local IP address, which somehow defeats the
purpose of zeroconf.

(From OE-Core rev: d0047eb364b5e38c3fbd349c40c71f6c50a1a22d)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit bd06a1cbe8e97b7f66979b12d4d248092379df4a)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Ming Liu 5cb078a086 busybox: fix a linking issue
A following linking error was observed:
| ==========
| archival/lib.a(tar.o): In function `tar_main':
| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
| ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined
| ld: final link failed: Bad value

this happened with clang compiler, with the following configs:
| CONFIG_TAR=y
| # CONFIG_FEATURE_SEAMLESS_Z is not set

which can be fixed by adding IF_FEATURE_* checks in.

(From OE-Core rev: 5e9e8b336931335c660733a269c59ae0547019bd)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 789254b5ae983a94346f53de18286713b80eb5f2)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Martin Jansa 5228b68cfe glibc-locale: add runtime dependency on glibc
* the libc.so.6 dependency is detected always:
  $ grep FILERDEPENDS BUILD-*/pkgdata/qemux86/runtime/localedef
  BUILD-bad/pkgdata/qemux86/runtime/localedef:FILERDEPENDSFLIST_localedef: /usr/bin/localedef
  BUILD-bad/pkgdata/qemux86/runtime/localedef:FILERDEPENDS_/usr/bin/localedef_localedef: libc.so.6(GLIBC_2.15) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.0) libc.so.6
  BUILD-ok/pkgdata/qemux86/runtime/localedef:FILERDEPENDSFLIST_localedef: /usr/bin/localedef
  BUILD-ok/pkgdata/qemux86/runtime/localedef:FILERDEPENDS_/usr/bin/localedef_localedef: libc.so.6(GLIBC_2.15) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.0) libc.so.6

* but in some builds the glibc dependency isn't built soon enough:
  $ diff -uNr BUILD-*/pkgdata/qemux86/runtime/localedef
  --- BUILD-bad/pkgdata/qemux86/runtime/localedef 2017-09-02 21:17:50.000000000 +0000
  +++ BUILD-ok/pkgdata/qemux86/runtime/localedef  2017-09-11 10:15:49.954381592 +0000
  @@ -6,6 +6,7 @@
   LICENSE: GPLv2 & LGPLv2.1
   DESCRIPTION_localedef: glibc: compile locale definition files
   SUMMARY: Locale data from glibc
  +RDEPENDS_localedef: glibc (>= 2.26)
   SECTION: base
   PKG_localedef: localedef
   FILES_localedef: /usr/bin/localedef
  and the build fails with QA issues:
  http://errors.yoctoproject.org/Errors/Details/155529/

  ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.0), but no providers found in RDEPENDS_localedef? [file-rdeps]
  ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.15), but no providers found in RDEPENDS_localedef? [file-rdeps]
  ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.3), but no providers found in RDEPENDS_localedef? [file-rdeps]
  ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.2), but no providers found in RDEPENDS_localedef? [file-rdeps]
  ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.1), but no providers found in RDEPENDS_localedef? [file-rdeps]
  ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6, but no providers found in RDEPENDS_localedef? [file-rdeps]
  ERROR: QA run found fatal errors. Please consider fixing them.

* reproducible with Yocto 2.2 Morty as well, with slightly different
  error message:
  ERROR: glibc-locale-2.24-r0 do_package_qa: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.4), but no providers found in RDEPENDS_localedef? [file-rdeps]

* cherry-picked from master 2d2b4d7383c93174fe8eeb72440e81345df71295

(From OE-Core rev: eade33d548bd1a16f5397a44299ac809707efd60)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13 22:13:00 +01:00
Richard Purdie ce26a57e04 Revert "expat: Don't use getrandom() in the -native case"
This reverts commit 450942db7f4638eba7ec262901fe1d7e1b1f6070.

Applied in error to the pyro branch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 23:51:59 +01:00
Hongxu Jia d2b60efe20 libxml2: Fix CVE-2017-8872
fix global-buffer-overflow in htmlParseTryOrFinish (HTMLparser.c:5403)

https://bugzilla.gnome.org/show_bug.cgi?id=775200

Here is the reproduce steps on ubuntu 16.04, use clang with "-fsanitize=address"
...
export CC="clang"
export CFLAGS="-fsanitize=address"

./configure --disable-shared

make clean all -j

wget https://bugzilla.gnome.org/attachment.cgi?id=340871 -O poc

./xmllint --html --push poc
==2785==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000000a0de21 at pc 0x0000006a7f6e bp 0x7ffdfe940c10 sp 0x7ffdfe940c08
READ of size 1 at 0x000000a0de21 thread T0    #0 0x6a7f6d
(/home/jiahongxu/Downloads/libxml2-2.9.4/xmllint+0x6a7f6d)    #1 0x6a7356
(/home/jiahongxu/Downloads/libxml2-2.9.4/xmllint+0x6a7356)    #2 0x4f4504
(/home/jiahongxu/Downloads/libxml2-2.9.4/xmllint+0x4f4504)    #3 0x4f045e
(/home/jiahongxu/Downloads/libxml2-2.9.4/xmllint+0x4f045e)    #4 0x7f81977d682f
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)    #5 0x419ad8
(/home/jiahongxu/Downloads/libxml2-2.9.4/xmllint+0x419ad8)
...

(From OE-Core rev: a615b0825927a09a0aa8312d131c9acbaef8956d)

(From OE-Core rev: 1c9d891886f35e6cc4485f244180d7d0ffa82cd3)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:58 +01:00
Andrej Valek 6c657b8441 libxml2: Revert "Add an XML_PARSE_NOXXE flag to block all entities loading even local"
The new flag doesn't work and the change even broke the XML_PARSE_NONET option.

(From OE-Core rev: 8b586f60778579ee2c9adae429128a07e8437553)

(From OE-Core rev: d2b1486bf8773d3eef36c5e77b82e70c88d9c682)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:58 +01:00
Richard Purdie 960a653e0c expat: Don't use getrandom() in the -native case
getrandom() is only available in glibc 2.25+ and uninative may relocate
binaries onto systems that don't have this function. For now, force
the code to the older codepath until we can come up with a better solution
for this kind of issue.

(From OE-Core rev: da9ac8092497c3f2c246d3534f47e42cb2d9e4e8)

(From OE-Core rev: 450942db7f4638eba7ec262901fe1d7e1b1f6070)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:58 +01:00
Peter Kjellerstedt 7defdff41f libxml2: Make ptest run the Python tests if Python support is enabled
Since we go through the trouble of copying the Python tests, we may as
well actually run them...

This also avoids the following QA issue:

  ERROR: libxml2-2.9.4-r0 do_package_qa: QA Issue:
  /usr/lib/libxml2/ptest/python/tests/push.py contained in package
  libxml2-ptest requires /usr/bin/python, but no providers found in
  RDEPENDS_libxml2-ptest? [file-rdeps]

(From OE-Core rev: 2b9470678d8df152af54899adb4774fb0d481cf3)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:11 +01:00
Alexander Kanavin 26260d76b7 libxml2: move python module to Python 3
(From OE-Core rev: 30417429cea525e6eb6c3cfbe760ebe7b13f0980)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:11 +01:00
Jackie Huang 6bc0d5069f ncurses: add SYSROOT_DESTDIR for siteconfig_gencache
After switching to Recipe Specific Sysroots, ncurses
will not be populated in its own sysroots, then
siteconfig_gencache fails to find some headers,
so add ${SYSROOT_DESTDIR}/${includedir} into the
search list to fix the issue.

(From OE-Core rev: 421850875a5dafa1deed0647b7b30b76df9b25cf)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2ef34f7fb60ecdff29aae1d54a90a2e765c15e1e)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:29 +01:00
Mikko Rapeli b7754933b7 glibc-common.inc: set CVE_PRODUCT to glibc
All recipes which include this .inc map to glibc NVD component.

(From OE-Core rev: 5e11fa22f0b9ee18878b49389603ddf5533cbbc4)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 613a13725db4e05539974cc7c66584a287d7b4bd)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:27 +01:00
Mikko Rapeli db8f4f24ce glib.inc: set CVE_PRODUCT to glib
NVD uses product glib and vendor gnome for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2016-6855

(From OE-Core rev: 9621f46bde37e27dd323305d0c1e987a7cca37aa)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 69d6342d45316389afb4b062088919689db0a6dd)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:27 +01:00
Chen Qi 182e0a290d systemd: workaround login failure on qemumips64 when 'pam' is enabled
Append " -fno-tree-switch-conversion -fno-tree-tail-merge" to
FULL_OPTIMIZATION to workaround login problem on qemumips64. Otherwise,
user cannot login onto the target even username and password are
provided.

(From OE-Core rev: 89d53c742d3538744b892237698ffde2c9c60009)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 35403ba3707c3c8dd94bcc557eef6f7c66696bc5)

Hand applied
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:45 +01:00
Ross Burton b7e7b5e294 systemd: refuse to load units with errors (CVE-2017-1000082)
If a unit has a statement such as User=0day where the username exists but is
strictly speaking invalid, the unit will be started as the root user instead.

Backport a patch from upstream to mitigate this by refusing to start units such
as this.

(From OE-Core rev: a6eaef0f179a341c0b96bb30aaec2d80862a11d6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Khem Raj 4c78660fb4 zlib: Pass pre-calculate uname enable re-entrant flags
Fix ptest generation

(From OE-Core rev: 07f4b0f016225e2b211689a270e56b2923ecb434)

(From OE-Core rev: b99dd747eb8723010f37660de434dde329e7958b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Andrej Valek 9dee4e5650 libxml2: Fix CVE-2017-0663
Fix type confusion in xmlValidateOneNamespace

Comment out code that casts xmlNsPtr to xmlAttrPtr. ID types
on namespace declarations make no practical sense anyway.

Fixes bug 780228

CVE: CVE-2017-0663
(From OE-Core rev: a965be7b6a1d730851b4a3bc8fd534b9b2334227)

(From OE-Core rev: e442e7105ba39ddaed0749614b5ee552f9df2d5a)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Andrej Valek 9d59e7d739 libxml2: Fix CVE-2017-5969
Fix NULL pointer deref in xmlDumpElementContent

Can only be triggered in recovery mode.

Fixes bug 758422

CVE: CVE-2017-5969
(From OE-Core rev: 0cae039cbe513b7998e067f4f3958af2ec65ed1a)

(From OE-Core rev: f0017a7b8b3fc4407e6596156b57aa1183937382)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Andrej Valek 93b0d29184 libxml2: Fix CVE-2017-9049 and CVE-2017-9050
Fix handling of parameter-entity references

There were two bugs where parameter-entity references could lead to an
unexpected change of the input buffer in xmlParseNameComplex and
xmlDictLookup being called with an invalid pointer.

Fixes bug 781205 and bug 781361

CVE: CVE-2017-9049 CVE-2017-9050
(From OE-Core rev: 2300762fef8fc8e3e56fb07fd4076c1deeba0a9b)

(From OE-Core rev: a409c50a09b12caa434b2b06bdcfb6beba43f67f)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Andrej Valek b611c4c7c0 libxml2: Fix CVE-2017-9047 and CVE-2017-9048
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.

Fixes bug 781333 and bug 781701

CVE: CVE-2017-9047 CVE-2017-9048
(From OE-Core rev: bb0af023e811907b4e641b39f654ca921ac8794a)

(From OE-Core rev: d549b8f3836b2ffda5c59a7ae4d955846c558646)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Andrej Valek b5ea1132a6 libxml2: Avoid reparsing and simplify control flow in xmlParseStartTag2
(From OE-Core rev: 4651afdd457eca06da07331186bf28b98df2eeff)

(From OE-Core rev: 41a5ea683cca3e635565a7a289ba260addfe4b11)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:43 +01:00
Andrej Valek 3a52b52844 libxml2: Disable LeakSanitizer when running API tests
Makefile.am: Disable LeakSanitizer when running API tests

The autogenerated API tests leak memory.

Upstream-Status: Backported - [https://git.gnome.org/browse/libxml2/commit/?id=ac9a4560ee85b18811ff8ab7791ddfff7b144b0a]
(From OE-Core rev: e3985be0ddb40e8db44422092c875a4e373a6da3)

(From OE-Core rev: 008b4d1c80012dc69da2866a2d26bd1d2b736e6f)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:43 +01:00
Richard Purdie 6bd890d9e0 build-appliance-image: Update to pyro head revision
(From OE-Core rev: beab5b357cd46094b1c376c47d04e8d0de73e1e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 07:06:10 +01:00
Richard Purdie 405517b429 build-appliance: Set to pyro release branch
(From OE-Core rev: 48b61abac098f180c37e11facd32f3bfa007254e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 07:05:56 +01:00
Richard Purdie c2ef32ae58 build-appliance-image: Update to pyro head revision
(From OE-Core rev: 3a2b434ea95612ed52ec9edfd809d87cb5c086be)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:38 +01:00
Peter Kjellerstedt 439bb8cc71 bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-components
The path to where to install and find the sysroot components is used
in many places. This warrants it to get its own variable.

(From OE-Core rev: 70a84b525470f72339568409daf84845904e4cab)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-11 16:55:59 +01:00
Richard Purdie 381897c640 build-appliance-image: Update to master head revision
(From OE-Core rev: 123962018251dfb1d6ca5aa5c0d02534007de3ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-01 08:56:47 +01:00
Richard Purdie a00f8981d8 build-appliance-image: Update to master head revision
(From OE-Core rev: 4fe59183dae7c556363bc885cfda11a38c0d2d47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:58 +01:00
Richard Purdie e1de6c05d0 build-appliance-image: Update to master head revision
(From OE-Core rev: 766bef5755521960e24ed7192214bf66bbee8354)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:36 +01:00
Andreas Oberritter 33dd5fb96c busybox: make bash a valid login shell if enabled
Add bash to /etc/shells if busybox is built with bash applet anabled
to fix login via dropbear.

(From OE-Core rev: 86a2db0b2997fd05882ae0119ef45b1ea5411d39)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:23 +01:00
Catalin Enache d7ec005904 libxml2: CVE-2016-9318
libxml2 2.9.4 and earlier, as used in XMLSec 1.2.23 and earlier
and other products, does not offer a flag directly indicating that
the current document may be read but other files may not be opened,
which makes it easier for remote attackers to conduct XML External
Entity (XXE) attacks via a crafted document.

Reference:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9318

Upstream patch:
https://git.gnome.org/browse/libxml2/commit/?id=2304078555896cf1638c628f50326aeef6f0e0d0

(From OE-Core rev: 0dd44c00e3b2fbc3befc3f361624a3a60161d979)

Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:23 +01:00
Richard Purdie 7a0e795373 build-appliance-image: Update to master head revision
(From OE-Core rev: e584be78f92ee6f08f570c239698d56ac78d05f9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-21 08:22:18 +01:00
Andre McCurdy a9268f9ac2 busybox: fix typo in CVE-2016-2147_2.patch Upstream-Status tag
(From OE-Core rev: 7fe8bb9c736eadbd1201c008e57527cee9de9a71)

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>
2017-04-21 08:22:08 +01:00
Richard Purdie 55a53f5326 build-appliance-image: Update to master head revision
(From OE-Core rev: 0126fe8934ecae3c91e441c4e1f5a86a15837679)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20 08:16:46 +01:00
Richard Purdie e14f9743f9 build-appliance-image: Update to master head revision
(From OE-Core rev: 0b8167fa3e792dac272e24e3f06af88ada90ff14)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20 08:16:18 +01:00
Andre McCurdy c52cc23531 busybox: drop unmaintained _git recipe
The busybox _git recipe is not formally tested or kept up to date.
The gstreamer _git recipes were recently removed from oe-core and the
justifications for that change apply to the busybox _git recipe too.

(From OE-Core rev: 139c97fa7f71a554ce85900ac33054a216db62e9)

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>
2017-04-14 09:47:08 +01:00
Richard Purdie b5c383074a base-passwd/useradd: Various improvements to useradd with RSS
Currently there are multiple issues with useradd:

* If base-passwd rebuilds, it wipes out recipe specific user/group additions
  to sysroots and causes errors
* If recipe A adds a user and recipe B depends on A, it can't see any of the
  users/groups A adds.

This patch changes base-passwd so it always works as a postinst script
within the sysroot and copies in the master files, then runs any
postinst-useradd-* scripts afterwards to add additional user/groups.

The postinst-useradd-* scripts are tweaked so that if /etc/passwd doesn't exist
they just exit, knowning they'll be executed later. We also add a dummy entry to
the dummy passwd file from pseudo so we can avoid this too.

There is a problem where if recipe A adds a user and recipe B depends on A but
doesn't care about users, it may not have a dependency on the useradd/groupadd
tools which would therefore not be available in B's sysroot. We therefore also
tweak postinst-useradd-* scripts so that if the tools aren't present we simply
don't add users. If you need the users, you add a dependency on the tools in the
recipe and they'll be added.

We add postinst-* to SSTATE_SCAN_FILES since almost any postinst script of this
kind is going to need relocation help.

We also ensure that the postinst-useradd script is written into the sstate
object as the current script was only being added in a recipe local way.

Thanks to Peter Kjellerstedt <pkj@axis.com> and Patrick Ohly for some pieces
of this patch.

[Yocto #11124]

(From OE-Core rev: 1b5afaf437f7a1107d4edca8eeb668b9618a5488)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
Nathan Rossi 97f30c70bd busybox: In defconfig enable ASH_CMDCMD for built-in 'command'
It is common for *ash shells to have 'command' available as a built-in
function. POSIX 2008 also documents the availability of this command.

Additionally the /etc/profile of base-files requires this command to be
available as of commit e77cdb7611 ("base-files: profile: Do not assume
that the tty command exists"). If it is not available the following
message is output during login on a image using busybox.

    -sh: command: not found

It however should be noted that tcsh and csh do not provide 'command'
(built-in or otherwise).

(From OE-Core rev: e41c90b852167bbcb434da57b84280e855acae33)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:18:46 +01:00
Khem Raj 069c46922e musl: Upgrade to latest tip
* 54807d47 aarch64: add single instruction math functions
* b6e1fe0d fix strptime output for %C without %y
* 834ef7af fix processing of strptime %p format
* 85dfab7e fix off-by-one in strptime %j
* 9571c531 regex: fix newline matching with negated brackets
* e6917ece increase limit on locale name length from 15 to 23 bytes
* e4fc9ad7 search locale name variants for gettext translations
* 16319a5d make setlocale return a single name for LC_ALL if all categories match
* 0c53178e fix dlopen/dlsym regression opening libs already loaded at startup
* dbff2bb8 fix POSIX-format TZ dst transition times for southern hemisphere
* 74bca42e s390x: fix fpreg_t and remove unused per_struct
* a393d5cc precalculate gnu hash rather than doing it lazily in find_sym inner loop
* 8cba1dc4 fix threshold constants in j0f, y0f, j1f, y1f

(From OE-Core rev: 340b3fa6be034bf6a4cd9b2d1ad4788668fabb5b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Richard Purdie dc52b27f4c ncurses: Drop incorrect option
The --disable-static option doesn't exist in ncurses. Its equivalent is
--without-normal so remove the option which does nothing.

(From OE-Core rev: 974ddd2f99be04f44978c1bce054ed75c9367631)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Martin Jansa 57bbedcfeb eudev: set LGPL-2.1+ for libudev package
(From OE-Core rev: d9430de1b8b40b5f6cba74de20ea2bf69667e64c)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00