]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
5 years agorsync: whitelist CVE-2017-16548
Lee Chee Yang [Tue, 21 Jan 2020 05:26:47 +0000 (13:26 +0800)]
rsync: whitelist CVE-2017-16548

patch for this CVE applies to v3.1.3pre1 not for v3.1.3.
patch already in v3.1.3.
see
https://git.samba.org/rsync.git/?p=rsync.git;a=commitdiff;h=47a63d90e71d3e19e0e96052bb8c6b9cb140ecc1;hp=bc112b0e7feece62ce98708092306639a8a53cce

(From OE-Core rev: 1e2739c821312527010fb0afbde5a20cd3f03d24)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 842bd7ca21efc6378ba24a8d0bf065c4d0f54f1d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibxml2: Fix CVE-2019-19956
Rahul Chauhan [Fri, 7 Feb 2020 03:06:22 +0000 (08:36 +0530)]
libxml2: Fix CVE-2019-19956

Signed-off-by: Rahul Chauhan <rahulk@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosanity.bbclass: Move sanity_info from conf to cache
Peter Kjellerstedt [Tue, 7 Jan 2020 22:10:42 +0000 (23:10 +0100)]
sanity.bbclass: Move sanity_info from conf to cache

Since this file is written during recipe parsing, having it in the
${BUILDDIR}/conf directory, which is covered by an inotify watcher,
will trigger a re-parse the next time bitbake is run and the resident
bitbake server is enabled. This causes the sanity_info file to be
updated again, which triggers a new parse the next time bitbake is run
ad infinitum. Moving it to ${BUILDDIR}/cache should avoid this.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f98103b548aa7dba6b1be6c8e02ef41858a8e85c)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopopulate_sdk_ext.bbclass: No longer needed to clean away conf/sanity_info
Peter Kjellerstedt [Tue, 7 Jan 2020 22:10:43 +0000 (23:10 +0100)]
populate_sdk_ext.bbclass: No longer needed to clean away conf/sanity_info

Since the sanity_info file has moved from the conf directory to the
cache directory, there is no longer any need to clean it away
explicitly in clean_esdk_builddir() since the whole cache directory is
already cleaned away anyway.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 40c30990e1be72130819c040fe471e2bdc0c6e7d)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoopenssl: fix CVE-2019-1551
Anuj Mittal [Fri, 17 Jan 2020 16:58:19 +0000 (18:58 +0200)]
openssl: fix CVE-2019-1551

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoopenssl: Whitelist CVE-2019-0190
Adrian Bunk [Fri, 17 Jan 2020 16:58:18 +0000 (18:58 +0200)]
openssl: Whitelist CVE-2019-0190

This is only a problem with older Apache versions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoopenssl: Enable os option for with-rand-seed as well
Khem Raj [Fri, 17 Jan 2020 16:58:17 +0000 (18:58 +0200)]
openssl: Enable os option for with-rand-seed as well

with openSSL 1.1.1d we start seeing errors like

Error Generating Key
139979727451584:error:2406C06E:random number generator:RAND_DRBG_instantiate:error retrieving entropy:../openssl-1.1.1d/crypto/rand/drbg_lib.c:342:

when using openssl from openssl-native on build hosts, this is due to
limiting the random seed to devrandom, to support older hosts, since the
option allows to have a comma separated list of methods to try, we can
try the default first and if that fails then fallback to devrandom, this
will ensure that it keeps working with build systems which dont support
getrandom()

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoopenssl: Upgrade 1.1.1c -> 1.1.1d
Adrian Bunk [Fri, 17 Jan 2020 16:58:16 +0000 (18:58 +0200)]
openssl: Upgrade 1.1.1c -> 1.1.1d

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoopenssl: Upgrade 1.1.1b -> 1.1.1c
Adrian Bunk [Fri, 17 Jan 2020 16:58:15 +0000 (18:58 +0200)]
openssl: Upgrade 1.1.1b -> 1.1.1c

Backported patch removed.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosystemd: Upgrade to a more recent snapshot from the 241 branch
Adrian Bunk [Fri, 17 Jan 2020 16:58:14 +0000 (18:58 +0200)]
systemd: Upgrade to a more recent snapshot from the 241 branch

Bugfix-only changes on the 241 stable branch,
including a fix for a breakage with OpenSSL >= 1.1.1c.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosystemd: Whitelist CVE-2018-21029 CVE-2019-3843 CVE-2019-3844
Adrian Bunk [Fri, 17 Jan 2020 16:58:13 +0000 (18:58 +0200)]
systemd: Whitelist CVE-2018-21029 CVE-2019-3843 CVE-2019-3844

One does not strictly apply to 241, for the other two a fix
was already backported to the 241 branch.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoiputils: Whitelist CVE-2000-1213 CVE-2000-1214
Adrian Bunk [Fri, 17 Jan 2020 17:14:36 +0000 (19:14 +0200)]
iputils: Whitelist CVE-2000-1213 CVE-2000-1214

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
5 years agolz4: Whitelist CVE-2014-4715
Adrian Bunk [Fri, 17 Jan 2020 17:14:35 +0000 (19:14 +0200)]
lz4: Whitelist CVE-2014-4715

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
5 years agosysstat: fix CVE-2019-19725
Anuj Mittal [Fri, 17 Jan 2020 17:14:34 +0000 (19:14 +0200)]
sysstat: fix CVE-2019-19725

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agobase.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot
Mattias Hansson [Fri, 17 Jan 2020 17:14:33 +0000 (19:14 +0200)]
base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot

do_prepare_recipe_sysroot may perform groupadd, which requires pseudo.
However, do_prepare_recipe_sysroot does not depend on pseudo explicitly,
which sometimes causes a build error when building a recipe that adds
groups.

This issue only occurs when executing do_prepare_recipe_sysroot for a
recipe that adds groups before finishing a task that depends on pseudo
for a recipe that doesn't add groups.

Signed-off-by: Mattias Hansson <mattihn@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agogo: fix CVE-2019-17596
Hongxu Jia [Fri, 17 Jan 2020 17:14:32 +0000 (19:14 +0200)]
go: fix CVE-2019-17596

https://github.com/golang/go/commit/2017d88dbc096381d4f348d2fb08bfb3c2b7ed73

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agonasm: fix CVE-2019-14248
Anuj Mittal [Fri, 17 Jan 2020 17:14:31 +0000 (19:14 +0200)]
nasm: fix CVE-2019-14248

See:
https://bugzilla.nasm.us/show_bug.cgi?id=3392576

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agonasm: fix CVE-2018-19755
Anuj Mittal [Fri, 17 Jan 2020 17:14:30 +0000 (19:14 +0200)]
nasm: fix CVE-2018-19755

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agoglib-2.0: Backport the CVE-2019-12450 fix
Adrian Bunk [Fri, 17 Jan 2020 17:14:29 +0000 (19:14 +0200)]
glib-2.0: Backport the CVE-2019-12450 fix

Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agolighttpd: Backport the CVE-2019-11072 fix
Adrian Bunk [Fri, 17 Jan 2020 17:14:28 +0000 (19:14 +0200)]
lighttpd: Backport the CVE-2019-11072 fix

Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agoglibc: fix CVE-2019-19126
Anuj Mittal [Fri, 17 Jan 2020 17:14:27 +0000 (19:14 +0200)]
glibc: fix CVE-2019-19126

Backport from 2.30 stable branch and drop NEWS section.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agolibarchive: fix CVE-2019-19221
Anuj Mittal [Fri, 17 Jan 2020 17:14:26 +0000 (19:14 +0200)]
libarchive: fix CVE-2019-19221

Also see:
https://github.com/libarchive/libarchive/issues/1276

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agogdb: Fix CVE-2019-1010180
Vinay Kumar [Fri, 17 Jan 2020 17:14:25 +0000 (19:14 +0200)]
gdb: Fix CVE-2019-1010180

Source: git://sourceware.org/git/binutils-gdb.git
Tracking -- https://sourceware.org/bugzilla/show_bug.cgi?id=23657

Backported upstream commit 950b74950f6020eda38647f22e9077ac7f68ca49 to gdb-8.3.1 sources.

Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=950b74950f6020eda38647f22e9077ac7f68ca49]

Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agobind: Whitelist CVE-2019-6470
Adrian Bunk [Fri, 17 Jan 2020 17:14:24 +0000 (19:14 +0200)]
bind: Whitelist CVE-2019-6470

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobinutils: fix CVE-2019-17451
Trevor Gamblin [Fri, 17 Jan 2020 17:14:23 +0000 (19:14 +0200)]
binutils: fix CVE-2019-17451

Backport upstream fix.

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agobinutils: fix CVE-2019-17450
Trevor Gamblin [Fri, 17 Jan 2020 17:14:22 +0000 (19:14 +0200)]
binutils: fix CVE-2019-17450

Backport upstream fix.

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agowpa-supplicant: fix CVE-2019-16275
Ross Burton [Fri, 17 Jan 2020 17:14:21 +0000 (19:14 +0200)]
wpa-supplicant: fix CVE-2019-16275

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agopython3: RDEPEND on libgcc
Joshua Watt [Fri, 17 Jan 2020 17:04:23 +0000 (19:04 +0200)]
python3: RDEPEND on libgcc

Python uses features of glibc that require it to dynamically load (i.e.
dlopen()) libgcc_s at runtime. However, since this isn't a link time
dependency, it doesn't get picked up automatically by bitbake so
manually add it to RDEPENDS.

There is an outstanding bug in Python to make it explicitly link against
libgcc at link time which would remove the need for this. See:
https://bugs.python.org/issue37395

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>
[ merged the fix to make it glibc only ]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
5 years agopython3: Upgrade 3.7.5 -> 3.7.6
Adrian Bunk [Fri, 17 Jan 2020 17:04:22 +0000 (19:04 +0200)]
python3: Upgrade 3.7.5 -> 3.7.6

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython/python3: Whitelist CVE-2019-18348
Adrian Bunk [Fri, 17 Jan 2020 17:04:21 +0000 (19:04 +0200)]
python/python3: Whitelist CVE-2019-18348

This is not exploitable when glibc has CVE-2016-10739 fixed,
which is fixed in the upstream version since warrior.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: Whitelist CVE-2017-17522 CVE-2017-18207 CVE-2015-5652
Adrian Bunk [Fri, 17 Jan 2020 17:04:20 +0000 (19:04 +0200)]
python: Whitelist CVE-2017-17522 CVE-2017-18207 CVE-2015-5652

One Windows-only CVE that cannot be fixed, and two CVEs
where upstream agreement is that they are not vulnerabilities.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agostress: update SRC_URI
Armin Kuster [Sun, 12 Jan 2020 03:39:37 +0000 (19:39 -0800)]
stress: update SRC_URI

Fixes:
WARNING: stress-1.0.4-r0 do_fetch: Failed to fetch URL http://people.seas.harvard.edu/~apw/stress/stress-1.0.4.tar.gz, attempting MIRRORS if available

Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosudo: Fix fetching sources
Ferry Toth [Fri, 25 Oct 2019 19:12:33 +0000 (21:12 +0200)]
sudo: Fix fetching sources

It looks like https://www.sudo.ws/download.html changed certificate
and directory structure. This breaks fetching sources.

Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit f02e9f46ce54fed3c7ddfad7d1003a2fb7ba3a67)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosudo: correct SRC_URI
Alexander Kanavin [Tue, 13 Aug 2019 18:24:13 +0000 (20:24 +0200)]
sudo: correct SRC_URI

The old URI returns 404, and has an invalid TLS certificate.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 73ff6aba0a53ffc3ee0a5859a3ad4c8021be4de0)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopopt: fix SRC_URI
Oleksandr Kravchuk [Wed, 12 Jun 2019 22:10:06 +0000 (00:10 +0200)]
popt: fix SRC_URI

rpm5.org has been down for about a year now. Use linuxfromscratch.org
as an alternative reliable source instead.

Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d9224014da9a512b1b8837e4e7a736d465c97be3)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-check: Switch to NVD CVE JSON feed version 1.1
Niko Mauno [Sat, 14 Dec 2019 06:15:05 +0000 (14:15 +0800)]
cve-check: Switch to NVD CVE JSON feed version 1.1

Switch to recently released version 1.1 of NVD CVE JSON feed, as in
https://nvd.nist.gov/General/News/JSON-1-1-Vulnerability-Feed-Release
it is mentioned that

  Due to changes required to support CVSS v3.1 scoring, the JSON
  vulnerability feeds must be modified. This will require the consumers
  of this data to update their internal processes. We will be providing
  the JSON 1.1 schema on the data feeds page and the information below
  to prepare for this transition.
  ...
  The JSON 1.1 data feeds will be available on September 9th, 2019. At
  that time the current JSON 1.0 data feeds will no longer available.

This change was tested briefly by issuing 'bitbake core-image-minimal'
with 'cve-check.bbclass' inherited via local.conf, and then comparing
the content between the resulting two
'DEPLOY_DIR_IMAGE/core-image-minimal-qemux86.cve' files, which did not
seem to contain any other change, except total of 167 entries like

  CVSS v3 BASE SCORE: 0.0

were replaced with similar 'CVSS v3 BASE SCORE:' entries which had
scores that were greater than '0.0' (up to '9.8').

(From OE-Core rev: cc20e4d8ff2f3aa52a2658404af9a0ff358cc323)

Signed-off-by: Niko Mauno <niko.mauno@iki.fi>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c92b8804d6e59b2707332859957f0e6a46db0a73)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-check: fetch CVE data once at a time instead of in a single call
Ross Burton [Sun, 8 Dec 2019 18:35:57 +0000 (20:35 +0200)]
cve-check: fetch CVE data once at a time instead of in a single call

This code used to construct a single SQL statement that fetched the NVD data for
every CVE requested.  For recipes such as the kernel where there are over 2000
CVEs to report this can hit the variable count limit and the query fails with
"sqlite3.OperationalError: too many SQL variables".  The default limit is 999
variables, but some distributions such as Debian set the default to 250000.

As the NVD table has an index on the ID column, whilst requesting the data
CVE-by-CVE is five times slower when working with 2000 CVEs the absolute time
different is insignificant: 0.05s verses 0.01s on my machine.

(From OE-Core rev: 53d0cc1e9b7190fa66d7ff1c59518f91b0128d99)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-check: neaten get_cve_info
Ross Burton [Sun, 8 Dec 2019 18:35:56 +0000 (20:35 +0200)]
cve-check: neaten get_cve_info

Remove obsolete Python 2 code, and use convenience methods for neatness.

(From OE-Core rev: f19253cc9e70c974a8e21a142086c13d7cde04ff)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-check: rewrite look to fix false negatives
Ross Burton [Sun, 8 Dec 2019 18:35:55 +0000 (20:35 +0200)]
cve-check: rewrite look to fix false negatives

A previous optimisation was premature and resulted in false-negatives in the report.

Rewrite the checking algorithm to first get the list of potential CVEs by
vendor:product, then iterate through every matching CPE for that CVE to
determine if the bounds match or not.  By doing this in two stages we can know
if we've checked every CPE, instead of accidentally breaking out of the scan too
early.

(From OE-Core rev: d61aff9e22704ad69df1f7ab0f8784f4e7cc0c69)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-update-db-native: clean up proxy handling
Ross Burton [Sun, 8 Dec 2019 18:35:54 +0000 (20:35 +0200)]
cve-update-db-native: clean up proxy handling

urllib handles adding proxy handlers if the proxies are set in the environment,
so call bb.utils.export_proxies() to do that and remove the manual setup.

(From OE-Core rev: 6b73004668b3b71c9c38814b79fbb58c893ed434)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-update-db-native: add an index on the CVE ID column
Ross Burton [Sun, 8 Dec 2019 18:35:53 +0000 (20:35 +0200)]
cve-update-db-native: add an index on the CVE ID column

Create an index on the PRODUCTS table which contains a row for each CPE,
drastically increasing the performance of lookups for a specific CVE.

(From OE-Core rev: b4048b05b3a00d85c40d09961f846eadcebd812e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-update-db-native: don't hardcode the database name
Ross Burton [Sun, 8 Dec 2019 18:35:52 +0000 (20:35 +0200)]
cve-update-db-native: don't hardcode the database name

Don't hardcode the database filename, there's a variable for this in
cve-check.bbclass.

(From OE-Core rev: 0d188a9dc4ae64c64cd661e9d9c3841e86f226ab)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-update-db-native: don't refresh more than once an hour
Ross Burton [Sun, 8 Dec 2019 18:35:51 +0000 (20:35 +0200)]
cve-update-db-native: don't refresh more than once an hour

We already fetch the yearly CVE metadata and check that for updates before
downloading the full data, but we can speed up CVE checking further by only
checking the CVE metadata once an hour.

(From OE-Core rev: 50d898fd360c58fe85460517d965f62b7654771a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-check: we don't actually need to unpack to check
Ross Burton [Sun, 8 Dec 2019 18:35:50 +0000 (20:35 +0200)]
cve-check: we don't actually need to unpack to check

The patch scanner works with patch files in the layer, not in the workdir, so it
doesn't need to unpack.

(From OE-Core rev: 2cba6ada970deb5156e1ba0182f4f372851e3c17)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-check: failure to parse versions should be more visible
Ross Burton [Sun, 8 Dec 2019 18:35:49 +0000 (20:35 +0200)]
cve-check: failure to parse versions should be more visible

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-check: ensure all known CVEs are in the report
Ross Burton [Sun, 8 Dec 2019 18:35:48 +0000 (20:35 +0200)]
cve-check: ensure all known CVEs are in the report

CVEs that are whitelisted or were not vulnerable when there are version
comparisons were not included in the report, so alter the logic to ensure that
all relevant CVEs are in the report for completeness.

(From OE-Core rev: 98256ff05fcfe9d5ccad360582c36eafb577c264)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosdk: Install nativesdk locales for all TCLIBC variants
Khem Raj [Thu, 26 Sep 2019 05:15:59 +0000 (22:15 -0700)]
sdk: Install nativesdk locales for all TCLIBC variants

install_locales() here is actually operating on nativesdk and only glibc
is the default library for nativesdk, since thats what most of
desktop/server distros use, therefore bailing out based on TCLIBC is not
needed here, since nativesdk-glibc would be required for all non-glibc
targetting SDKs as well.

Fixes SDK install time error

ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
Your system needs to support the en_US.UTF-8 locale.
ERROR: SDK preparation failed

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>
5 years agolibpcap: upgrade 1.9.0 -> 1.9.1
Zang Ruochen [Tue, 19 Nov 2019 09:39:33 +0000 (11:39 +0200)]
libpcap: upgrade 1.9.0 -> 1.9.1

-libpcap/0001-pcap-usb-linux.c-add-missing-limits.h-for-musl-syste.patch
 Removed since this is included in 1.9.1.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[CVE-2018-16301 CVE-2019-15161 CVE-2019-15162 CVE-2019-15163 CVE-2019-15164 CVE-2019-15165]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoprocps: whitelist CVE-2018-1121
Ross Burton [Tue, 5 Nov 2019 21:44:48 +0000 (23:44 +0200)]
procps: whitelist CVE-2018-1121

This CVE is about race conditions in 'ps' which make it unsuitable for security
audits.  As these race conditions are unavoidable ps shouldn't be used for
security auditing, so this isn't a valid CVE.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agowebkitgtk: set CVE_PRODUCT
Chen Qi [Tue, 5 Nov 2019 21:44:47 +0000 (23:44 +0200)]
webkitgtk: set CVE_PRODUCT

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibsndfile1: whitelist CVE-2018-13419
Ross Burton [Tue, 5 Nov 2019 21:44:45 +0000 (23:44 +0200)]
libsndfile1: whitelist CVE-2018-13419

This is a memory leak that nobody else can replicate and has been rejected by
upstream.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibxfont2: set CVE_PRODUCT
Chen Qi [Tue, 5 Nov 2019 21:44:44 +0000 (23:44 +0200)]
libxfont2: set CVE_PRODUCT

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibpam: set CVE_PRODUCT
Ross Burton [Tue, 5 Nov 2019 21:44:43 +0000 (23:44 +0200)]
libpam: set CVE_PRODUCT

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoboost: set CVE vendor to Boost
Ross Burton [Tue, 5 Nov 2019 21:44:42 +0000 (23:44 +0200)]
boost: set CVE vendor to Boost

There's a Boost module for Drupal.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoed: set CVE vendor to avoid false positives
Ross Burton [Tue, 5 Nov 2019 21:44:41 +0000 (23:44 +0200)]
ed: set CVE vendor to avoid false positives

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosubversion: set CVE vendor to Apache
Ross Burton [Tue, 5 Nov 2019 21:44:40 +0000 (23:44 +0200)]
subversion: set CVE vendor to Apache

There's a Jenkins plugin for Subversion.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agogit: set CVE vendor to git-scm
Ross Burton [Tue, 5 Nov 2019 21:44:39 +0000 (23:44 +0200)]
git: set CVE vendor to git-scm

There's a Jenkins plugin for Git.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoflex: set CVE_PRODUCT to include vendor
Ross Burton [Tue, 5 Nov 2019 21:44:38 +0000 (23:44 +0200)]
flex: set CVE_PRODUCT to include vendor

There are many projects called Flex and they have CVEs, so also set the vendor
to remove these false positives.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoopenssl: set CVE vendor to openssl
Anuj Mittal [Tue, 5 Nov 2019 21:44:37 +0000 (23:44 +0200)]
openssl: set CVE vendor to openssl

Differentiate it from openssl gem for Ruby.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython: update to 2.7.17
Alexander Kanavin [Mon, 18 Nov 2019 14:28:40 +0000 (15:28 +0100)]
python: update to 2.7.17

Drop backports, rebase a couple of patches.

This is the second last release of py 2.x; upstream support ends on
1 January 2020, there will be one final 2.x afterwards.

Note that the only thing that still needs python 2.x in oe-core is
u-boot; when the next u-boot update arrives, we should find out
where the py3 migration is for that component before merging the
update.

(From OE-Core rev: 184b60eb905bb75ecc7a0c29a175e624d8555fac)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
[Minor fixup for warrior context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython: fix CVE-2018-20852
Anuj Mittal [Wed, 31 Jul 2019 04:54:54 +0000 (12:54 +0800)]
python: fix CVE-2018-20852

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython: fix CVE-2019-16935
Chen Qi [Sun, 17 Nov 2019 23:23:34 +0000 (07:23 +0800)]
python: fix CVE-2019-16935

(From OE-Core rev: 1a7593bcdaf8a8cf15259aee8a0e2686247f2987)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agobind: fix CVE-2019-6471 and CVE-2018-5743
Kai Kang [Fri, 22 Nov 2019 02:04:26 +0000 (10:04 +0800)]
bind: fix CVE-2019-6471 and CVE-2018-5743

Backport patches to fix CVE-2019-6471 and CVE-2018-5743 for bind.
CVE-2019-6471 is fixed by 0001-bind-fix-CVE-2019-6471.patch and the
other 6 patches are for CVE-2018-5743. And backport one more patch to
fix compile error on arm caused by these 6 commits.

(From OE-Core rev: 3c39d4158677b97253df63f23b74c3a9dd5539f6)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agofile: fix CVE-2019-18218
Ross Burton [Mon, 4 Nov 2019 12:14:55 +0000 (12:14 +0000)]
file: fix CVE-2019-18218

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopatch: the CVE-2019-13638 fix also handles CVE-2018-20969
Ross Burton [Mon, 4 Nov 2019 12:27:13 +0000 (12:27 +0000)]
patch: the CVE-2019-13638 fix also handles CVE-2018-20969

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopseudo: Add statx support to fix fedora30 issues
Richard Purdie [Wed, 6 Nov 2019 13:20:01 +0000 (13:20 +0000)]
pseudo: Add statx support to fix fedora30 issues

Modern distros (e.g. fedora30) are starting to use the new statx() syscall through
the newly exposed glibc wrapper function in software like coreutils (e.g. the ls
command). Add support to intercept this to pseudo.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[Fixup for warrior context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopseudo: Drop static linking to sqlite3
Richard Purdie [Fri, 8 Nov 2019 14:36:36 +0000 (14:36 +0000)]
pseudo: Drop static linking to sqlite3

Back in 2010[1] we made pseudo statically link against sqlite3. Since then
the world has changed, pseudo now has separate processes for the database
in the server and the client and they have separate linking commands.

Also, whilst there were concerns about needing specific versions of sqlite3,
in the OE environment, this is always the case.

[1] http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ad0ac0ecd38fc77daf42485489fccc10a5e1e3e7

The static sqlite3-native is causing us problems, in particular:

tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+060058bb29-r0/recipe-sysroot-native/usr/lib/libsqlite3.a(sqlite3.o):(.data.rel+0xb0): undefined reference to `fcntl64'

which occurs if sqlite3-native was built on a machine with glibc 2.28 or later
and pseudo-native is being built on glibc before that. With dyanmical linking,
libc is backwards compatible and works but with static linking it does not.

There appears to be no easy way to avoid this other than adding a copy of
sqlite3 into the pseudo recipe. Given the static linking doesn't seem to
be required any longer due to the separate processes, drop that to fix
those issues.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopseudo: Fix openat() with a symlink pointing to a directory
Jason Wessel [Mon, 5 Aug 2019 16:32:37 +0000 (09:32 -0700)]
pseudo: Fix openat() with a symlink pointing to a directory

While working with ostree disk generation in conjunction with wic, I
found a problem with pseudo where it tried to resolve a symlink when
it shouldn't, based on openat() flags. A C program has been
constructed to test pseudo to show that it is working properly with
the correct behavior around openat().

 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
 #include <unistd.h>
 #include <fcntl.h>

int main()
{
    /*
     * Tested with: gcc -Wall -o app app.c ; echo "no pseudo" ;
     * ./app ; echo "pseudo"; pseudo ./app
     */
    system("rm -rf tdir tlink");
    system("mkdir tdir");
    system("ln -s tdir tlink");
    DIR *dir = opendir(".");
    int dfd = dirfd(dir);

    int target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK |
                             O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
    if (target_dfd == -1) {
        printf("Test 1 good\n");
    } else {
        printf("Test 1 failed\n");
        close(target_dfd);
    }
    target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK |
                         O_DIRECTORY | O_CLOEXEC);
    if (target_dfd == -1) {
        printf("Test 2 failed\n");
    } else {
        printf("Test 2 good\n");
        close(target_dfd);
    }
    /* Test 3 make sure the owner of the link is root  */
    struct stat sbuf;
    if (!lstat("tlink", &sbuf) && sbuf.st_uid == 0) {
        printf("Test 3 good\n");
    } else {
        printf("Test 3 failed\n");
    }
    /* Test 4 tests open with the "rb" flag, owner should not change */
    int ofd = openat(dfd,"./tlink", O_RDONLY|O_CLOEXEC);
    if (ofd >= 0) {
        if (fstat(ofd, &sbuf) != 0)
            printf("ERROR in fstat test 4\n");
        else if (sbuf.st_uid == 0)
            printf("Test 4 good\n");
        close(ofd);
    } else {
        printf("Test 4 failed with openat()\n");
    }
    /* Test pseudo db to see the fstat() above did not delete the DB entry */
    if (!lstat("tlink", &sbuf) && sbuf.st_uid == 0)
        printf("Test 5 good\n");
    else
        printf("Test 5 failed... tlink is owned by %i and not 0\n", sbuf.st_uid);
    return 0;
}

int main()
{
    /* Tested with: gcc -Wall -o app app.c ; echo "no pseudo" ; ./app ; echo "pseudo"; pseudo ./app */
    system("rm -rf tdir tlink");
    system("mkdir tdir");
    system("ln -s tdir tlink");
    DIR *dir = opendir(".");
    int dfd = dirfd(dir);

    int target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
    if (target_dfd == -1) {
        printf("This is right\n");
    } else {
        printf("This is broken\n");
    }
    return 0;
}

Many thanks to Peter Seebach for fixing the problem in the pseudo code
to use the same logic which was already there for the
AT_SYMLINK_NOFOLLOW.

Also updated is the license MD5 checksum since the master branch of
pseudo has had the SPDX data updated.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: Upgrade 3.7.4 -> 3.7.5
Adrian Bunk [Tue, 5 Nov 2019 21:38:13 +0000 (23:38 +0200)]
python3: Upgrade 3.7.4 -> 3.7.5

Backported patch removed.

3.7.5 also includes the fix for CVE-2019-16935.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: CVE-2019-16056
Chen Qi [Wed, 9 Oct 2019 08:36:39 +0000 (16:36 +0800)]
python3: CVE-2019-16056

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: fix the test_locale output format
Mingli Yu [Mon, 5 Aug 2019 09:38:18 +0000 (02:38 -0700)]
python3: fix the test_locale output format

Before this patch:
 # python3 -m test -v test_locale
 [snip]
 test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9') ok
 [snip]

 After this patch:
 # python3 -m test -v test_locale
 [snip]
 test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9')... ok
 [snip]

Make the test ended with "... ok" is common in python
unittest world, we should make it keep consistent
with other test cases in case it may be ignored to
record in the report if we use the common filter
"... ok".

[YOCTO #13298]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: Fix .pyc file reproduciblility
Joshua Watt [Thu, 27 Jun 2019 13:53:17 +0000 (08:53 -0500)]
python3: Fix .pyc file reproduciblility

Applies a patch to python that makes the pre-compiled .pyc files
generated during the build reproducible.

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>
5 years agopython3: Reformat sysconfig
Joshua Watt [Fri, 21 Jun 2019 13:35:54 +0000 (08:35 -0500)]
python3: Reformat sysconfig

Reformats the sysconfig file when packaging. This file is output by
using the python pprint function. This function will wrap long lines at
80 characters by default, and will even split strings at whitespace
boundaries to do so, e.g.:

 'A': 'B is really'
    ' long'

This causes a problem for reproducibility however because there might be
lines of differing lengths depending on the build path. These
non-reproducible paths are removed, but their effect on string wrapping
from pprint remains.

To correct this, reformat the entire sysconfig file by re-printing using
pprint with an (effectively) unlimited line length.

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>
5 years agopython3: python3: Fix build error x86->x86
Ricardo Ribalda Delgado [Wed, 19 Jun 2019 09:44:55 +0000 (11:44 +0200)]
python3: python3: Fix build error x86->x86

When building x86->x86 the system will try to execute .so and related items
from the default PYTHONPATH.  This will fail if the target CPU contains
instructions that the host CPU does not have, add CROSSPYTHONPATH
into PYTHONPATH so we can prepend the list to find correct libs.

Fixes:

Illegal instruction (core dumped)
Makefile:625: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 132
make: *** Waiting for unfinished jobs....

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: fix build on softfloat mips
Matthias Schoepfer via Openembedded-core [Thu, 6 Jun 2019 16:07:18 +0000 (18:07 +0200)]
python3: fix build on softfloat mips

This patch originally only meant to correct the python3 build for mips
with softfloat, as the original test only checked for mips hardfloat.

Replaced custom C Program for triplet detection with autotools triplet
detection.

Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: fix do_install fail for parallel buiild
Changqing Li [Wed, 8 May 2019 10:05:27 +0000 (18:05 +0800)]
python3: fix do_install fail for parallel buiild

When using make -j with the 'install' target, it's possible for altbininstall
(which normally creates BINDIR) and libainstall (which doesn't, though it
installs python-config there) to race, resulting in a failure due to
attempting to install python-config into a nonexistent BINDIR. Ensure it also
exists in the libainstall target.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibxslt: fix CVE-2019-18197
Joe Slater [Wed, 6 Nov 2019 18:45:54 +0000 (10:45 -0800)]
libxslt: fix CVE-2019-18197

Use patch from upstream after 1.1.33 release.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibtiff: fix CVE-2019-17546
Joe Slater [Wed, 6 Nov 2019 18:45:53 +0000 (10:45 -0800)]
libtiff: fix CVE-2019-17546

Apply unmodified patch from upstream.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agotiff: fix CVE-2019-14973
Trevor Gamblin [Fri, 20 Sep 2019 18:25:11 +0000 (14:25 -0400)]
tiff: fix CVE-2019-14973

CVE reference: https://nvd.nist.gov/vuln/detail/CVE-2019-14973
Upstream merge: https://gitlab.com/libtiff/libtiff/commit/2218055c

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
[fixup for Warrior context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolib/oe/lsb: Make sure the distro ID is always lowercased
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:39 +0000 (23:08 +0100)]
lib/oe/lsb: Make sure the distro ID is always lowercased

In commit 8689e561 (lib/oe/lsb: attempt to ensure consistent distro id
regardless of source), the distro ID returned by
oe.lsb.distro_identifier() was lowercased, but only if a release
version is also present.

This changes the code to always lowercase the distro ID, including the
default distro ID "unknown", which is used if no other ID can be
identified.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agodevtool: finish: Add suppport for the --no-clean option
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:38 +0000 (23:08 +0100)]
devtool: finish: Add suppport for the --no-clean option

This works just like the already existing --no-clean option to the
`devtool reset` command.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agodevtool: finish: Keep patches ordered when updating bbappend
Niclas Svensson [Tue, 5 Nov 2019 22:08:37 +0000 (23:08 +0100)]
devtool: finish: Keep patches ordered when updating bbappend

The _get_patchset_revs() function returns the patches in an
OrderedDict to keep them ordered. However, this information was lost
when the patches were added to the bbappend file.

Signed-off-by: Niclas Svensson <niclas.svensson@axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agotzdata: Correct the packaging of /etc/localtime and /etc/timezone
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:36 +0000 (23:08 +0100)]
tzdata: Correct the packaging of /etc/localtime and /etc/timezone

During restructuring of the packaging in 2af4d6eb (tzdata: Install
everything by default), these two files remained in the tzdata
package, which is supposed to be empty. Move them to tzdata-core where
they belong.

Also simplify the definition of CONFFILES_tzdata-core. As its value
only takes effect for files that actually exist, there is no need to
complicate its definition by checking if a file is created before
adding it to the list of configuration files.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopackage_rpm.bbclass: Remove a misleading bb.note()
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:35 +0000 (23:08 +0100)]
package_rpm.bbclass: Remove a misleading bb.note()

It should have been removed in 3db9d865 (classes/package_rpm.bbclass:
Enhance diagnostic messages) when it was split in two new notes.

Also change the casing of two other notes to align them with the other
notes.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agodevtool: Avoid failure for recipes with S == WORKDIR and no local files
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:34 +0000 (23:08 +0100)]
devtool: Avoid failure for recipes with S == WORKDIR and no local files

When extracting the sources for a recipe that has S == WORKDIR and no
local files in the SRC_URI (which, e.g., can happen for a recipe with
a URI that has the unpack=false attribute), the extraction fails with
the following backtrace:

  Traceback (most recent call last):
    File ".../scripts/devtool", line 344, in <module>
      ret = main()
    File ".../scripts/devtool", line 331, in main
      ret = args.func(args, config, basepath, workspace)
    File ".../poky/scripts/lib/devtool/standard.py", line 762, in
    modify
      initial_rev, _ = _extract_source(srctree, args.keep_temp,
      args.branch, False, config, basepath, workspace,
      args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
    File ".../poky/scripts/lib/devtool/standard.py", line 647, in
    _extract_source
      bb.process.run('git %s commit -a -m "Committing local file
      symlinks\n\n%s"' % (' '.join(useroptions),
      oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
    File ".../poky/bitbake/lib/bb/process.py", line 178, in run
      raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
  bb.process.ExecutionError: Execution of 'git commit -a -m
  "Committing local file symlinks

  %% ignore"' failed with exit code 1:
  On branch devtool
  nothing to commit, working tree clean

This is because no files were found in the oe-local-files directory
and consequently no symbolic links were added using `git add`, but the
`git commit` command was still executed.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agonativesdk-meson: Remove some unused variables
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:33 +0000 (23:08 +0100)]
nativesdk-meson: Remove some unused variables

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agomeson.bbclass: Remove the MESON_*_ARGS variables
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:32 +0000 (23:08 +0100)]
meson.bbclass: Remove the MESON_*_ARGS variables

The options in ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} are already passed
via ${CC}/${CXX} and there is no reason to pass them a second time. Thus
we can remove MESON_TOOLCHAIN_ARGS. And when it is removed, the other
MESON_*_ARGS variables revert to the standard CFLAGS, CXXFLAGS and
LDFLAGS, so just use them directly instead.

Apart from the obvious improvement with not passing a lot of options
twice, this also solves a problem where -pie would be passed on the
command line in a way that it would prevent building any dynamic
libraries using meson if using a toolchain that is not built with
--enable-default-pie and if security_flags.inc is used.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agomeson: Backport patch to handle strings in cross file args
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:31 +0000 (23:08 +0100)]
meson: Backport patch to handle strings in cross file args

This allows <language>_args and <language>_link_args properties, e.g.,
c_link_args, in meson.cross to be specified as either a string or a
list.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agogo-1.12: update to 1.12.9 minor release
Khem Raj [Thu, 31 Oct 2019 19:27:56 +0000 (19:27 +0000)]
go-1.12: update to 1.12.9 minor release

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogo: Upgrade 1.12.5 -> 1.12.6
Adrian Bunk [Thu, 31 Oct 2019 19:27:55 +0000 (19:27 +0000)]
go: Upgrade 1.12.5 -> 1.12.6

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogo: update 1.12.1->1.12.5
Alexander Kanavin [Thu, 31 Oct 2019 19:27:54 +0000 (19:27 +0000)]
go: update 1.12.1->1.12.5

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobuild-appliance-image: Update to warrior head revision 2019-04.2-warrior
Richard Purdie [Wed, 30 Oct 2019 13:55:57 +0000 (13:55 +0000)]
build-appliance-image: Update to warrior head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemu: update to 3.1.1.1
Armin Kuster [Tue, 29 Oct 2019 09:47:32 +0000 (10:47 +0100)]
qemu: update to 3.1.1.1

bug fix only update.

Drop patches included in update.

For full set of changes, see: https://git.qemu.org/?p=qemu.git;a=shortlog;h=refs/tags/v3.1.1.1

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogo: fix CVE-2019-16276
Chen Qi [Tue, 29 Oct 2019 09:47:31 +0000 (10:47 +0100)]
go: fix CVE-2019-16276

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e31f87e289dfd3bbca961e927447a9c7ba816d3f)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit e02e8fa2e82cceaaa6a433466f52f97b0984762a)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosudo: fix CVE-2019-14287
Changqing Li [Tue, 29 Oct 2019 09:47:30 +0000 (10:47 +0100)]
sudo: fix CVE-2019-14287

In Sudo before 1.8.28, an attacker with access to a Runas ALL sudoer
account can bypass certain policy blacklists and session PAM modules,
and can cause incorrect logging, by invoking sudo with a crafted user
ID. For example, this allows bypass of !root configuration, and USER=
logging, for a "sudo -u \#$((0xffffffff))" command.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4e11cd561f2bdaa6807cf02ee7c9870881826308)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit b1e0149c41e3c344a0496e64ab3b0c9dd4685ea4)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibgcrypt: fix CVE-2019-12904
Yi Zhao [Tue, 29 Oct 2019 09:47:29 +0000 (10:47 +0100)]
libgcrypt: fix CVE-2019-12904

In Libgcrypt 1.8.4, the C implementation of AES is vulnerable to a
flush-and-reload side-channel attack because physical addresses are
available to other processes. (The C implementation is used on platforms
where an assembly-language implementation is unavailable.)

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2019-12904

Patches from:
https://github.com/gpg/libgcrypt/commit/1374254c2904ab5b18ba4a890856824a102d4705
https://github.com/gpg/libgcrypt/commit/daedbbb5541cd8ecda1459d3b843ea4d92788762
https://github.com/gpg/libgcrypt/commit/a4c561aab1014c3630bc88faf6f5246fee16b020

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 37e390ff05b6a4509019db358ed496731d80cc51)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 4c207cb1ad46c0d2005ab3eae70d78c937e084b5)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoopenssl: make OPENSSL_ENGINES match install path
George McCollister [Tue, 29 Oct 2019 09:47:28 +0000 (10:47 +0100)]
openssl: make OPENSSL_ENGINES match install path

Set OPENSSL_ENGINES to the path where engines are actually installed.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 59565fec0b3f3e24eb01c03b671913599cd3134d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 578f41124565a7cda738c7fe3d25702ee41b08ed)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: Fix CVE-2019-10160
Changqing Li [Tue, 29 Oct 2019 09:47:27 +0000 (10:47 +0100)]
python: Fix CVE-2019-10160

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit b4240b585d7fcac2fdbf33a8e72d48cb732eb696)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 10d87a3085665a959a5fda64ae3895cb27ddf343)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: CVE-2019-16056
Chen Qi [Tue, 29 Oct 2019 09:47:26 +0000 (10:47 +0100)]
python: CVE-2019-16056

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 27be9cf71a6fe906a23e81b56f1cc18a6fc9ef97)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: add tk-lib as runtime dependency for python-tkinter
Yi Zhao [Tue, 29 Oct 2019 09:47:25 +0000 (10:47 +0100)]
python: add tk-lib as runtime dependency for python-tkinter

Fixes:
ERROR: python-2.7.16-r0 do_package_qa: QA Issue:
/usr/lib/python2.7/lib-dynload/_tkinter.so contained in package
python-tkinter requires libtk8.6.so, but no providers found in
RDEPENDS_python-tkinter? [file-rdeps]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit f78248a2380bbbbf271b5bb02c762f5bc7a3a92e)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>