Compare commits

...

133 Commits

Author SHA1 Message Date
Richard Purdie
12a4c177bb build-appliance-image: Update to zeus head revision
(From OE-Core rev: 75a4cabf55e13e6714c0fdb229cd51b5184ddbef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-27 13:07:39 +00:00
Richard Purdie
cf0cefd53c bitbake: tests/runqueue: Fix to match recent task migration fixes
(Bitbake rev: 8569ccb5e9fbdeaaf96b78bd02a263b26de54059)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-27 11:03:38 +00:00
Richard Purdie
06c6dc9301 build-appliance-image: Update to zeus head revision
(From OE-Core rev: 5a0ccf24fe00728823ee687823f34d843539df68)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-26 22:27:51 +00:00
Richard Purdie
7719a7af93 build-appliance: Use zeus as the branch
(From OE-Core rev: 4a14eb567b51fbdf1f0630b7c63a289bc66f3b80)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-26 22:27:41 +00:00
Richard Purdie
a972597652 build-appliance-image: Update to zeus head revision
(From OE-Core rev: 378b6de44909a383ac002b00ba6da54de77aa61c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-26 21:47:56 +00:00
Richard Purdie
43710d4805 poky.conf: Bump version for 3.0.1 zeus release
(From meta-yocto rev: 1fd5a106ed22e1c932ec25b5bbd977440cdb2232)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-26 21:47:01 +00:00
Carlos Rafael Giani
823a79d873 gstreamer: Change SRC_URI to use HTTPS access instead of HTTP
Some GStreamer recipes like gstreamer1.0-vaapi already use HTTPS instead
of http. Also, access to http:// is simply redirected by the freedesktop
server to https://, and using HTTPS is anyway generally recommended over
plain HTTP for security reasons. So, normalize the URLs to use HTTPS only.

(From OE-Core rev: 7ca54d025168688b1b612c43c9ed4bc0f2ca4d02)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
6c5493908c gst-validate: upgrade to version 1.16.1
(From OE-Core rev: 2dc11f32c6ddfbfc39317ed8ef08a0010b612ea3)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
8222c38b52 gstreamer1.0-rtsp-server: upgrade to version 1.16.1
(From OE-Core rev: 8e80527d545d1e9588e4a3a808a01ccd1f185139)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
9dc42a094a gstreamer1.0-python: upgrade to version 1.16.1
(From OE-Core rev: 0378bc80633c345452abb7d002873cccf402c3f6)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
3277ee2c16 gstreamer1.0-omx: upgrade to version 1.16.1
(From OE-Core rev: a11e9d9cbd7fa6eba887bb9094c841b85bccb2c4)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
adde04efac gstreamer1.0-vaapi: upgrade to version 1.16.1
(From OE-Core rev: 95f10a15a87836cb569f81292c89c7bf159e4e6d)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
d482c10335 gstreamer1.0-libav: upgrade to version 1.16.1
Removed gtkdoc-no-tree.patch since its changes are now included in 1.16.1

(From OE-Core rev: b8b52c405a241a6901b291ff7f6f8319bbd68652)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
3a4712e834 gstreamer1.0-plugins-ugly: upgrade to version 1.16.1
(From OE-Core rev: bed2a8de47534436f811e40bc1b261fa73eb920b)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
8e363fb137 gstreamer1.0-plugins-bad: upgrade to version 1.16.1
(From OE-Core rev: 48f375103a569838ee345716390dc5595cec1e83)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
baf9b40fb2 gstreamer1.0-plugins-good: upgrade to version 1.16.1
* 0001-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch
* headerfix.patch
  Removed since these changes are already included in 1.16.1

(From OE-Core rev: f992741666ddc83ccbf3149f1544b95958150620)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
69da36a0a6 gstreamer1.0-plugins-base: upgrade to version 1.16.1
(From OE-Core rev: 91fb2701cb84959eb35da2aaf605ab815eaa95dc)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
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>
2019-11-25 21:37:41 +00:00
Carlos Rafael Giani
e571c88c44 gstreamer1.0: upgrade to version 1.16.1
(From OE-Core rev: 8946642d425099717d7fc00a01ced9954263517c)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
[ Bug fix only update per release notes:
https://gstreamer.freedesktop.org/releases/1.16/#1.16.1]
1.16.1
The first 1.16 bug-fix release (1.16.1) was released on 23 September 2019
This release only contains bugfixes and it should be safe to update from 1.16.0.
]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Kai Kang
a8f6e31beb 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)

(From OE-Core rev: 07a8d013383b622eabfcefec9378c857b5265c05)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Zheng Ruoqin
5655adda72 tiff: Refresh patch
Refresh CVE-2019-7663.patch as it can't be applyed when using PATCHTOOL = "patch".

(From OE-Core rev: 9c44ecdb9bd6d70f0dfde2a8f0b52015fb6a1d86)

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Alexander Kanavin
a629b6ca52 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)

(From OE-Core rev: d8cd909e7c073eb6365732e5c906f52933fe2e66)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Alexander Kanavin
e8e3b2ce49 Revert "devtool/standard.py: Not filtering devtool workspace for devtool finish"
This reverts commit 41d225f4a3.

Unfortunately this change broke 'devtool upgrade' functionality,
causing 'devtool finish' to write out an upgraded recipe that no
longer includes the original upstream source in SRC_URI.

(From OE-Core rev: 2d6e55192dba0bf7f6e23e5ab5b3dbc68835bb28)

(From OE-Core rev: 2bb221ee5689f13d44b7452738f5a97baa1815a1)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Anuj Mittal
4c8a760115 boost: fix build for x32
Commit: d336110b94 boost: update to 1.67.0

dropped the patch that ensured boost doesn't over-ride the architecture flags
set by us resulting in errors:

| build/tmp/work/x86_64_x32-poky-linux-gnux32/boost/1.69.0-r0/recipe-sysroot/usr/include/bits/long-double.h:44:10: fatal error: bits/long-double-64.h: No such file or directory
| #include <bits/long-double-64.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~
| compilation terminated.

Remove the relevant part from gcc.jam again to ensure we are passing
them correctly again.

Fixes [YOCTO #13598]

(From OE-Core rev: aad28f42b1c8aa1335c040630ebff4a69be07e35)

(From OE-Core rev: ebbfe23acfbc820ad7b71c95539b5af97a8be49d)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.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>
2019-11-25 21:37:40 +00:00
Ross Burton
c1cbb6fd15 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)

(From OE-Core rev: 3ded9a64c95ae02df7562fc69e2af08c150d2452)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Ross Burton
1f4750c47f cve-check: neaten get_cve_info
Remove obsolete Python 2 code, and use convenience methods for neatness.

(From OE-Core rev: f19253cc9e70c974a8e21a142086c13d7cde04ff)

(From OE-Core rev: 98162c04c877925c737674a1635b08cf998b92f5)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Ross Burton
728f969be0 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)

(From OE-Core rev: 0f42a1d4dbb74ab39e81449cf222302bcc04f7db)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Ross Burton
7eaa8b0c36 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)

(From OE-Core rev: 15f6b4b59805db40df4eff6d5a2809f6f05b66c1)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Ross Burton
f307a225ad 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)

(From OE-Core rev: 1b4a524da1532d15eb34a96c5bda5ff2af25a953)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Ross Burton
1dbea71db4 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)

(From OE-Core rev: 1c10a3189aad5109f04d1fc208d579225bdd1431)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Ross Burton
5dd9ef97d3 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)

(From OE-Core rev: f9e9107dbe23293eb96e049d7f821d2e33c23f06)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Ross Burton
9971e87cad 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)

(From OE-Core rev: 02e6b727bf62858be7dba061879a6d57bd5a725d)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Ross Burton
7d43cbd293 libsoup: set CVE_PRODUCT
(From OE-Core rev: 424ea81c3b9965b5d5e45c1dc922dcc910fadc05)

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: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Adrian Bunk
1f29596ca7 lz4: Whitelist CVE-2014-4715
(From OE-Core rev: 4471cd22dbf13feb79171b098b9ec4eeded54ae7)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:37:40 +00:00
Joshua Watt
f1098122e1 oeqa: reproducible: Add option to capture bad packages
Adds an option that can be used to copy the offending packages to a temp
directory for later evaluation. This is useful on the Autobuilder to
investigate failures.

(From OE-Core rev: 91d657a0c4cbb273e1e74d38bfd6b4b05d9b372e)

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>
2019-11-25 21:34:50 +00:00
Alexander Kanavin
c84b0dbcd8 selftest: check that 'devtool upgrade' correctly drops backported patches
There was a regression in this functionality that went unnoticed
due to lack of tests.

(From OE-Core rev: da4c28d5fdc6501a7d3b256cb62cba778e81d16e)

Signed-off-by: Alexander Kanavin <alex.kanavin@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>
2019-11-25 21:34:50 +00:00
Alexander Kanavin
67e155c209 cairo: the component is dual licensed
Somehow, over the years, no one noticed that cairo does in fact
offer a choice between mpl and lgpl, but the COPYING makes it clear:

https://gitlab.freedesktop.org/cairo/cairo/blob/1.16/COPYING

(From OE-Core rev: fd209dac3f717daa9d2f44ada092ab054ac2ede8)

Signed-off-by: Alexander Kanavin <alex.kanavin@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>
2019-11-25 21:34:50 +00:00
Richard Purdie
605f4d4c32 oeqa/selftest/sstatetests: Ensure we don't use hashequiv for sstatesigs tests
(From OE-Core rev: 7f424c32589b94192842f52235c064cb8c19288e)

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>
2019-11-25 21:34:50 +00:00
Richard Purdie
aa72758866 sanity: Add check for tar older than 1.28
Older versions break opkg-build when reproducible builds are enabled.
Rather than trying to be selective based on which features are enabled,
lets just make this a minimum version.

(From OE-Core rev: 96f5c7c2f8dda7d47af5398b3463aa25921f5301)

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>
2019-11-25 21:34:50 +00:00
Richard Purdie
fbd00df78b core-image-full-cmdline: Add less
Less was coming from busybox in these images, add the full version.

[YOCTO #13630]

(From OE-Core rev: 2880164ca74ac1fd7b860c61017efe3d55fb4038)

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>
2019-11-25 21:34:50 +00:00
Richard Purdie
1c0a93e1be opkg-utils: Fix silent empty/broken opkg package creation
opkg-build was failing on hosts where tar < 1.28 and reproducibile builds
were enabled but it was doing this silently and generating corrupted
(empty) ipk files. Add a fix for this (submitted upstream).

The fix requires bash but if you're building ipk files this shoudn't be
a problem.

(From OE-Core rev: 5d774331226f967a2d00c9594c4811ee378cd572)

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>
2019-11-25 21:34:50 +00:00
Richard Purdie
26f62a423d opkg: Add upstream fixes for empty packages
An ipk with a zero size data.tar file caused opkg to crash with a
double free abort. Add the upstream fixes for this.

(From OE-Core rev: ea1ded0b47e85d039dfad2b59580817bfb335739)

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>
2019-11-25 21:34:50 +00:00
Richard Purdie
f5efafffbc bitbake: runqueue: Ensure failed harddependencies in scenequeue are accounted for in migrations
Setscene hard dependencies were not being correctly handled during task migration.
For example, do_package of recipe X might become valid due to hashequiv yet we're
still rebuilding pseudo-native, a harddep of do_package. This would mean
it would try to execute that setscene task despite pseudo not being present.

Fix this by ignoring tasks with failed harddependencies. This does mean
stlightly more rebuilds than is optimal but it avoids build crashes. Ultimately
the new runqueue model can likely better handle these cases than the older codebase
could but that is for another more invasive patch.

(Bitbake rev: 9a1072060350dc2e0eee14a5cc5af20c900f8a6d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:26:15 +00:00
Richard Purdie
f86baae14d bitbake: runqueue: Improve sstate rehashing output
Bibake is currently too 'chatty' when hash equivalence is enabled. Fix
this by only printing the log output if a rehash happens and it matches
an sstate object.

Also, pass a summary option to the hash checking function. This was
already changed to a mechanism which allows addition of new parameters
so this should be backwards and forwards compatible.

(Bitbake rev: c5c5d786ca968d0e48002fe8acbcc8a63a954b67)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:26:15 +00:00
Richard Purdie
456f5e0d23 bitbake: siggen: Fix hashequiv bug where new hash wasn't referenced correctly
If a hash is reported to the hash server, the stamp written out by the
current task didn't account for any new hash the server may have provided.
Fix this so the correct stamp is written. This means "bitbake X; bitbake X"
no longer rebuilds lots of things when hashequiv is active.

(Bitbake rev: 4299afdd290f9d1c5616598f5fe83c195a64b63c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:26:15 +00:00
Richard Purdie
8e2bb3baf9 bitbake: prserv/serv: Only restart the server if settings change
The server is now restarting when running commands which doesn't make
sense. Only restart if its configuration has changed. This should
potentially fix various memory resident bitbake usages too.

(Bitbake rev: 7c847b01c30fc42cc78244f00fdf5eaa7b5df716)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:26:15 +00:00
Richard Purdie
3e8e6700cc bitbake: runqueue: Fix hash equivalence duplicate tasks running
The key problem is that currently running setscene tasks are not
accounted for when processing task migrations. This means can allow
two of the same task to execute at the same time with unpredictable
effects.

This change allows us to stop doing that and refactor the code slightly
to make it clearer that these conditions don't arrive even with
deferred tasks.

(Bitbake rev: 33ffc2128b1a74fa7179a8341db68cddf402536f)

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>
2019-11-25 21:26:15 +00:00
Richard Purdie
49bc773cd0 bitbake: fetch2/clearcase: Fix warnings from python 3.8
bitbake/lib/bb/fetch2/clearcase.py:148: SyntaxWarning: "is" with a literal. Did you mean "=="?
      if command is 'mkview':
bitbake/lib/bb/fetch2/clearcase.py:155: SyntaxWarning: "is" with a literal. Did you mean "=="?
      elif command is 'rmview':
bitbake/lib/bb/fetch2/clearcase.py:159: SyntaxWarning: "is" with a literal. Did you mean "=="?
      elif command is 'setcs':

Python 3.8 is quite correct and we so mean "==" here, fix it to
avoid the warnings.

(Bitbake rev: 2cccc14304855cb55f339e465f6ba6ed0c69a7ab)

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>
2019-11-25 21:26:15 +00:00
Ross Burton
0d6c922af9 bitbake: utils: also use mmap for SHA256 and SHA1, for performance
md5_file() uses a mmap() window to improve performance when hashing files, so
refactor the code and do the same for SHA1 and SHA256.

(Bitbake rev: 94ede642dce8cdbf09f566e3f7e9e260d33fda27)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:26:15 +00:00
Ross Burton
59edce3af5 bitbake: tests: add test for the hashing functions
Add a basic test for bb.utils.md5_file() etc.

(Bitbake rev: d535e78b14136e74d6e96ff24d3464d62637459d)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:26:15 +00:00
Peter Kjellerstedt
9350b76f27 bitbake: cooker: Remove a left-over comment about expanded_data
This should have been removed together with expanded_data in commit
e3694e73 (cooker/command: Drop expanded_data).

(Bitbake rev: 987996f01d55bc6433aeb7f43c209eb12f6d796b)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 21:26:15 +00:00
Gavin Li
4010e6a25d bitbake: prserv: fix ResourceWarning due to unclosed socket
With PRSERV_HOST = "localhost:0", this message would occasionally pop up
during the initial cache read:

WARNING: /home/matic/ambayocto/poky/bitbake/lib/bb/cache.py:446: ResourceWarning: unclosed <socket.socket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 45655)>
  value = pickled.load()

The file location stated is irrelevant; it just happens to be wherever
CPython decides to run the garbage collector. The issue is that after we
fork off a PRServer, self.socket is also duplicated. The parent side of
it also needs to be closed.

(Bitbake rev: cd970c9efa805ec3e7ba952df1701b347441ec7b)

Signed-off-by: Gavin Li <gavin@matician.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>
2019-11-25 21:26:15 +00:00
Volker Vogelhuber
0f408d8a2e bitbake: fetch2/hg: Fix various runtime issues
Fix mercurial fetching after breakage from changes to the core fetcher.
Fix username and password usage and setting moddir needed by setup_revisions.

(Bitbake rev: c61c8356cce4d7307f74147dcf2b2cf103db84a8)

Signed-off-by: Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>
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>
2019-11-25 21:26:15 +00:00
Christopher Larson
0b55d6c27e bitbake: tests/fetch: add test for fetching shallow revs
[YOCTO #13586]

(Bitbake rev: 566a6fe8c217c02f1ba5afc621ae9c3523f35d03)

Signed-off-by: Christopher Larson <chris_larson@mentor.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>
2019-11-25 21:26:12 +00:00
Christopher Larson
2d6a3655e9 bitbake: fetch2/git: fetch shallow revs when needed
When bitbake determines if a git clone needs updating, it only checks for the
needed srcrevs, not the revs listed in BB_GIT_SHALLOW_REVS, which will fail if
using shallow and the needed rev was added to the upstream git repo after a
previous fetch. Ensure that we also check for shallow revs.

[YOCTO #13586]

(Bitbake rev: 24e3c7189e7d41bcbb46078a41c3a9daf391202a)

Signed-off-by: Christopher Larson <chris_larson@mentor.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>
2019-11-25 21:26:12 +00:00
Adrian Bunk
0275e68b05 iputils: Whitelist CVE-2000-1213 CVE-2000-1214
(From OE-Core rev: 9fea7c3fae30bb1eecb31ec3bf777db981dc1eed)

(From OE-Core rev: 6431e869998baa1ddfe04d2d1fb7a81f60725ed2)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-19 00:24:22 +00:00
Peter Kjellerstedt
b990f0c7dc sysstat: Correct when to use the package provided systemd unit files
There have been a number of changes back and forth as to when and how
to use the systemd unit files provided by the package. The correct
condition is actually that both cron and systemd need to be enabled
for them to be installed.

(From OE-Core rev: d6c975160197f67937dfbe91b08100b0f597c589)

(From OE-Core rev: 18e1c8c967eb4512f226919cd2b6b1fb4795ccb1)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.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>
2019-11-19 00:24:22 +00:00
Peter Kjellerstedt
c4bd636938 sysstat: Correct our systemd unit file
In commit 8862f21e (sysstat: 12.1.3 -> 12.1.6), sa_lib_dir was changed
from "${libdir}/sa" to "${libexecdir}/sa" to avoid problems with
multilib. However, the systemd unit file was not changed accordingly,
which lead to the following error when trying to start the service:

  systemd[4698]: sysstat.service: Failed at step EXEC spawning
  /usr/lib/sa/sa1: No such file or directory

(From OE-Core rev: 0fd691b9801b5313ff2e2c2cd5ca13fd50063235)

(From OE-Core rev: e5c5ffb048e9ebce333d855254ef88eda2f3bf6b)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.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>
2019-11-19 00:24:22 +00:00
Chen Qi
e97c2d769f python: fix CVE-2019-16935
(From OE-Core rev: 1a7593bcdaf8a8cf15259aee8a0e2686247f2987)

(From OE-Core rev: c0fcbf327288ef61e30fdbe27453875916ca32ba)

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>
2019-11-19 00:24:22 +00:00
Ross Burton
348778f89c wpa-supplicant: fix CVE-2019-16275
(From OE-Core rev: d7b5a2ebdb6e74a21059ac2496b5dbea4597eb87)

(From OE-Core rev: 1c1c70ee26078357c4fe3647581f4adec1a8a97d)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-19 00:24:22 +00:00
Trevor Gamblin
85e3e6dfd6 binutils: fix CVE-2019-17451
Backport upstream fix. No upstream release version of
binutils it yet, so backport the fix independently.

(From OE-Core rev: 3693a0a8b9461521b95613a76b7fd79c86a3bf8f)

(From OE-Core rev: 8e2a1cdd7572d051cc23350bf8838a984dfbd2bc)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-19 00:24:22 +00:00
Trevor Gamblin
724eb2e369 binutils: fix CVE-2019-17450
Backport upstream fix. No upstream release version of
binutils it yet, so backport the fix independently.

(From OE-Core rev: a4ead72b958ded4941f96741029f4955930ba758)

(From OE-Core rev: 8b33aeb4122be31b2aed29e40dcac01ea4643b63)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-19 00:24:22 +00:00
Richard Purdie
1fc208bd48 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.

(From OE-Core rev: f47017ff7f1ae1731412524768af372791068689)

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>
2019-11-13 22:02:16 +00:00
Haris Okanovic
01850c786a initscripts/sysfs.sh: Mount /sys/firmware/efi/efivars when possible
Without this change, efibootmgr is unable to recover BootOrder if lost
during a previous write operation, e.g. exceeded storage capacity. This
is problematic using EFI to manage boot flow from Linux (E.g. via RAUC).

https://www.kernel.org/doc/Documentation/filesystems/efivarfs.txt

(From OE-Core rev: adc0a31169f59d0183c327347b9ab3bcebb1aef2)

Signed-off-by: Haris Okanovic <haris.okanovic@ni.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>
2019-11-13 22:02:16 +00:00
Zhixiong Chi
409b656f74 libtirpc: create the symbol link for rpc header files
Since the Sun RPC is deprecated in glibc, the rpc header files
are not provided any more, but it allows alternative RPC
implementations, such as TIRPC or rpcsvc-proto, to be used.

So we create the symbol link for rpc header files for tirpc to
be more compatible with the glibc version and the application usage.

(From OE-Core rev: 0b9748c655b6f733b504e70288f4b91dca2e4d58)

Signed-off-by: Zhixiong Chi <zhixiong.chi@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>
2019-11-13 22:02:16 +00:00
Jacob Kroon
4ad64a5cf5 rm_work: Promote do_image_qa stamps to setscene versions
[ YOCTO #13212 ]

Suggested-by: Romuald Jeanne <romuald.jeanne@st.com>
(From OE-Core rev: 624897ee788fe026a04951baaf770daca43e892c)

Signed-off-by: Jacob Kroon <jacob.kroon@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>
2019-11-13 22:02:16 +00:00
Samuli Piippo
1da39077e5 linux-firmware: update packaging for brcm files
Add new package for bcm4366c and include available NVRAM config files
into the corrent bcm* packages.

(From OE-Core rev: 957c3d39b63f57d896ee89d727007ac2ce6672e3)

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
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>
2019-11-13 22:02:16 +00:00
Ross Burton
006b110cdb patch: the CVE-2019-13638 fix also handles CVE-2018-20969
(From OE-Core rev: 41b1d53cea0302f1c3954c6ab048366c908cf754)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:16 +00:00
Ross Burton
8d90432a73 recipeutils-test: use a small dependency in the dummy recipe
recipeutils-test has virtual/libx11 as a DEPENDS, but this will cause errors if
the recipe is built in an environment without x11 in DISTRO_FEATURES.

This dependency isn't actually used for anything so we could remove it, but to
save updating the test cases too just swap virtual/libx11 for zlib.

[ YOCTO #13611 ]

(From OE-Core rev: 90b4b7dd19526e8aba79cf469dcc2c05401f36cc)

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>
2019-11-13 22:02:16 +00:00
Alexander Kanavin
8775cdf59a selftest: skip virgl test on centos 7 entirely
With the sdl frontend, qemu isn't able to even boot fully,
so let's skip the test early.

(From OE-Core rev: 1344a6a1300007b4fadaf815f6652d30e7834430)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
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>
2019-11-13 22:02:16 +00:00
Ross Burton
a8580a49b0 cve-check: failure to parse versions should be more visible
(From OE-Core rev: 6b5cadd1a5822641285946f7e2ad56e294658621)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:16 +00:00
Bruce Ashfield
3023bc10ce linux-yocto/5.2: update to v5.2.20
Updating linux-yocto/5.2 to the latest korg -stable release that comprises
the following commits:

    56fd0c9f5473 Linux 5.2.20
    6f375cee0394 vfs: set fs_context::user_ns for reconfigure
    fbad63fcf7f8 9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie
    23721140761c KVM: hyperv: Fix Direct Synthetic timers assert an interrupt w/o lapic_in_kernel
    f6e1c74f5664 kexec: bail out upon SIGKILL when allocating memory.
    a761ba725477 NFC: fix attrs checks in netlink interface
    08519f370a57 dm raid: fix updating of max_discard_sectors limit
    069a73c93447 smack: use GFP_NOFS while holding inode_smack::smk_lock
    73cf33180fd5 Smack: Don't ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set
    e4875cfb207f soundwire: fix regmap dependencies and align with other serial links
    455807823191 arm: use STACK_TOP when computing mmap base address
    a7d44c89fb47 arm: properly account for stack randomization and stack guard gap
    d474fced6704 mips: properly account for stack randomization and stack guard gap
    5edc5cfcd1ce arm64: consider stack randomization for mmap base only when necessary
    0499bb1b61cd kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K
    b71617b36dc6 ocfs2: wait for recovering done after direct unlock request
    5f63ef732675 kbuild: clean compressed initramfs image
    26235380e633 crypto: hisilicon - Fix double free in sec_free_hw_sgl()
    ef1bb2f3c68c hypfs: Fix error number left in struct pointer member
    86fa1c1b3ab1 pktcdvd: remove warning on attempting to register non-passthrough dev
    30ef03cb2c46 fat: work around race with userspace's read via blockdev while mounting
    049e9c72a671 ARM: 8903/1: ensure that usable memory in bank 0 starts from a PMD-aligned address
    68a14319be38 ARM: 8905/1: Emit __gnu_mcount_nc when using Clang 10.0.0 or newer
    b10ee4270915 PCI: Use static const struct, not const static struct
    88b4b5b7e2a8 security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb()
    0728352751bb PCI: exynos: Propagate errors for optional PHYs
    6eb7a0a0eb86 PCI: imx6: Propagate errors for optional regulators
    130642ed27a6 PCI: histb: Propagate errors for optional regulators
    dc35055b644f PCI: rockchip: Propagate errors for optional regulators
    06f8fc7effb5 HID: apple: Fix stuck function keys when using FN
    1c8c46bdfcde PCI: Add pci_info_ratelimited() to ratelimit PCI separately
    400a250cc06f selinux: fix residual uses of current_security() for the SELinux blob
    30f8969d6265 rtc: pcf85363/pcf85263: fix regmap error in set_time
    1a5f22226ad0 rtc: snvs: fix possible race condition
    6edfcbdc24be ARM: 8875/1: Kconfig: default to AEABI w/ Clang
    5a58f0bf27ff soundwire: intel: fix channel number reported by hardware
    175f4efcb12a ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes
    cf4e9c2472ac mips/atomic: Fix smp_mb__{before,after}_atomic()
    a7ef43bf9064 livepatch: Nullify obj->mod in klp_module_coming()'s error path
    677540cb39e0 PCI: layerscape: Add the bar_fixed_64bit property to the endpoint driver
    97c3d2a3dd8f PCI: pci-hyperv: Fix build errors on non-SYSFS config
    57e4c0e0efce mips/atomic: Fix loongson_llsc_mb() wreckage
    11daaf5c38f2 HID: wacom: Fix several minor compiler warnings
    503aae8dcc18 PCI: tegra: Fix OF node reference leak
    b0a68c638875 mfd: intel-lpss: Remove D3cold delay
    b6cb1efe18cc i2c-cht-wc: Fix lockdep warning
    d1d45f98a6e6 MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean
    7bd355196324 MIPS: Don't use bc_false uninitialized in __mm_isBranchInstr
    cac61f5b7d95 MIPS: Ingenic: Disable broken BTB lookup optimization.
    b67fd3bfeec5 ext4: fix potential use after free after remounting with noblock_validity
    ad849db7534b f2fs: fix to drop meta/node pages during umount
    ce7adbbc06e3 dma-buf/sw_sync: Synchronize signal vs syncpt free
    99a2037bec11 scsi: core: Reduce memory required for SCSI logging
    cbd9a87fbdf9 clk: sprd: add missing kfree
    4d5a7f001acc mbox: qcom: add APCS child device for QCS404
    910d8b71530c powerpc: dump kernel log before carrying out fadump or kdump
    04dddb1ca7ad clk: Make clk_bulk_get_all() return a valid "id"
    b6185efcf241 clk: imx: clk-pll14xx: unbypass PLL by default
    d54c3307cac1 clk: imx: pll14xx: avoid glitch when set rate
    9b538d38aa92 clk: at91: select parent if main oscillator or bypass is enabled
    39a3ff30b6ad arm64: fix unreachable code issue with cmpxchg
    15786d677bbc mailbox: mediatek: cmdq: clear the event in cmdq initial flow
    1496f3d15934 pinctrl: meson-gxbb: Fix wrong pinning definition for uart_c
    112f51caf1b6 powerpc/pseries: correctly track irq state in default idle
    f87906966831 clk: qcom: gcc-sdm845: Use floor ops for sdcc clks
    e5169c0043af powerpc/eeh: Clean up EEH PEs after recovery finishes
    c25829e2e7de pstore: fs superblock limits
    b32e4cc264c8 powerpc/64s/exception: machine check use correct cfar for late handler
    f939cc03668f drm/amdgpu/si: fix ASIC tests
    bfbc57ef3481 selftests/powerpc: Retry on host facility unavailable
    73bffb99ddca drm/amd/display: support spdif
    18184bd06a69 clk: renesas: cpg-mssr: Set GENPD_FLAG_ALWAYS_ON for clock domain
    b4b220dfcd36 clk: renesas: mstp: Set GENPD_FLAG_ALWAYS_ON for clock domain
    b5c5e7dfde66 pinctrl: amd: disable spurious-firing GPIO IRQs
    b1a330db3cc3 drm/nouveau/volt: Fix for some cards having 0 maximum voltage
    ecce6020a052 drm/nouveau/kms/tu102-: disable input lut when input is already FP16
    6ad134a33083 vfio_pci: Restore original state on release
    169edc8a1b8b powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag
    0b54040780ce pinctrl: tegra: Fix write barrier placement in pmx_writel
    a16c6638d760 powerpc/perf: fix imc allocation failure handling
    4ce5f278af62 powerpc/pseries/mobility: use cond_resched when updating device tree
    714886254f3c powerpc/64s/radix: Fix memory hotplug section page table creation
    de37ad13aca1 powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function
    f2118bfd0259 powerpc/rtas: use device model APIs and serialization during LPM
    26c32f58d8eb powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL
    fa702b72cbf9 clk: zx296718: Don't reference clk_init_data after registration
    5772dedde987 clk: sprd: Don't reference clk_init_data after registration
    3c384b661818 clk: meson: axg-audio: Don't reference clk_init_data after registration
    8e9a12894cc3 clk: sirf: Don't reference clk_init_data after registration
    5a90971761cd clk: actions: Don't reference clk_init_data after registration
    672ce7241a40 powerpc/powernv/ioda2: Allocate TCE table levels on demand for default DMA window
    97641efe039e drm/amd/display: reprogram VM config when system resume
    075ad48409c1 drm/amd/display: Fix frames_to_insert math
    73de2baa5b3c drm/amd/display: fix issue where 252-255 values are clipped
    98ecf758e63f clk: sunxi-ng: v3s: add missing clock slices for MMC2 module clocks
    60e5b94e4fe6 clk: qoriq: Fix -Wunused-const-variable
    99340b4cad30 ipmi_si: Only schedule continuously in the thread in maintenance mode
    dc8331fb5397 pinctrl: stmfx: update pinconf settings
    49b23a7d976d PCI: rpaphp: Avoid a sometimes-uninitialized warning
    d1deded18c3e clk: imx8mq: Mark AHB clock as critical
    22acd1a64d95 gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()
    0cb2ddf9a3a0 drm/radeon: Fix EEH during kexec
    a86a8e6ef256 drm/amdgpu: Fix hard hang for S/G display BOs.
    d8847b4b3a24 drm/rockchip: Check for fast link training before enabling psr
    d85e0b4ef1f2 drm/panel: check failure cases in the probe func
    f85634c3ffd2 drm/stm: attach gem fence to atomic state
    0b271676816a drm/tinydrm/Kconfig: drivers: Select BACKLIGHT_CLASS_DEVICE
    21eee05ca2c8 video: ssd1307fb: Start page range at page_offset
    b51bb2f57998 drm/amd/display: add monitor patch to add T7 delay
    d7c8317943b5 drm/panel: simple: fix AUO g185han01 horizontal blanking
    bdcef6cd4c94 drm/vkms: Avoid assigning 0 for possible_crtc
    29079f2260ff drm/bridge: tc358767: Increase AUX transfer length limit
    b66b85d54494 drm/vkms: Fix crc worker races
    c036f925087e net: sched: taprio: Avoid division by zero on invalid link speed
    411184eda7d0 net: sched: cbs: Avoid division by zero when calculating the port rate
    90053e8de295 ptp_qoriq: Initialize the registers' spinlock before calling ptp_qoriq_settime
    4437b0b5d236 xen-netfront: do not use ~0U as error return value for xennet_fill_frags()
    04e6fa02cc6e net/rds: Fix error handling in rds_ib_add_one()
    d6870bbdacd6 udp: only do GSO if # of segs > 1
    da0f508134bb tcp: adjust rto_base in retransmits_timed_out()
    c5994847e736 net: dsa: rtl8366: Check VLAN ID and not ports
    11432777d98b vsock: Fix a lockdep warning in __vsock_release()
    fba0b06b5941 udp: fix gso_segs calculations
    9af774bcc460 tipc: fix unlimited bundling of small messages
    c01fc241d449 sch_dsmark: fix potential NULL deref in dsmark_init()
    392053bb2328 sch_cbq: validate TCA_CBQ_WRROPT to avoid crash
    e752bb81ed39 rxrpc: Fix rxrpc_recvmsg tracepoint
    7fc879a38f81 qmi_wwan: add support for Cinterion CLS8 devices
    600c91857832 nfc: fix memory leak in llcp_sock_bind()
    50b26ba8938f net: Unpublish sk from sk_reuseport_cb before call_rcu
    4e71bbe0fdc8 net: sched: taprio: Fix potential integer overflow in taprio_set_picos_per_byte
    a087259d42ba net: qlogic: Fix memory leak in ql_alloc_large_buffers
    ff917e2d2c8d net: ipv4: avoid mixed n_redirects and rate_tokens usage
    3e586883beb4 ipv6: Handle missing host route in __ipv6_ifa_notify
    a0efe1cbadc4 ipv6: drop incoming packets having a v4mapped source address
    93b1f9364559 hso: fix NULL-deref on tty open
    7edcdec673dc erspan: remove the incorrect mtu limit for erspan
    a203f2d6b4ea cxgb4:Fix out-of-bounds MSI-X info array access
    076d9f965e56 Linux 5.2.19
    8c4f7f403e79 platform/chrome: cros_ec_rpmsg: Fix race with host command when probe failed
    d4ecc0a011cc mt76: mt7615: fix mt7615 firmware path definitions
    7dcd2e608bd3 mt76: mt7615: always release sem in mt7615_load_patch
    c959aebdc313 md/raid0: avoid RAID0 data corruption due to layout confusion.
    cb2daf3e8cef drm/amd/display: Restore backlight brightness after system resume
    5bd1ab51d4c7 CIFS: Fix oplock handling for SMB 2.1+ protocols
    b90f653c964e CIFS: fix max ea value size
    bc3a3e7c695c i2c: riic: Clear NACK in tend isr
    ba86f3d55fc1 hwrng: core - don't wait on add_early_randomness()
    fa0c86d48184 quota: fix wrong condition in is_quota_modification()
    6c8042e92499 ext4: fix punch hole for inline_data file systems
    7c7aff67e841 ext4: fix warning inside ext4_convert_unwritten_extents_endio
    026f900e102a mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option
    afe3a71e655d ipmi: move message error checking to avoid deadlock
    b0df636473e5 xfs: Fix stale data exposure when readahead races with hole punch
    b56335c486f7 mm: Handle MADV_WILLNEED through vfs_fadvise()
    a775ad97ce77 fs: Export generic_fadvise()
    f811fce3971f /dev/mem: Bail out upon SIGKILL.
    84a85e7ec32e cfg80211: Purge frame registrations on iftype change
    d1e007a497f6 md: only call set_in_sync() when it is expected to succeed.
    c4ab81dab3b0 md: don't report active array_state until after revalidate_disk() completes.
    801070ab8ad5 md/raid6: Set R5_ReadError when there is read failure on parity disk
    82dd0828253a ACPI / LPSS: Save/restore LPSS private registers also on Lynxpoint
    ca1a7debf461 SUNRPC: Fix buffer handling of GSS MIC without slack
    89c2c6f70602 SUNRPC: Dequeue the request from the receive queue while we're re-encoding
    e5b682d7792f Btrfs: fix race setting up and completing qgroup rescan workers
    8e2074d3c283 btrfs: qgroup: Fix reserved data space leak if we have multiple reserve calls
    f2a4259af36d btrfs: qgroup: Fix the wrong target io_tree when freeing reserved data space
    51bae3f5578c btrfs: adjust dirty_metadata_bytes after writeback failure of extent buffer
    3c6b7c79fe96 btrfs: Relinquish CPUs in btrfs_compare_trees
    620cde3fe214 Btrfs: fix use-after-free when using the tree modification log
    db66429314dd btrfs: fix allocation of free space cache v1 bitmap pages
    0a19609d9a2f ovl: filter of trusted xattr results in audit
    ee080509c14e ovl: Fix dereferencing possible ERR_PTR()
    e2a5e040a63b smb3: fix leak in "open on server" perf counter
    79aeacfeebb5 smb3: allow disabling requesting leases
    a98f553d2b78 block: fix null pointer dereference in blk_mq_rq_timed_out()
    facb691f45d6 block: mq-deadline: Fix queue restart handling
    ab3d89dbec88 i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask
    00cac3533335 ath10k: fix channel info parsing for non tlv target
    7228bca11c14 rtw88: pci: Use DMA sync instead of remapping in RX ISR
    80e456c82a5c rtw88: pci: Rearrange the memory usage for skb in RX ISR
    a8e0442493bf KEYS: trusted: correctly initialize digests and fix locking issue
    e1ff89ad3dde mt76: round up length on mt76_wr_copy
    d08bb3463d8f lib/lzo/lzo1x_compress.c: fix alignment bug in lzo-rle
    482859563c02 memcg, kmem: do not fail __GFP_NOFAIL charges
    ef54420b0726 memcg, oom: don't require __GFP_FS when invoking memcg OOM killer
    1cbbcacdcdf4 mm/compaction.c: clear total_{migrate,free}_scanned before scanning a new zone
    5377b8767d64 z3fold: fix memory leak in kmem cache
    ed99d2d1af39 z3fold: fix retry mechanism in page reclaim
    9a6b2645aa75 gfs2: clear buf_in_tr when ending a transaction in sweep_bh_for_rgrps
    9b4f0cba4476 efifb: BGRT: Improve efifb_bgrt_sanity_check
    d6acb54716ff regulator: Defer init completion for a while after late_initcall
    f11e0e8942f4 iommu/vt-d: Fix wrong analysis whether devices share the same bus
    f683465f0564 alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP
    5d67ad366f2b iommu/arm-smmu-v3: Disable detection of ATS and PRI
    7fd38df794c2 arm64: dts: rockchip: limit clock rate of MMC controllers for RK3328
    ef2fa63bbe95 arm64: tlb: Ensure we execute an ISB following walk cache invalidation
    516d62914766 ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up
    b9cbc0df92c3 ARM: samsung: Fix system restart on S3C6410
    f1592b754350 ASoC: Intel: Fix use of potentially uninitialized variable
    6c03deb9baf9 ASoC: Intel: Skylake: Use correct function to access iomem space
    4ccbdceb2e2b ASoC: Intel: NHLT: Fix debug print format
    89beb34d7533 binfmt_elf: Do not move brk for INTERP-less ET_EXEC
    a24d7c499db0 spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours
    f0724e4dc181 spi: ep93xx: Repair SPI CS lookup tables
    215019d6ef10 media: don't drop front-end reference count for ->detach
    11f20198e922 media: sn9c20x: Add MSI MS-1039 laptop to flip_dmi_table
    682dbe2cb5e7 media: videobuf-core.c: poll_wait needs a non-NULL buf pointer
    e1bbf7d2cd21 KVM: x86/mmu: Use fast invalidate mechanism to zap MMIO sptes
    32076032e7db KVM: x86: Disable posted interrupts for non-standard IRQs delivery modes
    fb817d533600 KVM: x86: Manually calculate reserved bits when loading PDPTRS
    c5c761130003 KVM: x86: set ctxt->have_exception in x86_decode_insn()
    8d1e0c157027 KVM: x86: always stop emulation on page fault
    8e422d4af87d platform/x86: intel_int0002_vgpio: Fix wakeups not working on Cherry Trail
    c1b3752b5f25 parisc: Disable HP HSC-PCI Cards to prevent kernel crash
    3a1f5551534d fuse: fix beyond-end-of-page access in fuse_parse_cache()
    99a21e616426 fuse: fix missing unlock_page in fuse_writepage()
    831bd6ec1633 fuse: fix deadlock with aio poll and fuse_iqueue::waitq.lock
    843d38c96532 tpm: Wrap the buffer from the caller to tpm_buf in tpm_send()
    d59609b135ac tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts
    43e8e81e357c tpm_tis_core: Turn on the TPM before probing IRQ's
    830afcbc9391 powerpc/imc: Dont create debugfs files for cpu-less nodes
    c9321577cbc9 scsi: implement .cleanup_rq callback
    2492d1d7f34a blk-mq: add callback of .cleanup_rq
    22b97cad6d67 ALSA: hda/realtek - PCI quirk for Medion E4254
    f0028c2bed93 rcu/tree: Fix SCHED_FIFO params
    d567e81a20c0 ARM: dts: am3517-evm: Fix missing video
    5f8095b682d6 randstruct: Check member structs in is_pure_ops_struct()
    03d53cb8acb8 RDMA: Fix double-free in srq creation error flow
    3d97d7d688e7 IB/hfi1: Do not update hcrc for a KDETH packet during fault injection
    040fc3258d95 IB/hfi1: Define variables as unsigned long to fix KASAN warning
    dcbb25d9400b IB/mlx5: Free mpi in mp_slave mode
    44602a8a1406 printk: Do not lose last line in kmsg buffer dump
    9dfb1ce6b615 scsi: qla2xxx: Fix Relogin to prevent modifying scan_state flag
    a16791fccaf6 scsi: scsi_dh_rdac: zero cdb in send_mode_select()
    6e8f051e504d ALSA: firewire-tascam: check intermediate state of clock status and retry
    75c1a117e1f7 ALSA: firewire-tascam: handle error code when getting current source of clock
    77567ebc4060 iwlwifi: fw: don't send GEO_TX_POWER_LIMIT command to FW version 36
    9d9c01542848 ARM: omap2plus_defconfig: Fix missing video
    3d226661238e ARM: dts: logicpd-torpedo-baseboard: Fix missing video
    2e847a842b2b PM / devfreq: passive: fix compiler warning
    8e16bddcc6bd media: omap3isp: Set device on omap3isp subdevs
    d6595ad8ca5d kvm: Nested KVM MMUs need PAE root too
    37099d7a3e66 btrfs: Detect unbalanced tree with empty leaf before crashing btree operations
    3d95c52d789c btrfs: tree-checker: Add ROOT_ITEM check
    9ae8394e41d7 btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type
    7ee67b37a0bf btrfs: delayed-inode: Kill the BUG_ON() in btrfs_delete_delayed_dir_index()
    9e6431c0f2e4 zd1211rw: remove false assertion from zd_mac_clear()
    8e9a39559b73 iommu/amd: Override wrong IVRS IOAPIC on Raven Ridge systems
    d6dfca753d7a ALSA: hda/realtek - Blacklist PC beep for Lenovo ThinkCentre M73/93
    798b010be17b drm: fix module name in edid_firmware log message
    dae45bd9b873 media: ttusb-dec: Fix info-leak in ttusb_dec_send_command()
    06752109ced1 drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2)
    33e91a59bf81 ALSA: hda - Drop unsol event handler for Intel HDMI codecs
    5397eb1a1fb0 ALSA: hda - Add a quirk model for fixing Huawei Matebook X right speaker
    354098b7045d e1000e: add workaround for possible stalled packet
    27a2b39359f8 libertas: Add missing sentinel at end of if_usb.c fw_table
    9eff1ebe2c90 mmc: mtk-sd: Re-store SDIO IRQs mask at system resume
    c5f89ff633d2 raid5: don't increment read_errors on EILSEQ return
    7cb4bc790e12 mmc: dw_mmc: Re-store SDIO IRQs mask at system resume
    6d9a663aca54 mmc: core: Add helper function to indicate if SDIO IRQs is enabled
    d32263d8b9b5 mmc: sdhci: Fix incorrect switch to HS mode
    de6fea9fcf1e sched/psi: Correct overly pessimistic size calculation
    106af0369442 mmc: core: Clarify sdio_irq_pending flag for MMC_CAP2_SDIO_IRQ_NOTHREAD
    f9762c19d883 raid5: don't set STRIPE_HANDLE to stripe which is in batch list
    d54de8cfa4a1 block: make rq sector size accessible for block stats
    6c7b70e220d5 io_uring: fix wrong sequence setting logic
    38b24f688d64 ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set
    a7963f92406d platform/x86: intel_pmc_core: Do not ioremap RAM
    c7e971d4f027 x86/cpu: Add Tiger Lake to Intel family
    6e2056c4424c irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices
    74a94a7e0a01 s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding
    cf8360a5be18 irqchip/sifive-plic: set max threshold for ignored handlers
    1f57c45eaab5 x86/mm: Fix cpumask_of_node() error condition
    daecd8d05e3d kprobes: Prohibit probing on BUG() and WARN() address
    6265d3c8b96b dmaengine: ti: edma: Do not reset reserved paRAM slots
    18a00f37f418 md/raid1: fail run raid1 array when active disk less than one
    b92d8e39fa70 hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap'
    d57d9213d8b8 hwmon: (k10temp) Add support for AMD family 17h, model 70h CPUs
    94a379db627a closures: fix a race on wakeup from closure_sync
    4b88669aa2f8 ACPI / PCI: fix acpi_pci_irq_enable() memory leak
    70424999fbf1 ACPI: custom_method: fix memory leaks
    997c08a49443 x86/amd_nb: Add PCI device IDs for family 17h, model 70h
    91180767bba9 ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks
    a6ff82b2cb60 libtraceevent: Change users plugin directory
    4509537c378a iommu/iova: Avoid false sharing on fq_timer_on
    b20a5ef80779 libata/ahci: Drop PCS quirk for Denverton and beyond
    aecef5f0a4fd ASoC: Intel: Haswell: Adjust machine device private context
    a9c3dacf2939 iommu/amd: Silence warnings under memory pressure
    4d3f9cdc0f3e ALSA: firewire-motu: add support for MOTU 4pre
    311abc6a314c nvme-multipath: fix ana log nsid lookup when nsid is not found
    3c971d5dc374 nvmet: fix data units read and written counters in SMART log
    07e66eb2a8c0 x86/mm/pti: Handle unaligned address gracefully in pti_clone_pagetable()
    6198f3954f15 ASoC: fsl_ssi: Fix clock control issue in master mode
    c9e116d055f9 x86/mm/pti: Do not invoke PTI functions when PTI is disabled
    6e46d1f16473 perf evlist: Use unshare(CLONE_FS) in sb threads to let setns(CLONE_NEWNS) work
    b70a9f2ab2fa arm64: kpti: ensure patched kernel text is fetched from PoU
    9093a2e343f2 x86/apic/vector: Warn when vector space exhaustion breaks affinity
    12dae85048f1 sched/cpufreq: Align trace event behavior of fast switching
    92402bba4f32 ACPI / CPPC: do not require the _PSD method
    51f464d8bce7 ASoC: es8316: fix headphone mixer volume table
    57869649b230 leds: lm3532: Fixes for the driver for stability
    ee3251c9e71f media: ov9650: add a sanity check
    826a67380c4a media: aspeed-video: address a protential usage of an unitialized var
    c10ea8447736 perf script: Fix memory leaks in list_scripts()
    8d70572f69cc perf report: Fix --ns time sort key output
    fffe93c89d8b perf trace beauty ioctl: Fix off-by-one error in cmd->string table
    723809bb6d16 media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate()
    1c6a694568db media: cpia2_usb: fix memory leaks
    ecc548676360 media: saa7146: add cleanup in hexium_attach()
    730e14891202 media: cec-notifier: clear cec_adap in cec_notifier_unregister
    b74f2a4c0af2 PM / devfreq: exynos-bus: Correct clock enable sequence
    61496a6956d5 PM / devfreq: passive: Use non-devm notifiers
    6cf8764ed327 ARM: OMAP2+: move platform-specific asm-offset.h to arch/arm/mach-omap2
    7f6346e814ec PM / devfreq: Fix kernel oops on governor module load
    0ac4a7a4562b soc: renesas: Enable ARM_ERRATA_754322 for affected Cortex-A9
    841ee26cb0eb soc: renesas: rmobile-sysc: Set GENPD_FLAG_ALWAYS_ON for always-on domain
    c5a678041db9 ARM: at91: move platform-specific asm-offset.h to arch/arm/mach-at91
    45a550e54f0c EDAC/amd64: Decode syndrome before translating address
    71e85351f2d3 EDAC/amd64: Recognize DRAM device type ECC capability
    e4739ed9e9f4 libperf: Fix alignment trap with xyarray contents in 'perf stat'
    28e3cfd1c820 EDAC/amd64: Support more than two controllers for chip selects handling
    8c17f6f5d0d6 media: dvb-core: fix a memory leak bug
    de23b986dd21 posix-cpu-timers: Sanitize bogus WARNONS
    3df4944a75a3 media: dvb-frontends: use ida for pll number
    328d309f578d media: mceusb: fix (eliminate) TX IR signal length limit
    14944c1cdf66 s390/kasan: provide uninstrumented __strlen
    ad856c85132c arm64: entry: Move ct_user_exit before any other exception
    919bb091f3bb ACPI / APEI: Release resources if gen_pool_add() fails
    8e8821e51180 nbd: add missing config put
    cb00bdfdf4a1 ASoC: mchp-i2s-mcc: Fix unprepare of GCLK
    fd3a27888511 led: triggers: Fix a memory leak bug
    78a5d7570357 ASoC: mchp-i2s-mcc: Wait for RX/TX RDY only if controller is running
    cf37fc6525e6 ASoC: sun4i-i2s: Don't use the oversample to calculate BCLK
    cfc27d524fe8 tools headers: Fixup bitsperlong per arch includes
    0de9cb3ccaf4 powerpc/Makefile: Always pass --synthetic to nm if supported
    b72464b49572 ASoC: uniphier: Fix double reset assersion when transitioning to suspend state
    a6856ba2704a media: hdpvr: add terminating 0 at end of string
    ea9b3fba2de5 media: radio/si470x: kill urb on error
    abec08cc8afd x86/platform/intel/iosf_mbi Rewrite locking
    5ac00c9194ae ARM: dts: imx7-colibri: disable HS400
    d89e114b2f42 ARM: dts: imx7d: cl-som-imx7: make ethernet work again
    a510a16fee76 m68k: Prevent some compiler warnings in Coldfire builds
    751ac20a3913 net: lpc-enet: fix printk format strings
    c3e1334bc47a kasan/arm64: fix CONFIG_KASAN_SW_TAGS && KASAN_INLINE
    3c88b089e592 media: imx: mipi csi-2: Don't fail if initial state times-out
    cab41bda0849 media: omap3isp: Don't set streaming state on random subdevs
    ebe068d7bb79 media: i2c: ov5645: Fix power sequence
    3993c8429927 media: vsp1: fix memory leak of dl on error return path
    91faaa0e282f perf record: Support aarch64 random socket_id assignment
    b8179cfaf017 ARM: xscale: fix multi-cpu compilation
    cb2d2b999afe dmaengine: iop-adma: use correct printk format strings
    50ab41d72d35 media: rc: imon: Allow iMON RC protocol for ffdc 7e device
    b251e979c979 perf unwind: Fix libunwind when tid != pid
    2bc1f53cc46a arm64/efi: Move variable assignments after SECTIONS
    c0282736b94f media: em28xx: modules workqueue not inited for 2nd device
    de122406a437 media: fdp1: Reduce FCP not found message level to debug
    b18c1c75b90a media: i2c: tda1997x: prevent potential NULL pointer access
    f5d115ba1687 media: mtk-mdp: fix reference count on old device tree
    6156280768c3 perf test vfs_getname: Disable ~/.perfconfig to get default output
    a056ef7090e2 perf config: Honour $PERF_CONFIG env var to specify alternate .perfconfig
    b134b502d3b6 media: gspca: zero usb_buf on error
    5e1feedf563e blk-mq: Fix memory leak in blk_mq_init_allocated_queue error handling
    503ac6efb245 idle: Prevent late-arriving interrupts from disrupting offline
    b2ee96a78c9a sched/fair: Use rq_lock/unlock in online_fair_sched_group
    fc31f1c241b0 firmware: arm_scmi: Check if platform has released shmem before using
    a1a19299a6a5 efi: cper: print AER info of PCIe fatal error
    30ff832e9a23 EDAC, pnd2: Fix ioremap() size in dnv_rd_reg()
    cdfe5e064210 perf tools: Fix paths in include statements
    43894a0475c6 loop: Add LOOP_SET_DIRECT_IO to compat ioctl
    bb07be974180 ACPI / processor: don't print errors for processorIDs == 0xff
    fd8bd7dfb04f ASoC: hdac_hda: fix page fault issue by removing race
    338c95ab2187 RAS: Build debugfs.o only when enabled in Kconfig
    ff45dc5d103f media: media/platform: fsl-viu.c: fix build for MICROBLAZE
    c0053b3c6142 md: don't set In_sync if array is frozen
    274971880ff9 md: don't call spare_active in md_reap_sync_thread if all member devices can't work
    a1f4fcb88098 md/raid1: end bio when the device faulty
    998d765255aa arm64/prefetch: fix a -Wtype-limits warning
    912d58f959f1 ASoC: rsnd: don't call clk_get_rate() under atomic context
    5da3a9eb8159 EDAC/altera: Use the proper type for the IRQ status bits
    873aa4af4fdd ia64:unwind: fix double free for mod->arch.init_unw_table
    e89c79710aed ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid
    42c6b180a7bf base: soc: Export soc_device_register/unregister APIs
    383466793900 soc: amlogic: meson-clk-measure: protect measure with a mutex
    55b520f85a97 arm64: mm: free the initrd reserved memblock in a aligned manner
    bfae8c471054 cpuidle: teo: Allow tick to be stopped if PM QoS is used
    c02ec6220cf3 media: iguanair: add sanity checks
    db934a6df6d9 EDAC/mc: Fix grain_bits calculation
    7b1c5aa61d98 ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls()
    0294075e5872 ALSA: hda - Show the fatal CORB/RIRB error more clearly
    9107c9b7bcce x86/apic: Soft disable APIC before initializing it
    be86447601cb rcu/tree: Call setschedule() gp ktread to SCHED_FIFO outside of atomic region
    cc41123523d1 x86/reboot: Always use NMI fallback when shutdown via reboot vector IPI fails
    2965c2e1ec69 sched/deadline: Fix bandwidth accounting at all levels after offline migration
    6c4121115c87 x86/apic: Make apic_pending_intr_clear() more robust
    e75ff42011f1 sched/core: Fix CPU controller for !RT_GROUP_SCHED
    a02f3db8994e sched/fair: Fix imbalance due to CPU affinity
    2af6db20ceae time/tick-broadcast: Fix tick_broadcast_offline() lockdep complaint
    5db042229a8c media: i2c: ov5640: Check for devm_gpiod_get_optional() error
    7c36a65b2ea1 media: hdpvr: Add device num check and handling
    988a38ff1cf0 media: vivid: work around high stack usage with clang
    615883ae490f media: vb2: reorder checks in vb2_poll()
    4610656c129e media: vivid:add sanity check to avoid divide error and set value to 1 if 0.
    7fe87b686cb9 media: exynos4-is: fix leaked of_node references
    1a53850754a9 ASoC: SOF: pci: mark last_busy value at runtime PM init
    f76aa9d803b6 media: mtk-cir: lower de-glitch counter for rc-mm protocol
    5efaf000347a media: dib0700: fix link error for dibx000_i2c_set_speed
    8d68efb7e270 leds: leds-lp5562 allow firmware files up to the maximum length
    3dee582e6190 dmaengine: bcm2835: Print error in case setting DMA mask fails
    5d6d34ade679 firmware: qcom_scm: Use proper types for dma mappings
    8e81af05436c ASoC: sgtl5000: Fix charge pump source assignment
    57868b5cbc50 ASoC: sgtl5000: Fix of unmute outputs on probe
    27879a37f7ad ASoC: tlv320aic31xx: suppress error message for EPROBE_DEFER
    dae532b1a1cc spi: dw-mmio: Clock should be shut when error occurs
    e534295b4c17 regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg
    8c3a9421b2ef cpufreq: ap806: Add NULL check after kcalloc
    4defe8b0f2f5 ASoC: SOF: Intel: hda: Make hdac_device device-managed
    6646813ee81d ALSA: hda: Flush interrupts on disabling
    a269a7a7632b nfc: enforce CAP_NET_RAW for raw sockets
    f91ee5bc2100 ieee802154: enforce CAP_NET_RAW for raw sockets
    faf60340e231 ax25: enforce CAP_NET_RAW for raw sockets
    ef03ebc40bc8 appletalk: enforce CAP_NET_RAW for raw sockets
    1ca53dc648e8 mISDN: enforce CAP_NET_RAW for raw sockets
    df20d3ce66c5 net/mlx5: Add device ID of upcoming BlueField-2
    38be58c880d9 tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state
    4378493fed94 net: sched: fix possible crash in tcf_action_destroy()
    5f39dd75e078 net/mlx5e: Fix traffic duplication in ethtool steering
    6386577b2927 vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
    229b983d5221 net_sched: add policy validation for action attributes
    629815b9e1eb ipv4: Revert removal of rt_uses_gateway
    d5f1d310bb2b net/sched: cbs: Fix not adding cbs instance to list
    4bbf97f6c114 net: phy: micrel: add Asym Pause workaround for KSZ9021
    3ef1d54a72ca usbnet: sanity checking of packet sizes and device mtu
    b5e57553acde usbnet: ignore endpoints with invalid wMaxPacketSize
    35ad2e82044d tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth
    afc7190e3847 skge: fix checksum byte order
    0102608d70f0 selftests: Update fib_tests to handle missing ping6
    da0d6e47c20d sch_netem: fix a divide by zero in tabledist()
    9f64c6630929 ppp: Fix memory leak in ppp_write
    bd1df844b1f9 openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
    b86bd41b767a nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
    9561c1351232 nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs
    ba5f359f2be0 net_sched: add max len check for TCA_KIND
    19bd1045958b net/sched: act_sample: don't push mac header on ip6gre ingress
    ee8c5c7a6f9a net: qrtr: Stop rx_worker before freeing node
    6ee46a2b68fc net/phy: fix DP83865 10 Mbps HDX loopback disable function
    d879091836db macsec: drop skb sk before calling gro_cells_receive
    d37c96675204 ipv6: do not free rt if FIB_LOOKUP_NOREF is set on suppress rule
    98f1a3a21500 cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize
    890984f31888 arcnet: provide a buffer big enough to actually receive packets
    0a9d6a58b4ac Linux 5.2.18
    c704eb3aaffa f2fs: use generic EFSBADCRC/EFSCORRUPTED
    673d1167b40e net/rds: Check laddr_check before calling it
    fc5b59770306 net/rds: An rds_sock is added too early to the hash table
    719532b9b832 net_sched: check cops->tcf_block in tc_bind_tclass()
    bd740eacb1d2 Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices
    f63432cd1bb2 netfilter: nft_socket: fix erroneous socket assignment
    a2a3638f3e6f xfrm: policy: avoid warning splat when merging nodes
    b442b6d3742b xfs: don't crash on null attr fork xfs_bmapi_read
    baa3902119f5 drm/nouveau/disp/nv50-: fix center/aspect-corrected scaling
    452b129e4876 ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35
    62b72c1f7ba5 Bluetooth: btrtl: HCI reset on close for Realtek BT chip
    f6983a936fbf net: don't warn in inet diag when IPV6 is disabled
    955b7a09bf57 drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
    a7734a035acf drm: Flush output polling on shutdown
    453bcdd2432b f2fs: fix to do sanity check on segment bitmap of LFS curseg
    d331d4b99fb6 net/ibmvnic: Fix missing { in __ibmvnic_reset
    8defaa56897e dm zoned: fix invalid memory access
    bca9bfa41e3f Revert "f2fs: avoid out-of-range memory access"
    47af17950b03 objtool: Clobber user CFLAGS variable
    0f5df0b76e4f platform/x86: i2c-multi-instantiate: Derive the device name from parent
    811fc53c37be ALSA: hda - Apply AMD controller workaround for Raven platform
    b5215e9269c7 ALSA: hda - Add laptop imic fixup for ASUS M9V laptop
    d51c3b844afb ALSA: dice: fix wrong packet parameter for Alesis iO26
    bf4d30e9950e ALSA: usb-audio: Add DSD support for EVGA NU Audio
    284a30488891 ALSA: usb-audio: Add Hiby device family to quirks for native DSD support
    d17860e1e894 Revert "mm/z3fold.c: fix race between migration and destruction"
    2de3de21bc8a Revert "HID: logitech-hidpp: add USB PID for a few more supported mice"
    807370d02413 clk: imx: imx8mm: fix audio pll setting
    bdbf837b89a9 crypto: talitos - fix missing break in switch statement
    a1e67dae1599 mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()
    6c6d88dc737a HID: Add quirk for HP X500 PIXART OEM mouse
    af5676bf7d89 HID: hidraw: Fix invalid read in hidraw_ioctl
    8d88e0d1b3e6 HID: logitech-dj: Fix crash when initial logi_dj_recv_query_paired_devices fails
    55c2b2ac2706 HID: logitech: Fix general protection fault caused by Logitech driver
    a069e96b5280 HID: sony: Fix memory corruption issue on cleanup.
    5f2ba05924ca HID: prodikeys: Fix general protection fault during probe
    df3cc96b2049 Revert "net: hns: fix LED configuration for marvell phy"
    3349449ae730 drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines
    be3b5f44206e powerpc/xive: Fix bogus error code returned by OPAL
    606f7f9fc442 drm/amd/display: Don't replace the dc_state for fast updates
    0365d15f565a drm/amd/display: Skip determining update type for async updates
    891eae79f7a5 drm/amd/display: Allow cursor async updates for framebuffer swaps
    f6faeecb3659 net/ibmvnic: free reset work of removed device from queue
    cdc112b9cb64 phy: qcom-qmp: Correct ready status, again
    b08d7b36f11d phy: qcom-qmp: Raise qcom_qmp_phy_enable() polling delay
    3da810f95b86 smb3: fix unmount hang in open_shroot
    e6d6a001ed5a Revert "Bluetooth: validate BLE connection interval updates"

(From OE-Core rev: 6017a468d61afbdc6c3e3c406adb16d49ca08fd3)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
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>
2019-11-13 22:02:16 +00:00
Bruce Ashfield
00c723ea5b linux-yocto/4.19: update to v4.19.78
Updating linux-yocto/4.19 to the latest korg -stable release that comprises
the following commits:

    58fce2064530 Linux 4.19.78
    5b0446c8e0a8 9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie
    d85bc11a6894 kexec: bail out upon SIGKILL when allocating memory.
    c8a65ec0602a NFC: fix attrs checks in netlink interface
    1b42503211ca smack: use GFP_NOFS while holding inode_smack::smk_lock
    ef9744a0218f Smack: Don't ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set
    4703593498d3 soundwire: fix regmap dependencies and align with other serial links
    322753c78d1d soundwire: Kconfig: fix help format
    74e2a311a226 sch_cbq: validate TCA_CBQ_WRROPT to avoid crash
    ed9420ddce87 tipc: fix unlimited bundling of small messages
    a1afd826e549 xen-netfront: do not use ~0U as error return value for xennet_fill_frags()
    36a4043c4bb8 net/rds: Fix error handling in rds_ib_add_one()
    012363f5ded0 udp: only do GSO if # of segs > 1
    5c08d7e4f1ea net: dsa: rtl8366: Check VLAN ID and not ports
    3c1f0704401c vsock: Fix a lockdep warning in __vsock_release()
    544aee546174 udp: fix gso_segs calculations
    79fd59ae7c2f sch_dsmark: fix potential NULL deref in dsmark_init()
    76b552775d60 rxrpc: Fix rxrpc_recvmsg tracepoint
    7047aae65456 qmi_wwan: add support for Cinterion CLS8 devices
    dd9c580a6d9b nfc: fix memory leak in llcp_sock_bind()
    d5b1db1c7ce4 net: Unpublish sk from sk_reuseport_cb before call_rcu
    9d0995cc268b net: qlogic: Fix memory leak in ql_alloc_large_buffers
    124b64feafa9 net: ipv4: avoid mixed n_redirects and rate_tokens usage
    6f8564edf8c1 ipv6: Handle missing host route in __ipv6_ifa_notify
    658d7ee4da50 ipv6: drop incoming packets having a v4mapped source address
    a495fd19cce2 hso: fix NULL-deref on tty open
    7f30c44b7ca4 erspan: remove the incorrect mtu limit for erspan
    2b8389112292 cxgb4:Fix out-of-bounds MSI-X info array access
    ed568ca73601 bpf: fix use after free in prog symbol exposure
    dbb7339cfddf block: mq-deadline: Fix queue restart handling
    af10ffa69b06 arm: use STACK_TOP when computing mmap base address
    f91a9c6591c0 arm: properly account for stack randomization and stack guard gap
    53ba8d4358eb mips: properly account for stack randomization and stack guard gap
    e1b391abbfce arm64: consider stack randomization for mmap base only when necessary
    30ab799e758e kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K
    52132ff52cad ocfs2: wait for recovering done after direct unlock request
    d4a546452dcc kbuild: clean compressed initramfs image
    d983182d4002 crypto: hisilicon - Fix double free in sec_free_hw_sgl()
    22c788ba7a52 hypfs: Fix error number left in struct pointer member
    bbd76d9514c7 pktcdvd: remove warning on attempting to register non-passthrough dev
    0840daeea6cb fat: work around race with userspace's read via blockdev while mounting
    297904ea60a3 ARM: 8903/1: ensure that usable memory in bank 0 starts from a PMD-aligned address
    9a87ab2b4d60 security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb()
    69a32a7306dd PCI: exynos: Propagate errors for optional PHYs
    1264d2e7b75b PCI: imx6: Propagate errors for optional regulators
    403d6c9284f1 PCI: histb: Propagate errors for optional regulators
    ac9c0e2ecc49 PCI: rockchip: Propagate errors for optional regulators
    709c4841e51f HID: apple: Fix stuck function keys when using FN
    31e98cba55ed rtc: pcf85363/pcf85263: fix regmap error in set_time
    607f95788fa9 rtc: snvs: fix possible race condition
    078937549f47 ARM: 8875/1: Kconfig: default to AEABI w/ Clang
    3039c788d648 soundwire: intel: fix channel number reported by hardware
    6a684e002561 ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes
    0f0ced702d53 livepatch: Nullify obj->mod in klp_module_coming()'s error path
    78a1138672af HID: wacom: Fix several minor compiler warnings
    3b7fbbddeb7a PCI: tegra: Fix OF node reference leak
    c74a801ded7d mfd: intel-lpss: Remove D3cold delay
    70bb4bf9fdfb i2c-cht-wc: Fix lockdep warning
    371077ea2e75 MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean
    3ed14a8d2fe7 MIPS: Ingenic: Disable broken BTB lookup optimization.
    5b400fed74df ext4: fix potential use after free after remounting with noblock_validity
    81fbd2327c32 dma-buf/sw_sync: Synchronize signal vs syncpt free
    c76e18970d93 scsi: core: Reduce memory required for SCSI logging
    c6304d4d7458 clk: sprd: add missing kfree
    7cd89b8db60c mbox: qcom: add APCS child device for QCS404
    324b0c9efc77 powerpc: dump kernel log before carrying out fadump or kdump
    72884423e77f clk: at91: select parent if main oscillator or bypass is enabled
    952d1c6d7cf0 arm64: fix unreachable code issue with cmpxchg
    b25bd837a637 pinctrl: meson-gxbb: Fix wrong pinning definition for uart_c
    b717a47dd913 powerpc/pseries: correctly track irq state in default idle
    ae089bf87c57 clk: qcom: gcc-sdm845: Use floor ops for sdcc clks
    2c16f72135fb pstore: fs superblock limits
    0c09b02842b8 powerpc/64s/exception: machine check use correct cfar for late handler
    39b6d05169b2 drm/amdgpu/si: fix ASIC tests
    4dcbca872a84 drm/amd/display: support spdif
    38dfc974f322 clk: renesas: cpg-mssr: Set GENPD_FLAG_ALWAYS_ON for clock domain
    0b5ac607db4b clk: renesas: mstp: Set GENPD_FLAG_ALWAYS_ON for clock domain
    2cfb89832179 pinctrl: amd: disable spurious-firing GPIO IRQs
    274d7acb0b81 drm/nouveau/volt: Fix for some cards having 0 maximum voltage
    9b2d2f2ad003 vfio_pci: Restore original state on release
    c1f7b3fb87cf powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag
    b2df456c83e3 pinctrl: tegra: Fix write barrier placement in pmx_writel
    4c91e678d27c powerpc/pseries/mobility: use cond_resched when updating device tree
    6d728a172732 powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function
    6aa455b0d0a0 powerpc/rtas: use device model APIs and serialization during LPM
    25c501f0f9d9 powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL
    2cca24b2cb9a clk: zx296718: Don't reference clk_init_data after registration
    efa0fe4cde05 clk: sprd: Don't reference clk_init_data after registration
    89dc59fb267d clk: sirf: Don't reference clk_init_data after registration
    bd3a445c2717 clk: actions: Don't reference clk_init_data after registration
    437399ed906a powerpc/powernv/ioda2: Allocate TCE table levels on demand for default DMA window
    782a77f2eb39 drm/amd/display: reprogram VM config when system resume
    24ba84ec0016 drm/amd/display: fix issue where 252-255 values are clipped
    efb0e1e3d0e1 clk: sunxi-ng: v3s: add missing clock slices for MMC2 module clocks
    a2279550f7be clk: qoriq: Fix -Wunused-const-variable
    84038a98b904 ipmi_si: Only schedule continuously in the thread in maintenance mode
    b351726bb5be PCI: rpaphp: Avoid a sometimes-uninitialized warning
    0936c46139cb gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()
    6e03bca91f8e drm/radeon: Fix EEH during kexec
    441c15582338 drm/rockchip: Check for fast link training before enabling psr
    f3d62177dee3 drm/panel: check failure cases in the probe func
    9cb3698dcc86 drm/stm: attach gem fence to atomic state
    043f0229f442 video: ssd1307fb: Start page range at page_offset
    bd5b6a7c89ef drm/panel: simple: fix AUO g185han01 horizontal blanking
    db472be8b340 drm/bridge: tc358767: Increase AUX transfer length limit
    053d0ec61e33 tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations
    d598712712e4 tpm: use tpm_try_get_ops() in tpm-sysfs.c.
    6cad9d0cf87b Linux 4.19.77
    2c60da90ec44 drm/amd/display: Restore backlight brightness after system resume
    4d8bdf7f3a86 mm/compaction.c: clear total_{migrate,free}_scanned before scanning a new zone
    5bead06b3443 fuse: fix deadlock with aio poll and fuse_iqueue::waitq.lock
    bbe3e2056d27 md/raid0: avoid RAID0 data corruption due to layout confusion.
    4290a9e59323 CIFS: Fix oplock handling for SMB 2.1+ protocols
    a3a150895b6f CIFS: fix max ea value size
    a0f7fd38acf5 i2c: riic: Clear NACK in tend isr
    fec38267a2bf hwrng: core - don't wait on add_early_randomness()
    060986096fea quota: fix wrong condition in is_quota_modification()
    091c754d5ca9 ext4: fix punch hole for inline_data file systems
    775e3e734bd3 ext4: fix warning inside ext4_convert_unwritten_extents_endio
    caa6926d94f1 /dev/mem: Bail out upon SIGKILL.
    bd3a11af1bde cfg80211: Purge frame registrations on iftype change
    5dc86e9574a1 md: only call set_in_sync() when it is expected to succeed.
    598a2cda62d3 md: don't report active array_state until after revalidate_disk() completes.
    e8323e0ddce1 md/raid6: Set R5_ReadError when there is read failure on parity disk
    bacff03bb286 Btrfs: fix race setting up and completing qgroup rescan workers
    b5c42ef09df3 btrfs: qgroup: Fix reserved data space leak if we have multiple reserve calls
    c521bfa8e2dc btrfs: qgroup: Fix the wrong target io_tree when freeing reserved data space
    067f82a05c2f btrfs: Relinquish CPUs in btrfs_compare_trees
    b08344be3546 Btrfs: fix use-after-free when using the tree modification log
    4874c6fe1c9e btrfs: fix allocation of free space cache v1 bitmap pages
    934243a72849 ovl: filter of trusted xattr results in audit
    e7265adc0a3c ovl: Fix dereferencing possible ERR_PTR()
    2e96c9332595 smb3: allow disabling requesting leases
    82652c06f976 block: fix null pointer dereference in blk_mq_rq_timed_out()
    db5b2fe4d33c i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask
    b4a734a529b8 memcg, kmem: do not fail __GFP_NOFAIL charges
    d40b3eafb52e memcg, oom: don't require __GFP_FS when invoking memcg OOM killer
    e0c1e6e55bca gfs2: clear buf_in_tr when ending a transaction in sweep_bh_for_rgrps
    3620b06b1db0 efifb: BGRT: Improve efifb_bgrt_sanity_check
    c4f65c2fb0f5 regulator: Defer init completion for a while after late_initcall
    3784576fc639 alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP
    174bbcc560cc arm64: dts: rockchip: limit clock rate of MMC controllers for RK3328
    8cfe3b8aa3b6 arm64: tlb: Ensure we execute an ISB following walk cache invalidation
    fc7d6bfdd774 Revert "arm64: Remove unnecessary ISBs from set_{pte,pmd,pud}"
    881edc165b8e ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up
    2209279439a1 ARM: samsung: Fix system restart on S3C6410
    ad884155fb9c ASoC: Intel: Fix use of potentially uninitialized variable
    7bdab36455f9 ASoC: Intel: Skylake: Use correct function to access iomem space
    3c54f463402f ASoC: Intel: NHLT: Fix debug print format
    29ecf8cae5f4 binfmt_elf: Do not move brk for INTERP-less ET_EXEC
    02ef5c299d15 media: don't drop front-end reference count for ->detach
    589ca8ec4c62 media: sn9c20x: Add MSI MS-1039 laptop to flip_dmi_table
    496cf984a60e KVM: x86: Manually calculate reserved bits when loading PDPTRS
    933e3e2b5070 KVM: x86: set ctxt->have_exception in x86_decode_insn()
    9723e4458604 KVM: x86: always stop emulation on page fault
    8225db4a70b2 parisc: Disable HP HSC-PCI Cards to prevent kernel crash
    ad41162974c6 fuse: fix missing unlock_page in fuse_writepage()
    ecfe4b5f70c8 powerpc/imc: Dont create debugfs files for cpu-less nodes
    e94443fc7b64 scsi: implement .cleanup_rq callback
    4ec3ca2770e7 blk-mq: add callback of .cleanup_rq
    4848fb93243e ALSA: hda/realtek - PCI quirk for Medion E4254
    e9bcaf82dd37 ceph: use ceph_evict_inode to cleanup inode's resource
    72f0fff3c450 Revert "ceph: use ceph_evict_inode to cleanup inode's resource"
    98dc6d958bd9 randstruct: Check member structs in is_pure_ops_struct()
    ad6819cd68be IB/hfi1: Define variables as unsigned long to fix KASAN warning
    a924850c93d4 IB/mlx5: Free mpi in mp_slave mode
    40b071992ca5 printk: Do not lose last line in kmsg buffer dump
    28f142b940af scsi: qla2xxx: Fix Relogin to prevent modifying scan_state flag
    03b75e65ceed scsi: scsi_dh_rdac: zero cdb in send_mode_select()
    2e21e5b225ef ALSA: firewire-tascam: check intermediate state of clock status and retry
    f5779e4449da ALSA: firewire-tascam: handle error code when getting current source of clock
    fdd131eab68f iwlwifi: fw: don't send GEO_TX_POWER_LIMIT command to FW version 36
    6437ec272eda PM / devfreq: passive: fix compiler warning
    814f7fe56ebb media: omap3isp: Set device on omap3isp subdevs
    c5dbd74f8259 btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type
    2aeeb0a4b440 iommu/amd: Override wrong IVRS IOAPIC on Raven Ridge systems
    291da335040c ALSA: hda/realtek - Blacklist PC beep for Lenovo ThinkCentre M73/93
    8630a4d13683 media: ttusb-dec: Fix info-leak in ttusb_dec_send_command()
    d47636913bda drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2)
    5370cf8d90ad ALSA: hda - Drop unsol event handler for Intel HDMI codecs
    ac1d43a20a08 e1000e: add workaround for possible stalled packet
    35b6cba971f5 libertas: Add missing sentinel at end of if_usb.c fw_table
    0a43d5d458d5 raid5: don't increment read_errors on EILSEQ return
    da87dfca25aa mmc: dw_mmc: Re-store SDIO IRQs mask at system resume
    a0dd3d95fb21 mmc: core: Add helper function to indicate if SDIO IRQs is enabled
    8ba99d50cb61 mmc: sdhci: Fix incorrect switch to HS mode
    869122775782 mmc: core: Clarify sdio_irq_pending flag for MMC_CAP2_SDIO_IRQ_NOTHREAD
    a5443cd24063 raid5: don't set STRIPE_HANDLE to stripe which is in batch list
    064fba888e77 ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set
    476eda2539bb platform/x86: intel_pmc_core: Do not ioremap RAM
    e836cd2917c6 x86/cpu: Add Tiger Lake to Intel family
    b21919eeced6 s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding
    fad90d4bfa8d kprobes: Prohibit probing on BUG() and WARN() address
    213077da3e7c dmaengine: ti: edma: Do not reset reserved paRAM slots
    f1db75622996 md/raid1: fail run raid1 array when active disk less than one
    76cf93f04c3d hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap'
    f0956418d997 closures: fix a race on wakeup from closure_sync
    9fcfdff61f74 ACPI / PCI: fix acpi_pci_irq_enable() memory leak
    e4467fb6ef54 ACPI: custom_method: fix memory leaks
    6fceb241dc76 ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks
    e4b4280dcd97 libtraceevent: Change users plugin directory
    c55659cd1459 iommu/iova: Avoid false sharing on fq_timer_on
    223b0481ed4b libata/ahci: Drop PCS quirk for Denverton and beyond
    de888e0244cb iommu/amd: Silence warnings under memory pressure
    6241c0ac301e ALSA: firewire-motu: add support for MOTU 4pre
    ad58ce6cacd1 nvme-multipath: fix ana log nsid lookup when nsid is not found
    9edc229b9c90 nvmet: fix data units read and written counters in SMART log
    7bbb7a9dd2c3 x86/mm/pti: Handle unaligned address gracefully in pti_clone_pagetable()
    5201b4ffc324 ASoC: fsl_ssi: Fix clock control issue in master mode
    4b7d9c2a716e x86/mm/pti: Do not invoke PTI functions when PTI is disabled
    eb2485e32f90 arm64: kpti: ensure patched kernel text is fetched from PoU
    b619496540ba x86/apic/vector: Warn when vector space exhaustion breaks affinity
    01e8f487cecb sched/cpufreq: Align trace event behavior of fast switching
    2919fa0398ad ACPI / CPPC: do not require the _PSD method
    b79922133f9c ASoC: es8316: fix headphone mixer volume table
    dd25f76c1f34 media: ov9650: add a sanity check
    342a0bee4d94 perf trace beauty ioctl: Fix off-by-one error in cmd->string table
    57409ea782e7 media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate()
    78550c5cfe6d media: cpia2_usb: fix memory leaks
    d796c6c1aab4 media: saa7146: add cleanup in hexium_attach()
    ab20f38ce522 media: cec-notifier: clear cec_adap in cec_notifier_unregister
    d51268d7574b PM / devfreq: exynos-bus: Correct clock enable sequence
    7e19b7e0d640 PM / devfreq: passive: Use non-devm notifiers
    f9de170eaf7e EDAC/amd64: Decode syndrome before translating address
    6f80e91a66e0 EDAC/amd64: Recognize DRAM device type ECC capability
    adb97f18b4e7 libperf: Fix alignment trap with xyarray contents in 'perf stat'
    4df2427a5148 media: dvb-core: fix a memory leak bug
    8d5fccff7b0c posix-cpu-timers: Sanitize bogus WARNONS
    9df9652b7345 media: dvb-frontends: use ida for pll number
    006a6065c867 media: mceusb: fix (eliminate) TX IR signal length limit
    d093d3183ca2 nbd: add missing config put
    e497ec26cc43 led: triggers: Fix a memory leak bug
    83c2a42b1b84 ASoC: sun4i-i2s: Don't use the oversample to calculate BCLK
    5466c30b11cb tools headers: Fixup bitsperlong per arch includes
    b1f1b83e2583 ASoC: uniphier: Fix double reset assersion when transitioning to suspend state
    e6bc6e2c0d1f media: hdpvr: add terminating 0 at end of string
    4a2cb7600b72 media: radio/si470x: kill urb on error
    dfaf60580191 ARM: dts: imx7-colibri: disable HS400
    c20ee5d906ec ARM: dts: imx7d: cl-som-imx7: make ethernet work again
    21927786df27 m68k: Prevent some compiler warnings in Coldfire builds
    ba8f56ffaebf net: lpc-enet: fix printk format strings
    aa2d05a9de05 media: imx: mipi csi-2: Don't fail if initial state times-out
    1b7df445d881 media: omap3isp: Don't set streaming state on random subdevs
    0c3802174754 media: i2c: ov5645: Fix power sequence
    3dfbac0add22 media: vsp1: fix memory leak of dl on error return path
    c47022e019fe perf record: Support aarch64 random socket_id assignment
    482c1d0a7cc4 dmaengine: iop-adma: use correct printk format strings
    19a1fa140594 media: rc: imon: Allow iMON RC protocol for ffdc 7e device
    a527d3d4b513 media: em28xx: modules workqueue not inited for 2nd device
    6a1c59a7603d media: fdp1: Reduce FCP not found message level to debug
    e3f5f626e17a media: mtk-mdp: fix reference count on old device tree
    066afce8d87d perf test vfs_getname: Disable ~/.perfconfig to get default output
    96b61fe7a5f7 perf config: Honour $PERF_CONFIG env var to specify alternate .perfconfig
    db751f6d5241 media: gspca: zero usb_buf on error
    511110236089 idle: Prevent late-arriving interrupts from disrupting offline
    9addfbd40959 sched/fair: Use rq_lock/unlock in online_fair_sched_group
    6e9d45022d26 firmware: arm_scmi: Check if platform has released shmem before using
    0dbdc1986bb4 efi: cper: print AER info of PCIe fatal error
    4410b8517950 EDAC, pnd2: Fix ioremap() size in dnv_rd_reg()
    cf8f20a1aacf loop: Add LOOP_SET_DIRECT_IO to compat ioctl
    18e5e458c6d8 ACPI / processor: don't print errors for processorIDs == 0xff
    465bc6e80fd2 media: media/platform: fsl-viu.c: fix build for MICROBLAZE
    371538451c21 md: don't set In_sync if array is frozen
    d38aff20c407 md: don't call spare_active in md_reap_sync_thread if all member devices can't work
    1cd972e0a107 md/raid1: end bio when the device faulty
    7d75275fbfb1 arm64/prefetch: fix a -Wtype-limits warning
    829bebdc1ce6 ASoC: rsnd: don't call clk_get_rate() under atomic context
    f5bef62df824 EDAC/altera: Use the proper type for the IRQ status bits
    87bc43e2a775 ia64:unwind: fix double free for mod->arch.init_unw_table
    ca57eca32b3e ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid
    d76b5ac5016c base: soc: Export soc_device_register/unregister APIs
    4a75e77ef1b5 media: iguanair: add sanity checks
    fe8fc7d7cb64 EDAC/mc: Fix grain_bits calculation
    55a98e872186 ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls()
    1af6822f29d6 ALSA: hda - Show the fatal CORB/RIRB error more clearly
    b40c15c20e42 x86/apic: Soft disable APIC before initializing it
    ce7fdd5cd83e x86/reboot: Always use NMI fallback when shutdown via reboot vector IPI fails
    0f30856944d4 sched/deadline: Fix bandwidth accounting at all levels after offline migration
    d29c7b8be599 x86/apic: Make apic_pending_intr_clear() more robust
    f381d3d2c39c sched/core: Fix CPU controller for !RT_GROUP_SCHED
    417cf53b4b85 sched/fair: Fix imbalance due to CPU affinity
    7cebdfa62f22 time/tick-broadcast: Fix tick_broadcast_offline() lockdep complaint
    64f3fb5d751c media: i2c: ov5640: Check for devm_gpiod_get_optional() error
    6cc816dd644e media: hdpvr: Add device num check and handling
    8bc254d3e6b8 media: exynos4-is: fix leaked of_node references
    7ec720763a20 media: mtk-cir: lower de-glitch counter for rc-mm protocol
    920acbff8932 media: dib0700: fix link error for dibx000_i2c_set_speed
    8f9dc49928c2 leds: leds-lp5562 allow firmware files up to the maximum length
    fdcf06a35bc6 dmaengine: bcm2835: Print error in case setting DMA mask fails
    e841313b5731 firmware: qcom_scm: Use proper types for dma mappings
    ec4815460d81 ASoC: sgtl5000: Fix charge pump source assignment
    84bb4024b358 ASoC: sgtl5000: Fix of unmute outputs on probe
    a7ace049bddc ASoC: tlv320aic31xx: suppress error message for EPROBE_DEFER
    3657e58405fb regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg
    3eec108aa879 ALSA: hda: Flush interrupts on disabling
    5b6c791f494d nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
    33fe1f517e29 nfc: enforce CAP_NET_RAW for raw sockets
    dd651ab7a114 ieee802154: enforce CAP_NET_RAW for raw sockets
    6f0f18e53269 ax25: enforce CAP_NET_RAW for raw sockets
    6fbf86627608 appletalk: enforce CAP_NET_RAW for raw sockets
    50dddec689cb mISDN: enforce CAP_NET_RAW for raw sockets
    f06b0b3e5d76 net/mlx5: Add device ID of upcoming BlueField-2
    3fdcf6a88ded tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state
    a749eea97ac9 net: sched: fix possible crash in tcf_action_destroy()
    831d0fcba1cf usbnet: sanity checking of packet sizes and device mtu
    b7eeccc1c786 usbnet: ignore endpoints with invalid wMaxPacketSize
    ff4419d725c7 skge: fix checksum byte order
    9a623e1b1d03 sch_netem: fix a divide by zero in tabledist()
    1cd663adcece ppp: Fix memory leak in ppp_write
    99952b08537c openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
    587df35cbf65 nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs
    195a3ea494d2 net_sched: add max len check for TCA_KIND
    c31096dc586e net/sched: act_sample: don't push mac header on ip6gre ingress
    abb04d0a9dea net: qrtr: Stop rx_worker before freeing node
    6ea3bc412506 net/phy: fix DP83865 10 Mbps HDX loopback disable function
    831d082be72c macsec: drop skb sk before calling gro_cells_receive
    fd0034688358 cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize
    0bf79588586c arcnet: provide a buffer big enough to actually receive packets
    555161ee1b7a Linux 4.19.76
    59a5cea41dd0 f2fs: use generic EFSBADCRC/EFSCORRUPTED
    fc3d296491f4 net/rds: Check laddr_check before calling it
    3de749d6d7ce net/rds: An rds_sock is added too early to the hash table
    07f7ec87b5f6 net_sched: check cops->tcf_block in tc_bind_tclass()
    90b0761c1b81 Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices
    6934809432d2 netfilter: nft_socket: fix erroneous socket assignment
    649836fe946c xfs: don't crash on null attr fork xfs_bmapi_read
    91ae87240166 drm/nouveau/disp/nv50-: fix center/aspect-corrected scaling
    3717f4a49b34 ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35
    46beb6eacef5 Bluetooth: btrtl: HCI reset on close for Realtek BT chip
    8ffd7ba9ffb1 net: don't warn in inet diag when IPV6 is disabled
    ff0fbfacc94f drm: Flush output polling on shutdown
    303f6d6bbc0c f2fs: fix to do sanity check on segment bitmap of LFS curseg
    dec09554eba9 net/ibmvnic: Fix missing { in __ibmvnic_reset
    dc9118feb472 dm zoned: fix invalid memory access
    73d90f57fcc2 Revert "f2fs: avoid out-of-range memory access"
    40cdc71e1111 blk-mq: move cancel of requeue_work to the front of blk_exit_queue
    313efb253d03 blk-mq: change gfp flags to GFP_NOIO in blk_mq_realloc_hw_ctxs
    75448f40b9f6 initramfs: don't free a non-existent initrd
    ad16dfef4a44 bcache: remove redundant LIST_HEAD(journal) from run_cache_set()
    08fdaee2d97b PCI: hv: Avoid use of hv_pci_dev->pci_slot after freeing it
    ef2baa03b7f0 f2fs: check all the data segments against all node ones
    ef06c33dc371 irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices
    52b4947bac50 bpf: libbpf: retry loading program on EAGAIN
    a935d78e54cc Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD"
    288831cba980 scsi: qla2xxx: Return switch command on a timeout
    2b983f212c68 scsi: qla2xxx: Remove all rports if fabric scan retry fails
    6b449e4cf090 scsi: qla2xxx: Turn off IOCB timeout timer on IOCB completion
    9423770eb336 locking/lockdep: Add debug_locks check in __lock_downgrade()
    0c23335a2d81 power: supply: sysfs: ratelimit property read error message
    1456c40aa906 pinctrl: sprd: Use define directive for sprd_pinconf_params values
    037d73a6458e objtool: Clobber user CFLAGS variable
    952844f31eb7 ALSA: hda - Apply AMD controller workaround for Raven platform
    50c9ccffe041 ALSA: hda - Add laptop imic fixup for ASUS M9V laptop
    866a1a7e9f23 ALSA: dice: fix wrong packet parameter for Alesis iO26
    9829fd27501e ALSA: usb-audio: Add DSD support for EVGA NU Audio
    303921276360 ALSA: usb-audio: Add Hiby device family to quirks for native DSD support
    8a845c02e495 ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt()
    a5e2c65034f8 ASoC: Intel: cht_bsw_max98090_ti: Enable codec clock once and keep it enabled
    ec2a3681b30c media: tvp5150: fix switch exit in set control handler
    ba6860700d1f iwlwifi: mvm: always init rs_fw with 20MHz bandwidth rates
    ced0676fc9c2 iwlwifi: mvm: send BCAST management frames to the right station
    b3873e34cbf2 net/mlx5e: Rx, Check ip headers sanity
    404f118f2790 net/mlx5e: Rx, Fixup skb checksum for packets with tail padding
    c95ebb394d65 net/mlx5e: XDP, Avoid checksum complete when XDP prog is loaded
    79e972a89cad net/mlx5e: Allow reporting of checksum unnecessary
    8da68f79b3b3 mlx5: fix get_ip_proto()
    44da02576b5d net/mlx5e: don't set CHECKSUM_COMPLETE on SCTP packets
    6debda97411e net/mlx5e: Set ECN for received packets using CQE indication
    e867ef113004 CIFS: fix deadlock in cached root handling
    f3160a1d71f7 crypto: talitos - fix missing break in switch statement
    c1a7fe486647 mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()
    5fdefdcb92bb HID: Add quirk for HP X500 PIXART OEM mouse
    3d072c272b88 HID: hidraw: Fix invalid read in hidraw_ioctl
    acc96be807bb HID: logitech: Fix general protection fault caused by Logitech driver
    3e785174fb35 HID: sony: Fix memory corruption issue on cleanup.
    eb77929769e3 HID: prodikeys: Fix general protection fault during probe
    2661d462aaa9 IB/core: Add an unbound WQ type to the new CQ API
    70ec2eecc550 drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines
    80fc27953e74 powerpc/xive: Fix bogus error code returned by OPAL
    4eb92a114834 RDMA/restrack: Protect from reentry to resource return path
    373f9092df95 net/ibmvnic: free reset work of removed device from queue
    2af977b0d1db Revert "Bluetooth: validate BLE connection interval updates"
    d573e8a79f70 Linux 4.19.75
    b841a9f58d9c media: technisat-usb2: break out of loop at end of buffer
    f35f5a990a07 arm64: kpti: Whitelist Cortex-A CPUs that don't implement the CSV3 field
    c0ccb4da26bc binfmt_elf: move brk out of mmap when doing direct loader exec
    c3817ffb1036 floppy: fix usercopy direction
    9c13e770cca9 ovl: fix regression caused by overlapping layers detection
    5e74396d8beb PCI: kirin: Fix section mismatch warning
    0d50f7b1e8c8 iommu/amd: Fix race in increase_address_space()
    52f32e4aec50 iommu/amd: Flush old domains in kdump kernel
    ca77acdf1ac9 keys: Fix missing null pointer check in request_key_auth_describe()
    d73515a17c14 x86/hyper-v: Fix overflow bug in fill_gva_list()
    371357770c8b x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation
    72c762b01eb0 dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
    d04b522a65c0 dmaengine: ti: dma-crossbar: Fix a memory leak bug
    6bc421d5a04a net: seeq: Fix the function used to release some memory in an error handling path
    83360eb798ca net: aquantia: fix out of memory condition on rx side
    30c345bd786a tools/power turbostat: fix buffer overrun
    d485c65853de tools/power x86_energy_perf_policy: Fix argument parsing
    254b9b2971a7 tools/power x86_energy_perf_policy: Fix "uninitialized variable" warnings at -O2
    a85a0d9f3796 amd-xgbe: Fix error path in xgbe_mod_init()
    7ec11cad3fde perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops
    560857de3064 perf/x86/intel: Restrict period on Nehalem
    65ad72ce10e7 i2c: designware: Synchronize IRQs when unregistering slave client
    5a45b14b03f7 sky2: Disable MSI on yet another ASUS boards (P6Xxxx)
    6cce2adae3e1 ibmvnic: Do not process reset during or after device removal
    080ca754f5db ARM: 8901/1: add a criteria for pfn_valid of arm
    c6d779fd8197 usb: host: xhci-tegra: Set DMA mask correctly
    b62946852afa cifs: Use kzfree() to zero out the password
    325fa2a6729b cifs: set domainName when a domain-key is used in multiuser
    9a74f799b99c kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol
    0f7130177325 NFSv2: Fix write regression
    60f0d449601d NFSv2: Fix eof handling
    6075729f76da netfilter: nf_conntrack_ftp: Fix debug output
    7ac5947f7578 netfilter: xt_physdev: Fix spurious error message in physdev_mt_check
    e997c0730520 x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines
    688fdaa54a3e r8152: Set memory to all 0xFFs on failed reg reads
    d9f79f0ace55 bpf: allow narrow loads of some sk_reuseport_md fields with offset > 0
    7d4201ff9f73 batman-adv: Only read OGM2 tvlv_len after buffer len check
    5b8b66274183 ARM: 8874/1: mm: only adjust sections of valid mm structures
    b870f8afc5a5 qed: Add cleanup in qed_slowpath_start()
    30881d79de31 xdp: unpin xdp umem pages in error path
    55ed0ad50201 Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105
    767877deb25a NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
    4ac4f4716fba NFSv4: Fix return value in nfs_finish_open()
    d7565d51af18 NFSv4: Fix return values for nfs4_file_open()
    4e5fbcb9a615 netfilter: xt_nfacct: Fix alignment mismatch in xt_nfacct_match_info
    a02c676c0f03 netfilter: nft_flow_offload: missing netlink attribute policy
    a4fa6c68ecc3 netfilter: ebtables: Fix argument order to ADD_COUNTER
    634dd5a48627 fpga: altera-ps-spi: Fix getting of optional confd gpio
    0d393f23f18e tools: bpftool: close prog FD before exit on showing a single program
    c5bb033529f1 selftests/bpf: fix "bind{4, 6} deny specific IP & port" on s390
    48d77ca1497f s390/bpf: use 32-bit index for tail calls
    999f33c2438c bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()
    1a85d5819ade ARM: OMAP1: ams-delta-fiq: Fix missing irq_ack
    a8919f8d352f ARM: dts: dra74x: Fix iodelay configuration for mmc3
    2ff2bd2c5526 ARM: OMAP2+: Fix omap4 errata warning on other SoCs
    73d003274a42 s390/bpf: fix lcgr instruction encoding
    c1e0937ef4d5 bus: ti-sysc: Fix using configured sysc mask value
    0aee9e118eee ARM: OMAP2+: Fix missing SYSC_HAS_RESET_STATUS for dra7 epwmss
    f696ba6b122d ARM: dts: am57xx: Disable voltage switching for SD card
    ac8f26f6a035 ieee802154: hwsim: unregister hw while hwsim_subscribe_all_others fails
    c237a050df3b ieee802154: hwsim: Fix error handle path in hwsim_init_module
    6a10e87ffca1 nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds
    941431c491a6 mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
    770cee245191 tty/serial: atmel: reschedule TX after RX was started
    4c2f60ed8ed8 serial: sprd: correct the wrong sequence of arguments
    2871621518ac firmware: google: check if size is valid when decoding VPD data
    232a6462f43f KVM: coalesced_mmio: add bounds checking
    7a1bad565ceb net_sched: let qdisc_put() accept NULL pointer
    47288968eebd xen-netfront: do not assume sk_buff_head list is empty in error handling
    fdd60d80c429 udp: correct reuseport selection with connected sockets
    97b5f8c95b75 ip6_gre: fix a dst leak in ip6erspan_tunnel_xmit
    4fb95f299504 phy: renesas: rcar-gen3-usb2: Disable clearing VBUS in over-current
    abf389e0795a media: tm6000: double free if usb disconnect while streaming
    77d4e2a05885 USB: usbcore: Fix slab-out-of-bounds bug during device reset
    b01b1eb24c04 powerpc/mm/radix: Use the right page size for vmemmap mapping
    289f3c82b116 Input: elan_i2c - remove Lenovo Legion Y7000 PnpID
    305c3b497662 RDMA/restrack: Release task struct which was hold by CM_ID object
    8993c673d6c4 HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report
    2a0aa8a06aea netfilter: nf_flow_table: set default timeout after successful insertion
    dbc29aff8d04 Linux 4.19.74
    9d587fe2cd70 x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
    96c08711fc66 nvmem: Use the same permissions for eeprom as for nvmem
    3622d621e9be rsi: fix a double free bug in rsi_91x_deinit()
    780f3aadee1e platform/x86: pmc_atom: Add CB4063 Beckhoff Automation board to critclk_systems DMI table
    52bfcc9c8406 modules: fix compile error if don't have strict module rwx
    ae415d7a2707 modules: fix BUG when load module with rodata=n
    0ae0c43abcbf iio: adc: stm32-dfsdm: fix data type
    acf77c411b4e Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"
    a03ed2891cdb drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto
    d13a836d787d drm: panel-orientation-quirks: Add extra quirk table entry for GPD MicroPC
    4b30a0698208 firmware: ti_sci: Always request response from firmware
    3dfc787f2f50 crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking.
    e89d4cb6fba3 crypto: talitos - Do not modify req->cryptlen on decryption.
    9aff4077304b crypto: talitos - fix ECB algs ivsize
    c4d7148e2d67 crypto: talitos - check data blocksize in ablkcipher.
    02ebbb4f8df8 crypto: talitos - fix CTR alg blocksize
    39fa02a36bb3 crypto: talitos - check AES key size
    e1666bcbae0c driver core: Fix use-after-free and double free on glue directory
    72cd230b3231 ubifs: Correctly use tnc_next() in search_dh_cookie()
    a65290083b66 gpio: fix line flag validation in lineevent_create
    0f4095f33557 PCI: Always allow probing with driver_override
    70facf939ba2 mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue
    6da56f8982bb clk: rockchip: Don't yell about bad mmc phases when getting
    a63416f39aaf drm/meson: Add support for XBGR8888 & ABGR8888 formats
    d9e8b4ba0397 powerpc: Add barrier_nospec to raw_copy_in_user()
    eb020b77b646 x86/purgatory: Change compiler flags from -mcmodel=kernel to -mcmodel=large to fix kexec relocation errors
    73c31bd92039 KVM: nVMX: handle page fault in vmread
    6e60900cfa3e KVM: x86: work around leak of uninitialized stack contents
    09a9f894c65b KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
    9f8a2825918c KVM: s390: kvm_s390_vm_start_migration: check dirty_bitmap before using it as target for memset()
    991b3458da56 genirq: Prevent NULL pointer dereference in resend_irqs()
    5b5f14601e0a ixgbe: Prevent u8 wrapping of ITR value to something less than 10us
    7cbd49cf0d62 Btrfs: fix assertion failure during fsync and use of stale transaction
    22ed1d472811 gpio: fix line flag validation in linehandle_create
    705df757e937 gpiolib: acpi: Add gpiolib_acpi_run_edge_events_on_boot option and blacklist
    0f4ceb259493 tun: fix use-after-free when register netdev failed
    9a4598424e99 tipc: add NULL pointer check before calling kfree_rcu
    67fe3b94a833 tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR
    7c34a29261ee sctp: use transport pf_retrans in sctp_do_8_2_transport_strike
    41b624ff83d2 sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'
    a9e91767b921 sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero
    a7f46e18ecfe net: sched: fix reordering issues
    3600a311f83d net: phylink: Fix flow control resolution
    821302dd0c51 net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list
    88a46756f016 net: Fix null de-reference of device refcount
    b26f489245b3 ixgbe: Fix secpath usage for IPsec TX offload.
    2354e925e361 isdn/capi: check message length in capi_write()
    ea6ec671c87e ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'
    a20c8e4ae48d cdc_ether: fix rndis support for Mediatek based smartphones
    f57fd58dda42 bridge/mdb: remove wrong use of NLM_F_MULTI
    db2d0b7c1dde Linux 4.19.73
    ba03ee62aed0 vhost: make sure log_num < in_num
    569775bd5364 powerpc/tm: Fix restoring FP/VMX facility incorrectly on interrupts
    052bc385f970 powerpc/tm: Remove msr_tm_active()
    f193e02265aa PCI: Reset both NVIDIA GPU and HDA in ThinkPad P50 workaround
    ff69322509bb ext4: unsigned int compared against zero
    292666d2d868 ext4: fix block validity checks for journal inodes using indirect blocks
    97fbf573460e ext4: don't perform block validity checks on the journal inode
    1e88a1f874ca drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors
    b1dd1d06b31d virtio/s390: fix race on airq_areas[]
    057cdb6f0f47 drm/i915: Make sure cdclk is high enough for DP audio on VLV/CHV
    b113f98432ae bcache: fix race in btree_flush_write()
    f73c35d92976 bcache: add comments for mutex_lock(&b->write_lock)
    7989a5026fd1 bcache: only clear BTREE_NODE_dirty bit when it is set
    652993a5aae5 NFSv4: Fix delegation state recovery
    5026932adb1a iio: adc: gyroadc: fix uninitialized return code
    2e7e7c8f9423 mm/migrate.c: initialize pud_entry in migrate_vma()
    b8ad18a10f70 i2c: at91: fix clk_offset for sama5d2
    4c9170b55f3a i2c: at91: disable TXRDY interrupt after sending data
    c9c90711ee88 gpio: don't WARN() on NULL descs if gpiolib is disabled
    a532a120a5cd iommu/iova: Remove stale cached32_node
    c4fc7cb93e0a powerpc/mm: Limit rma_size to 1TB when running without HV mode
    5b9a6ba975c0 ALSA: hda - Fix intermittent CORB/RIRB stall on Intel chips
    87c3692172da drm/panel: Add support for Armadeus ST0700 Adapt
    ecf99cdea02d dm thin metadata: check if in fail_io mode when setting needs_check
    5e9a2ce6d3b4 pstore: Fix double-free in pstore_mkfile() failure path
    192b9af8caf0 resource: fix locking in find_next_iomem_res()
    485bcc29a200 resource: Fix find_next_iomem_res() iteration issue
    9a80dfccade1 resource: Include resource end in walk_*() interfaces
    1c13c9c40e31 btrfs: correctly validate compression type
    0ca2688bd7cd RDMA/srp: Accept again source addresses that do not have a port number
    9541604735b2 RDMA/srp: Document srp_parse_in() arguments
    bab0ff2d87db ARM: dts: gemini: Set DIR-685 SPI CS as active low
    3a1b79ade460 KVM: PPC: Book3S HV: Fix CR0 setting in TM emulation
    3ac718069f7c KVM: PPC: Use ccr field in pt_regs struct embedded in vcpu struct
    beeeead95b2f KVM: VMX: check CPUID before allowing read/write of IA32_XSS
    891011ca564d KVM: VMX: Fix handling of #MC that occurs during VM-Entry
    74ce13331db9 KVM: VMX: Always signal #GP on WRMSR to MSR_IA32_CR_PAT with bad value
    74fd8aae19d9 KVM: x86: optimize check for valid PAT value
    812810399999 ceph: use ceph_evict_inode to cleanup inode's resource
    42fa0e35d6e0 ALSA: hda - Don't resume forcibly i915 HDMI/DP codec
    987564c28e8a cifs: Properly handle auto disabling of serverino option
    d85e830d8534 scsi: zfcp: fix request object use-after-free in send path causing wrong traces
    ba8701d2226c staging: wilc1000: fix error path cleanup in wilc_wlan_initialize()
    60b856dc1744 scsi: target/iblock: Fix overrun in WRITE SAME emulation
    ba52842de1ad scsi: target/core: Use the SECTOR_SHIFT constant
    17111037fdf0 apparmor: reset pos on failure to unpack for various functions
    90ca4912e55d IB/hfi1: Avoid hardlockup with flushlist_lock
    fa717fc442ff clk: tegra210: Fix default rates for HDA clocks
    350503c8982b clk: tegra: Fix maximum audio sync clock for Tegra124/210
    acc07941e224 cifs: add spinlock for the openFileList to cifsInodeInfo
    1d0648767ccf Btrfs: fix race between block group removal and block group allocation
    f276beb324cc drm/amdgpu/{uvd,vcn}: fetch ring's read_ptr after alloc
    7abeffff7bc3 drm/amdgpu: fix ring test failure issue during s3 in vce 3.0 (V2)
    d5f6539381c7 kvm: Check irqchip mode before assign irqfd
    90772cf58838 drm/amdkfd: Add missing Polaris10 ID
    cacbc85376b6 ARC: mm: SIGSEGV userspace trying to access kernel virtual memory
    7edfa9c99d21 ARC: mm: fix uninitialised signal code in do_page_fault
    0828438e523e signal/arc: Use force_sig_fault where appropriate
    fcb2f1e2ea68 dm crypt: move detailed message into debug level
    96b44c20e6f0 cifs: smbd: take an array of reqeusts when sending upper layer data
    3f27a14b03d8 PCI: dwc: Use devm_pci_alloc_host_bridge() to simplify code
    842da8fac182 mmc: sdhci-pci: Add support for Intel CML
    e238e6dc222b blk-mq: free hw queue's resource in hctx's release handler
    69409854ba08 dm mpath: fix missing call of path selector type->end_io
    0fe097012b6c PCI: Reset Lenovo ThinkPad P50 nvgpu at boot if necessary
    5659dfca74d0 PCI: Add macro for Switchtec quirk declarations
    e4ba157877db dt-bindings: mmc: Add disable-cqe-dcmd property.
    eb83f9fa10f7 dt-bindings: mmc: Add supports-cqe property
    0a0176f93ea9 ARM: dts: qcom: ipq4019: enlarge PCIe BAR range
    445a78ea3f90 ARM: dts: qcom: ipq4019: Fix MSI IRQ type
    df1216d8bc86 ARM: dts: qcom: ipq4019: fix PCI range
    2fd4629de519 ext4: protect journal inode's blocks using block_validity
    f10a92309b83 media: i2c: tda1997x: select V4L2_FWNODE
    4061e662c8e9 cifs: Fix lease buffer length error
    df5d4ea2d8be KVM: x86: Always use 32-bit SMRAM save state for 32-bit kernels
    7a74d806bdaa x86/kvm: move kvm_load/put_guest_xcr0 into atomic context
    163b24b1a68c kvm: mmu: Fix overflow on kvm mmu page limit calculation
    feced628c068 IB/mlx5: Reset access mask when looping inside page fault handler
    37222eaf7eb7 arm64: dts: stratix10: add the sysmgr-syscon property from the gmac's
    3cfce8b77aad usb: typec: tcpm: Try PD-2.0 if sink does not respond to 3.0 source-caps
    fba4f7c118e4 drm/i915: Sanity check mmap length against object size
    6423a2ad5709 drm/i915: Handle vm_mmap error during I915_GEM_MMAP ioctl with WC set
    778d626c6af3 CIFS: Fix leaking locked VFS cache pages in writeback retry
    fb2dabeabb17 CIFS: Fix error paths in writeback code
    e407b58c3576 drm: add __user attribute to ptr_to_compat()
    e1a12c3b6f87 PCI: qcom: Don't deassert reset GPIO during probe
    be905d0f2330 PCI: qcom: Fix error handling in runtime PM support
    476ecc14cfdb btrfs: init csum_list before possible free
    936690bdd8e6 btrfs: scrub: fix circular locking dependency warning
    ff55333f5c52 btrfs: scrub: move scrub_setup_ctx allocation out of device_list_mutex
    8ba3169dceac btrfs: scrub: pass fs_info to scrub_setup_ctx
    df7329207870 mmc: renesas_sdhi: Fix card initialization failure in high speed mode
    915c9d0a1d68 powerpc/kvm: Save and restore host AMR/IAMR/UAMOR
    b3f864b88256 spi: spi-gpio: fix SPI_CS_HIGH capability
    1d60902a5448 x86/kvmclock: set offset for kvm unstable clock
    716b0cfa88a5 iwlwifi: add new card for 9260 series
    213566a9b0de iwlwifi: fix devices with PCI Device ID 0x34F0 and 11ac RF modules
    2b76fcb6ba62 drm/nouveau: Don't WARN_ON VCPI allocation failures
    173b6557fcbc mt76: fix corrupted software generated tx CCMP PN
    0d7f329e2431 iio: adc: exynos-adc: Use proper number of channels for Exynos4x12
    4e516b721a50 dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant
    7f588a7262b3 iio: adc: exynos-adc: Add S5PV210 variant
    cd490d44150d KVM: VMX: Compare only a single byte for VMCS' "launched" in vCPU-run
    687e470e9123 bcache: treat stale && dirty keys as bad keys
    d1cec665de2c bcache: replace hard coded number with BUCKET_GC_GEN_MAX
    ee30121fbd78 tpm: Fix some name collisions with drivers/char/tpm.h
    c207ac66848e mfd: Kconfig: Fix I2C_DESIGNWARE_PLATFORM dependencies
    6fd5e50add36 drm/i915/ilk: Fix warning when reading emon_status with no output
    2b4f567912ad drm/vblank: Allow dynamic per-crtc max_vblank_count
    71f719105462 crypto: ccree - add missing inline qualifier
    72eec6b303f4 crypto: ccree - fix resume race condition on init
    f0e286550af8 IB/uverbs: Fix OOPs upon device disassociation
    8c6fb55abf2c ARC: mm: do_page_fault fixes #1: relinquish mmap_sem if signal arrives while handle_mm_fault
    96af7d92d8d2 ARC: show_regs: lockdep: re-enable preemption
    424b75b79994 media: vim2m: only cancel work if it is for right context
    be77686f0369 btrfs: Use real device structure to verify dev extent
    a2790b9939ae btrfs: volumes: Make sure no dev extent is beyond device boundary
    cfbf227e0591 powerpc/pkeys: Fix handling of pkey state across fork()
    2ad95be18995 scsi: megaraid_sas: Use 63-bit DMA addressing
    3263f78640cc scsi: megaraid_sas: Add check for reset adapter bit
    dc4e3ec9d226 scsi: megaraid_sas: Fix combined reply queue mode detection
    eb124aaa2e85 btrfs: Fix error handling in btrfs_cleanup_ordered_extents
    1669d1d2e696 btrfs: Remove extent_io_ops::fill_delalloc
    338a528b7922 Btrfs: fix deadlock with memory reclaim during scrub
    fac803479f60 Btrfs: clean up scrub is_dev_replace parameter
    d3984e80d7f2 KVM: PPC: Book3S HV: Fix race between kvm_unmap_hva_range and MMU mode switch
    d88b01d04c6a drm/i915: Cleanup gt powerstate from gem
    b185bde520d5 drm/i915: Restore sane defaults for KMS on GEM error load
    f999485109d1 media: vim2m: use cancel_delayed_work_sync instead of flush_schedule_work
    a7b6f95f3ca6 media: vim2m: use workqueue
    e432a58d7a0d s390/zcrypt: reinit ap queue state machine during device probe
    a4f404af3ca8 ARM: davinci: dm644x: define gpio interrupts as separate resources
    8d6b2b24ca85 ARM: davinci: dm355: define gpio interrupts as separate resources
    d31f2b61e7f9 ARM: davinci: dm646x: define gpio interrupts as separate resources
    4883e9e66f76 ARM: davinci: dm365: define gpio interrupts as separate resources
    0a6c3bdae2c9 ARM: davinci: da8xx: define gpio interrupts as separate resources
    016218ef6bb0 drm/amd/dm: Understand why attaching path/tile properties are needed
    853dc0759586 drm/amd/pp: Fix truncated clock value when set watermark
    5faabd22ed64 powerplay: Respect units on max dcfclk watermark
    11bedb2e77a0 Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up
    74ff258346e4 Drivers: hv: kvp: Fix the indentation of some "break" statements
    e352d8eb9394 drm/atomic_helper: Disallow new modesets on unregistered connectors
    cff9e1e33151 drm/i915/gen9+: Fix initial readout for Y tiled framebuffers
    8ccbb1d24c26 drm/i915: Rename PLANE_CTL_DECOMPRESSION_ENABLE
    4b2dfc0e2d44 drm/i915: Fix intel_dp_mst_best_encoder()
    796469e361ed x86/kvm/lapic: preserve gfn_to_hva_cache len on cache reinit
    cdad0f65050e KVM: hyperv: define VP assist page helpers
    b0d9043bdbe6 KVM: x86: hyperv: keep track of mismatched VP indexes
    f031fd03e22e KVM: x86: hyperv: consistently use 'hv_vcpu' for 'struct kvm_vcpu_hv' variables
    0b535f7b95af KVM: x86: hyperv: enforce vp_index < KVM_MAX_VCPUS
    8e91cc7f7f91 drm/amdgpu: Update gc_9_0 golden settings.
    bcc3bd761ab5 drm/amdgpu/gfx9: Update gfx9 golden settings.
    2c2cf2245ff6 remoteproc: qcom: q6v5-mss: add SCM probe dependency
    4d9707586ec7 x86, hibernate: Fix nosave_regions setup for hibernation
    805e0e46eb54 Drivers: hv: kvp: Fix two "this statement may fall through" warnings
    3f3beae22842 keys: Fix the use of the C++ keyword "private" in uapi/linux/keyctl.h
    bac1c4edb5c4 scsi: qla2xxx: Move log messages before issuing command to firmware
    6e087eae89df media: cec: remove cec-edid.c
    851308450a8f media: cec/v4l2: move V4L2 specific CEC functions to V4L2
    c09d675f294b drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"
    3015291b2fb5 kernel/module: Fix mem leak in module_add_modinfo_attrs
    9c49f7811f82 modules: always page-align module section allocations
    84ba9ae18fbb remoteproc: qcom: q6v5: shore up resource probe handling
    56944c0b9774 clk: s2mps11: Add used attribute to s2mps11_dt_match
    480101a4aea2 nvme-fc: use separate work queue to avoid warning
    5f147150b753 riscv: remove unused variable in ftrace
    8d23872c7539 scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
    6c550a5db18f arm64: dts: rockchip: enable usb-host regulators at boot on rk3328-rock64
    573370113b24 media: stm32-dcmi: fix irq = 0 case
    7f8b23600779 powerpc/64: mark start_here_multiplatform as __ref
    85a24825b2e6 x86/ftrace: Fix warning and considate ftrace_jmp_replace() and ftrace_call_replace()
    b93aed78eb78 selftests: fib_rule_tests: use pre-defined DEV_ADDR
    68829256e1f9 timekeeping: Use proper ktime_add when adding nsecs in coarse offset
    1aa38eceb6c0 {nl,mac}80211: fix interface combinations on crypto controlled devices
    178d1337a527 blk-iolatency: fix STS_AGAIN handling
    5f33e81250a6 Blk-iolatency: warn on negative inflight IO counter
    91a71a61da8c hv_sock: Fix hang when a connection is closed
    86d5ae21d6b8 batman-adv: Only read OGM tvlv_len after buffer len check
    4b5fee457723 batman-adv: fix uninit-value in batadv_netlink_get_ifindex()
    47a0f70d7d9a powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction
    6e7040d65a71 vhost/test: fix build for vhost test - again
    4f45483faadf vhost/test: fix build for vhost test
    dcd22e14780a drm/vmwgfx: Fix double free in vmw_recv_msg()
    38d38d1e0cc5 sched/fair: Don't assign runtime for throttled cfs_rq
    044ab4715585 ALSA: hda/realtek - Fix the problem of two front mics on a ThinkCentre
    849f85bfdf12 ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL
    a956998ac1c2 ALSA: hda/realtek - Add quirk for HP Pavilion 15
    d11ca2d79334 ALSA: hda/realtek - Fix overridden device-specific initialization
    2c4d2ce8b799 ALSA: hda - Fix potential endless loop at applying quirks

(From OE-Core rev: 611c7d62d67016942323d2fa4f108774c85dce09)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
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>
2019-11-13 22:02:16 +00:00
Ross Burton
90769125ee qemu-helper-native: pass compiler flags
Pass all of the compiler and linker flags so the build is correctly configured.

(From OE-Core rev: b5f8274d75cb61beaf7dab3420bda206e45697ae)

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>
2019-11-13 22:02:16 +00:00
Ross Burton
c1fbd56f01 qemu-helper-native: showing help shouldn't be an error
Displaying a help message if help was requested isn't an error.

(From OE-Core rev: a1d9cfef7f247d616cd6ca482916ad0469e4fc58)

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>
2019-11-13 22:02:16 +00:00
Ross Burton
6c50928df6 qemu-helper-native: add missing option to getopt() call
Noticed by -Wall.

(From OE-Core rev: 7ae318fb4eaa8595c30af68c9df0d6c09116dc4d)

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>
2019-11-13 22:02:16 +00:00
Ross Burton
faf0ebf337 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: 29d926802e7f8b4614a2dafa0af4c923912e1811)

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>
2019-11-13 22:02:16 +00:00
He Zhe
9c38686e17 ltp: Fix overcommit_memory failure
Backport a patch from upstream to fix the following runtime failure.

mem.c:814: INFO: set overcommit_memory to 0
overcommit_memory.c:213: FAIL: alloc passed, expected to fail

(From OE-Core rev: 869f46863e218c2d18ae7b4c0b28775fa07ba8b8)

Signed-off-by: He Zhe <zhe.he@windriver.com>
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>
2019-11-13 22:02:16 +00:00
Changqing Li
2a6773b376 mdadm: fix do_package failed when changed local.conf but not cleaned
reproduce steps:
1. add DISTRO_FEATURE_append = 'usrmerge' in local.conf
2. bitbake mdadm --success
3. remove DISTRO_FEATURE_append = 'usrmerge' from local.conf
4. bitbake mdadm  -- failed when do_package

it is not proper to change source Makefile during do_install by sed,
fix by pass correct config to EXTRA_OEMAKE

[YOCTO #13493]

(From OE-Core rev: d0f285bd7d066e752b93e57b7f5468819016586f)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Ferry Toth
db8e206970 sudo: Fix fetching sources
It looks like https://www.sudo.ws/download.html changed certificate
and directory structure. This breaks fetching sources.

(From OE-Core rev: f02e9f46ce54fed3c7ddfad7d1003a2fb7ba3a67)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Ross Burton
cc9836f601 file: run test suite when building natively
As we apply the same patches to native and target builds of file, we can verify
that the patches are not breaking by executing the test suite during the build
of file-native.

(From OE-Core rev: 4668ac8c2600fe5698f030ed1e8cba69c0989a2c)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Ross Burton
495005ae3c file: fix CVE-2019-18218
(From OE-Core rev: 2435c38e109cac68476ee672eca09b4cd6237ed4)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Richard Purdie
cf1117859e 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.

(From OE-Core rev: 664c8f9837db7b20ff540d5f6373e4ae0f2b4b02)

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>
2019-11-13 22:02:15 +00:00
Anuj Mittal
3f9476d8dd libsdl2: fix race when building in parallel
(From OE-Core rev: 4e3e8d8270f318e6384c3d9bb5f6c7503f41d736)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Trevor Gamblin
f3ba167c21 libgcrypt: fix CVE-2019-13627
Backport two fixes for CVE-2019-13627 from upstream
to zeus.

(From OE-Core rev: 3361760dbb46cca2e00f053286404b5df39590b3)

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Ross Burton
6949ba6d41 libpam: set CVE_PRODUCT
(From OE-Core rev: d764ed9515d10db636ef63e0d05ac66f2a454ad4)

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: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Ross Burton
d75c717c7f libsndfile1: whitelist CVE-2018-13419
This is a memory leak that nobody else can replicate and has been rejected by
upstream.

(From OE-Core rev: 541ec2f0590ab1f2c0667bf36df7c4c1bb0b6a25)

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: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Ross Burton
d95f3a8277 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.

(From OE-Core rev: 16b98e759a33d9f20e5b40aa1cff5b1c27dbee9d)

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: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Ross Burton
25fb823284 libpng: whitelist CVE-2019-17371
This is actually a memory leak in gif2png 2.x, so whitelist it in the libpng
recipe.

(From OE-Core rev: a10b6e0e8d4e6b5778b5ca4db60e96ea025ea475)

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: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Adrian Bunk
f2c963a930 python3: Upgrade 3.7.4 -> 3.7.5
Backported patch removed.

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

(From OE-Core rev: efc4236112d599a3a39376f5a5898072061efc8d)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Joe Slater
5c73cd2707 libxslt: fix CVE-2019-18197
Use patch from upstream after 1.1.33 release.

(From OE-Core rev: 27969c5987d974ff10e5d0f00415b8a8576143e0)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Joe Slater
6c5b31e7a6 libtiff: fix CVE-2019-17546
Apply unmodified patch from upstream.

(From OE-Core rev: 6dc3813bda9aaf8eed5a5a3f74b27b6a32c9cb42)

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: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Changqing Li
2d43b1e2f1 e2fsprogs: fix CVE-2019-5094
(From OE-Core rev: 56f38b042d68528009283491b9d40c75f13b8f16)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:02:15 +00:00
Richard Purdie
f9d4afbb06 bitbake: fetch2: Ensure cached url data is matched to a datastore
There was a weird error in OE-Core where "devtool modify virtual/kernel"
was showing basehash mismatch errors. This was due to SRCPV sometimes being:
AUTOINC+b867b78b50_47b80ef7bd and sometimes AUTOINC+b867b78b50_255a750d28.

The latter hash comes from KBRANCH and meant sometimes the correct branch
was seen, sometimes it was not. The issue was complicated by the execution
using a remote datastore over tinfoil.

The problem turns out to be a fetcher caching error. If the datastore
changes, the cached url data may not be valid.

We therefore ensure we match cached url data against the datastore that
generated it, which appears to fix this issue.

(Bitbake rev: 1a79651c518abc35b99005c137ab7e82a99c75b0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-13 22:00:22 +00:00
Scott Rifenbark
17c1e5fc07 mega-manual: Updated mega-manual Bitbake manual search path
using ../.. instead of ../../..

Fixes [YOCTO #13553]

(From yocto-docs rev: fc5a20a8c40d900a54eaaddfca482526338193dd)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-10 14:07:08 +00:00
Scott Rifenbark
35a556a732 ref-manual: Added 3.0 migration section.
(From yocto-docs rev: c247f87e657cb63c8fd6a79b38ad66affe8c52a7)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-10 14:07:08 +00:00
Ivan Efimov
2404633259 bitbake: bitbake-worker child process create group before registering SIGTERM handler
The bitbake-worker child on the SIGTERM signal handling send the SIGTERM to all
processes in it's process group. In cases when the bitbake-worker child got
SIGTERM after registering own SIGTERM handler and before the os.setsid() call
it can send SIGTERM to unwanted processes.

In the worst case during SIGTERM processing the bitbake-worker child can be in
the group of the process that started BitBake itself. As a result it can kill
processes that not related to BitBake at all.

(Bitbake rev: 4d7017a48c17e9b64d5824c77abe94cc3ab0f579)

Signed-off-by: Ivan Efimov <i.efimov@inango-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-07 19:46:51 +00:00
André Draszik
72e9458dba connman: mark connman-wait-online as SYSTEMD_PACKAGE
The connman-wait-online package currently isn't marked as
systemd-enabled package. This means it is impossible to
auto-enable the service during image creation or package
installation, as no preset files and no pkg_postinst()
snippet is being created.

This change should have been done as part of the
upgrade to v1.31

Note:
connman-wait-online is needed when connman is in use
in more complex network/interface setups for systemd's
network-online.target to report success.
systemd-networkd's systemd-networkd-wait-online.service
alone doesn't work in such scenarios and simply times
out, as it know nothing about the expected network/
interface configuration, meaning the target doesn't
boot successfully (systemctl list-units --failed),
and long delays are seen, caused by waiting for the
systemd-networkd-wait-online.service timeout.

(From OE-Core rev: 5607d38af39294bf97a878b414a0212278b66b2c)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1a8d18eeee6dc188d8becc778bfa933031490781)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Chee Yang Lee
b3d7793ccd wic/engine: use 'linux-swap' for swap file system
[YOCTO #13312]
see https://bugzilla.yoctoproject.org/show_bug.cgi?id=13312

wic/engine.Disk._get_part_image was looking at variable fstypes for
supported fstype which is 'swap' but image build with 'linux-swap'.
supported fstype should be 'linux-swap'.

(From OE-Core rev: 759a37e315d72e462a617f1cda326b8f198e3d4e)

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7e6da22fe4faf841bcec02e55f376b4dae04d6a8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Liwei Song
4094715887 util-linux: fix PKNAME name is NULL when use lsblk [LIN1019-2963]
PKNAME is NULL when run "lsblk -o+PKNAME /dev/sda1"
backport an upstream patch to fix it.

(From OE-Core rev: dba4cc01463c2edad29f6f8c854b298255cc7562)

Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a5a987ff5e5e333e28be44a12e729907272ea3cb)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Chen Qi
811c957332 go: fix CVE-2019-16276
(From OE-Core rev: bedeecf57ebf013aa24535eaf1345c53ba22a494)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Changqing Li
645d114f72 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.

(From OE-Core rev: b7b6d39565f8fad61f2347a3fe31c9ee77a4da15)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Tom Benn
db4b5fd686 dbus: update dbus-1.init to reflect new PID file
The PID file referenced in dbus-1.init script was out of date and no longer existed. This meant that dbus could not be restarted via init.d without force removing the old PID file.

(From OE-Core rev: a9d3cae5668fbcae7145b8cdba786caa30b5b3d3)

Signed-off-by: fridgecow <fridgecow@fb.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 2ed6f06f30cb54b9c70f1a92d93c920ec4d01ffe)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Yi Zhao
149ad2c3e2 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:
1374254c29
daedbbb554
a4c561aab1

(From OE-Core rev: 757f2d50d7cd194e5f734a24e68d8f0da98b38f8)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Changqing Li
6b86b7fd57 python: Fix CVE-2019-10160
(From OE-Core rev: 50ba17abdcc6579ce0629cf1755d45308facb768)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Douglas Royds via Openembedded-core
bfd2ab3d67 icecc: Export ICECC_CC and friends via wrapper-script
By exporting ICECC_CC, ICECC_CXX, and ICECC_VERSION in a wrapper-script,
and putting this wrapper-script in the PATH, the Makefiles generated by CMake or
the autotools are able to function correctly outside of bitbake.
This provides a convenient developer workflow in which the
modify-compile-unittest cycle can happen directly in the ${B} directory.

The `rm -f $ICE_PATH/$compiler` line is transitional,
and can go at some later date (October 2020 or later, perhaps).

(From OE-Core rev: 0f47d4ef50d6b0732ac40f7ede31f554a757864c)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 40d74cb1d0ddce930267e49764cacb263b244091)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
George McCollister
26d04d5b11 openssl: make OPENSSL_ENGINES match install path
Set OPENSSL_ENGINES to the path where engines are actually installed.

(From OE-Core rev: 4aa5d551af3d0eb800c1640c98cbd591224726f8)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:18 +00:00
Changqing Li
70ccceb33a qemu: Fix CVE-2019-12068
(From OE-Core rev: 82c4fb091199b737722a60d517b694860b6e6ba8)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 81b375ac7851088a671317468a8e2eed69d4a827)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Ross Burton
56ce08a9ed python3: -dev should depend on distutils
python3-config uses distutils:

Traceback (most recent call last):
  File "/usr/bin/python3-config", line 9, in <module>
    from distutils import sysconfig
ModuleNotFoundError: No module named 'distutils'

Add the dependency so that distutils is always present.

[ YOCTO #13592 ]

(From OE-Core rev: 5fae2306184023165e21a87d1cca3016ba105d5f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 04136dbac48986dce5b2b872b2c0b46c673c44f2)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Ricardo Ribalda Delgado
fbb38be2c1 i2c-tools: Add missing RDEPEND
Fixes:
 # decode-dimms
Can't locate Carp.pm in @INC (you may need to install the Carp module) (@INC contains: /usr/lib/perl5/site_perl/5.28.1/x86_64-linux /usr/lib/perl5/site_perl/5.28.1 /usr/lib/perl5/vendor_perl/5.28.1/x86_64-linux /usr/lib/perl5/vendor_perl/5.28.1 /usr/lib/perl5/5.28.1/x86_64-linux /usr/lib/perl5/5.28.1 .) at /usr/lib/perl5/5.28.1/Tie/Hash.pm line 190.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.28.1/Tie/Hash.pm line 190.
Compilation failed in require at /usr/lib/perl5/5.28.1/x86_64-linux/POSIX.pm line 505.
Compilation failed in require at /usr/bin/decode-dimms line 41.
BEGIN failed--compilation aborted at /usr/bin/decode-dimms line 41.
root@qt5222:~# apt-get install perl-module-carp

(From OE-Core rev: 60ee826ec6f07b270ae77e24be0088269a93081e)

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c73d2a2c0ecc99f0d6d7e6a1861ecce7a2312a57)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Ross Burton
0b10203499 file: explicitly disable seccomp
file will automatically enable seccomp if the seccomp headers are available, but
the build will fail on Opensuse Tumbleweed because the include paths are wrong.

Enabling seccomp is a bad idea because it interacts badly with pseudo (causing
build failures), so explicitly and globally disable seccomp.

(From OE-Core rev: cbbbee1dce84d6ff62fb72282088f839cb642857)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a752faa152df031df5acaa40491299ac115109a4)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Eugene Smirnov
6fb5afb65d wic/rawcopy: Support files in sub-directories
If the source file is located in a subdirectory of DEPLOY_DIR
rawcopy will currently fail in sparse_copy function on
open(dst_fname, 'wb'), as the parent directory for destination
file does not exist.

This patch helps to avoid that by recursively creating
parent directories.

(From OE-Core rev: 03796926046e5b5b57349d66de6bb009a34d2cb2)

Signed-off-by: Eugene Smirnov <evgenii.smirnov@here.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 073c435644091c2801e45c6d02afa917de575082)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Hongxu Jia
13a3b14503 openssh: fix CVE-2019-16905
Backport a patch from upstream to fix CVE-2019-16905
a546b17bba

(From OE-Core rev: e8f39536d2616ea0bb8bab459da29af63e3ee336)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 8bd4b87071c073a0e4d265bc00df34684a355eff)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Stefan Agner
ad9606f877 uninative: check .done file instead of tarball
In case multiple builds share UNINATIVE_DLDIR's location, one build
might be in the process of downloading the tarball while another is
just checking whether the tarball exists. Check for the done file
instead and rely on the fetchers lockfile mechanism in case two
builds are running.

(From OE-Core rev: 956ae2c2a72914c7e9a1d59e5906c7fc75670a39)

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a1c95580549cb4f77601e62c7f026b19c752d853)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Ross Burton
c07d45d20c sanity: check the format of SDK_VENDOR
If SDK_VENDOR isn't formatted as -foosdk and is instead for example -foo-sdk
then the triple that are constructed are not in fact triples, which results in
mysterious compile errors.

Check in sanity.bbclass so this failure is detected early.

[ YOCTO #13573 ]

(From OE-Core rev: 95d3ca54453cdb0662fae2a2cf7e8173611c86f4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b0efd8d4d0dbc30e6505b42f5603f18fa764d732)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Yi Zhao
cd24be7c47 libsdl2: fix CVE-2019-13616
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2019-13616

Patch from:
https://hg.libsdl.org/SDL/rev/e7ba650a643a

(From OE-Core rev: 691f04965faf58d9d6323898478916ae306d046c)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 70b9cdf86b9c5ed14937500619387a890a57ef20)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Wenlin Kang
78e173090b sysstat: fix CVE-2019-16167
This commit is another part of CVE-2019-16167, please see
https://github.com/sysstat/sysstat/issues/232.

(From OE-Core rev: 5c11937348debf57e3a87c7c6a6c0429fd756eca)

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 586c045eb81b79200b46bf743f5d3fdb5f68c12d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Trevor Gamblin
ed29b7291d ncurses: fix CVE-2019-17594, CVE-2019-17595
Backport changes to tinfo/comp_hash.c, tinfo/parse_entry.c,
and progs/dump_entry.c from upstream to fix CVEs.

(From OE-Core rev: 7ec70aeb0c6f6080523efa0f983fa36b92cb5558)

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Joerg Vehlow
5fb336e957 runqemu: Remove disabling of high resolution timer
The option 'highres=off' sneaked itself into the runqemu script for all
configurations, where the root filesystem type is not 'cpio' or 'cpio.gz'.
See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13590

(From OE-Core rev: f71b1a96529d658d1c6c7dc04dca1957ea647e4e)

Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
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>
2019-10-29 09:08:17 +00:00
Alexander Kanavin
527456a57a runqemu: unset another environment variable for 'egl-headless'
Some host distributions (opensuse for example) are using 'pkgconf',
which, unlike the original pkg-config, appends PKG_CONFIG_SYSROOT_DIR
to every directory from the .pc file.

(From OE-Core rev: 5f51c9303940423b05ba8cfeaa1c9c2b24e36a53)

Signed-off-by: Alexander Kanavin <alex.kanavin@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>
2019-10-29 09:08:17 +00:00
Chen Qi
895a9d0ef7 python3: CVE-2019-16056
(From OE-Core rev: b80c0a4b6821da55d2882b60d5d3e7b21d43a383)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Chen Qi
93a2a3c64a python: CVE-2019-16056
(From OE-Core rev: 27be9cf71a6fe906a23e81b56f1cc18a6fc9ef97)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Trevor Gamblin
6da9997056 aspell: fix CVE-2019-17544
Backport CVE-2019-17544 fix to zeus.

(From OE-Core rev: 7ed241ff1f93c623a3b3030249c09f7c3c429a46)

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Qi.Chen@windriver.com
4f5919d899 sqlite3: fix CVE-2019-16168
(From OE-Core rev: 948b0dd6d91eeed529c6983141ab80327fa4ae9c)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29 09:08:17 +00:00
Scott Rifenbark
4cecfe6e9d ref-manual, dev-manual: Added CMake toolchain files.
Fixes [YOCTO #12760]

Updated the cmake.bbclass description to tell what directory
to insall custom CMake toolchain files into.  Also, updated
the two areas in the "Writing a New Recipe" section that
mention CMake.  Placed a couple notes there concerning the
same directory stuff.

(From yocto-docs rev: a65cd2c4c062d4ae388191b9d6708b4fadffaa3f)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Scott Rifenbark
728ad848a8 ref-manual: Updated the BUSYBOX_SPLIT_SUID variable.
Fixes [YOCTO #13596]

(From yocto-docs rev: 015991b26ed091385cfb94f13e00c6a964c20160)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Scott Rifenbark
5d4879def3 ref-manual, dev-manual: Clean up of a commit
Alejandro Enedino Hernandez Samaniego <aehs29@gmail.com>
commited a change to these manuals (see
9e79e96cad66316c1b4ee608723edfa763f0f9ef) and did not
use YP documentation standards for the content.  I cleaned
up the text and tabbing.

(From yocto-docs rev: 9c95799322e1830a5faae0980384ab10b6504007)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Scott Rifenbark
5789bb4985 ref-manual: Removed deprecated link to ref-classes-bluetooth
This was in a moving to YP version 1.8 migration section.

(From yocto-docs rev: b87f0882c39524747004fafc4d1caf58b3344c3a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Scott Rifenbark
eb6c765b24 documenation: Changed "2.8" to "3.0".
I was using "2.8" throughout the manual set instead
of "3.0".  Updated all aspects to "3.0".

(From yocto-docs rev: db19937e98c59d4d2a9ce89877be3c8e0b05991a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Scott Rifenbark
8221ea3602 ref-manual: 2nd pass 3.0 migration
Turned "2.8" into "3.0".  Nobody told me about skipping
2.8 and 2.9.

(From yocto-docs rev: 13819f0651c48adae9d1a8d6d19341ba5ee44978)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Scott Rifenbark
b22c6f673f dev-manual: Added info to "Selecting an Initialization Manager"
(From yocto-docs rev: c402ebcb51b6400d79c62ff44aeae57db982565e)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Scott Rifenbark
ea55d874e8 poky.ent: Updated the release date to October 2019
(From yocto-docs rev: 21042fd8ad463c996e554f52359a599ee7d35c12)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Scott Rifenbark
e398bd4cd0 ref-manual: First pass of 2.8 migration changes (WIP)
(From yocto-docs rev: 2c0f6cd921132caa4f49c34ac592db68be27761a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
Ross Burton
a3ece7d5d8 kernel-dev: don't use _append +=
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 17:32:45 +01:00
171 changed files with 6832 additions and 1192 deletions

View File

@@ -195,9 +195,6 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha
global worker_pipe_lock
pipein.close()
signal.signal(signal.SIGTERM, sigterm_handler)
# Let SIGHUP exit as SIGTERM
signal.signal(signal.SIGHUP, sigterm_handler)
bb.utils.signal_on_parent_exit("SIGTERM")
# Save out the PID so that the event can include it the
@@ -212,6 +209,11 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha
# This ensures signals sent to the controlling terminal like Ctrl+C
# don't stop the child processes.
os.setsid()
signal.signal(signal.SIGTERM, sigterm_handler)
# Let SIGHUP exit as SIGTERM
signal.signal(signal.SIGHUP, sigterm_handler)
# No stdin
newsi = os.open(os.devnull, os.O_RDWR)
os.dup2(newsi, sys.stdin.fileno())

View File

@@ -371,10 +371,6 @@ class BBCooker:
self.data.setVar('BB_CMDLINE', self.ui_cmdline)
#
# Copy of the data store which has been expanded.
# Used for firing events and accessing variables where expansion needs to be accounted for
#
if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
self.disableDataTracking()

View File

@@ -1593,7 +1593,7 @@ class Fetch(object):
fn = d.getVar('FILE')
mc = d.getVar('__BBMULTICONFIG') or ""
if cache and fn and mc + fn in urldata_cache:
self.ud = urldata_cache[mc + fn]
self.ud = urldata_cache[mc + fn + str(id(d))]
for url in urls:
if url not in self.ud:
@@ -1605,7 +1605,7 @@ class Fetch(object):
pass
if fn and cache:
urldata_cache[mc + fn] = self.ud
urldata_cache[mc + fn + str(id(d))] = self.ud
def localpath(self, url):
if url not in self.urls:

View File

@@ -145,18 +145,18 @@ class ClearCase(FetchMethod):
basecmd = "%s %s" % (ud.basecmd, command)
if command is 'mkview':
if command == 'mkview':
if not "rcleartool" in ud.basecmd:
# Cleartool needs a -snapshot view
options.append("-snapshot")
options.append("-tag %s" % ud.viewname)
options.append(ud.viewdir)
elif command is 'rmview':
elif command == 'rmview':
options.append("-force")
options.append("%s" % ud.viewdir)
elif command is 'setcs':
elif command == 'setcs':
options.append("-overwrite")
options.append(ud.configspecfile)

View File

@@ -292,11 +292,21 @@ class Git(FetchMethod):
def clonedir_need_update(self, ud, d):
if not os.path.exists(ud.clonedir):
return True
if ud.shallow and ud.write_shallow_tarballs and self.clonedir_need_shallow_revs(ud, d):
return True
for name in ud.names:
if not self._contains_ref(ud, d, name, ud.clonedir):
return True
return False
def clonedir_need_shallow_revs(self, ud, d):
for rev in ud.shallow_revs:
try:
runfetchcmd('%s rev-parse -q --verify %s' % (ud.basecmd, rev), d, quiet=True, workdir=ud.clonedir)
except bb.fetch2.FetchError:
return rev
return None
def shallow_tarball_need_update(self, ud):
return ud.shallow and ud.write_shallow_tarballs and not os.path.exists(ud.fullshallow)
@@ -339,13 +349,7 @@ class Git(FetchMethod):
runfetchcmd(clone_cmd, d, log=progresshandler)
# Update the checkout if needed
needupdate = False
for name in ud.names:
if not self._contains_ref(ud, d, name, ud.clonedir):
needupdate = True
break
if needupdate:
if self.clonedir_need_update(ud, d):
output = runfetchcmd("%s remote" % ud.basecmd, d, quiet=True, workdir=ud.clonedir)
if "origin" in output:
runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir)
@@ -369,6 +373,11 @@ class Git(FetchMethod):
if not self._contains_ref(ud, d, name, ud.clonedir):
raise bb.fetch2.FetchError("Unable to find revision %s in branch %s even from upstream" % (ud.revisions[name], ud.branches[name]))
if ud.shallow and ud.write_shallow_tarballs:
missing_rev = self.clonedir_need_shallow_revs(ud, d)
if missing_rev:
raise bb.fetch2.FetchError("Unable to find revision %s even from upstream" % missing_rev)
def build_mirror_data(self, ud, d):
if ud.shallow and ud.write_shallow_tarballs:
if not os.path.exists(ud.fullshallow):

View File

@@ -54,13 +54,6 @@ class Hg(FetchMethod):
else:
ud.proto = "hg"
ud.setup_revisions(d)
if 'rev' in ud.parm:
ud.revision = ud.parm['rev']
elif not ud.revision:
ud.revision = self.latest_revision(ud, d)
# Create paths to mercurial checkouts
hgsrcname = '%s_%s_%s' % (ud.module.replace('/', '.'), \
ud.host, ud.path.replace('/', '.'))
@@ -74,6 +67,13 @@ class Hg(FetchMethod):
ud.localfile = ud.moddir
ud.basecmd = d.getVar("FETCHCMD_hg") or "/usr/bin/env hg"
ud.setup_revisions(d)
if 'rev' in ud.parm:
ud.revision = ud.parm['rev']
elif not ud.revision:
ud.revision = self.latest_revision(ud, d)
ud.write_tarballs = d.getVar("BB_GENERATE_MIRROR_TARBALLS")
def need_update(self, ud, d):
@@ -139,7 +139,7 @@ class Hg(FetchMethod):
cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" pull" % (ud.basecmd, ud.user, ud.pswd, proto)
else:
cmd = "%s pull" % (ud.basecmd)
elif command == "update":
elif command == "update" or command == "up":
if ud.user and ud.pswd:
cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" update -C %s" % (ud.basecmd, ud.user, ud.pswd, proto, " ".join(options))
else:
@@ -247,12 +247,19 @@ class Hg(FetchMethod):
scmdata = ud.parm.get("scmdata", "")
if scmdata != "nokeep":
proto = ud.parm.get('protocol', 'http')
if not os.access(os.path.join(codir, '.hg'), os.R_OK):
logger.debug(2, "Unpack: creating new hg repository in '" + codir + "'")
runfetchcmd("%s init %s" % (ud.basecmd, codir), d)
logger.debug(2, "Unpack: updating source in '" + codir + "'")
runfetchcmd("%s pull %s" % (ud.basecmd, ud.moddir), d, workdir=codir)
runfetchcmd("%s up -C %s" % (ud.basecmd, revflag), d, workdir=codir)
if ud.user and ud.pswd:
runfetchcmd("%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" pull %s" % (ud.basecmd, ud.user, ud.pswd, proto, ud.moddir), d, workdir=codir)
else:
runfetchcmd("%s pull %s" % (ud.basecmd, ud.moddir), d, workdir=codir)
if ud.user and ud.pswd:
runfetchcmd("%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" up -C %s" % (ud.basecmd, ud.user, ud.pswd, proto, revflag), d, workdir=codir)
else:
runfetchcmd("%s up -C %s" % (ud.basecmd, revflag), d, workdir=codir)
else:
logger.debug(2, "Unpack: extracting source to '" + codir + "'")
runfetchcmd("%s archive -t files %s %s" % (ud.basecmd, revflag, codir), d, workdir=ud.moddir)

View File

@@ -1397,7 +1397,7 @@ class RunQueue:
cache[tid] = iscurrent
return iscurrent
def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False):
def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False, summary=True):
valid = set()
if self.hashvalidate:
sq_data = {}
@@ -1410,15 +1410,15 @@ class RunQueue:
sq_data['hashfn'][tid] = self.rqdata.dataCaches[mc].hashfn[taskfn]
sq_data['unihash'][tid] = self.rqdata.runtaskentries[tid].unihash
valid = self.validate_hash(sq_data, data, siginfo, currentcount)
valid = self.validate_hash(sq_data, data, siginfo, currentcount, summary)
return valid
def validate_hash(self, sq_data, d, siginfo, currentcount):
locs = {"sq_data" : sq_data, "d" : d, "siginfo" : siginfo, "currentcount" : currentcount}
def validate_hash(self, sq_data, d, siginfo, currentcount, summary):
locs = {"sq_data" : sq_data, "d" : d, "siginfo" : siginfo, "currentcount" : currentcount, "summary" : summary}
# Metadata has **kwargs so args can be added, sq_data can also gain new fields
call = self.hashvalidate + "(sq_data, d, siginfo=siginfo, currentcount=currentcount)"
call = self.hashvalidate + "(sq_data, d, siginfo=siginfo, currentcount=currentcount, summary=summary)"
return bb.utils.better_eval(call, locs)
@@ -1605,7 +1605,7 @@ class RunQueue:
tocheck.add(tid)
valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True)
valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True, summary=False)
# Tasks which are both setscene and noexec never care about dependencies
# We therefore find tasks which are setscene and noexec and mark their
@@ -1986,7 +1986,7 @@ class RunQueueExecute:
continue
logger.debug(1, "Task %s no longer deferred" % nexttask)
del self.sq_deferred[nexttask]
valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False)
valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False, summary=False)
if not valid:
logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask)
self.sq_task_failoutright(nexttask)
@@ -2303,16 +2303,22 @@ class RunQueueExecute:
for tid in changed:
if tid not in self.rqdata.runq_setscene_tids:
continue
if tid in self.runq_running:
continue
if tid in self.scenequeue_covered:
# Potentially risky, should we report this hash as a match?
logger.info("Already covered setscene for %s so ignoring rehash" % (tid))
continue
if tid not in self.pending_migrations:
self.pending_migrations.add(tid)
for tid in self.pending_migrations.copy():
if tid in self.runq_running:
# Too late, task already running, not much we can do now
self.pending_migrations.remove(tid)
continue
if tid in self.scenequeue_covered or tid in self.sq_live:
# Already ran this setscene task or it running
# Potentially risky, should we report this hash as a match?
logger.info("Already covered setscene for %s so ignoring rehash" % (tid))
self.pending_migrations.remove(tid)
continue
valid = True
# Check no tasks this covers are running
for dep in self.sqdata.sq_covered_tasks[tid]:
@@ -2337,7 +2343,12 @@ class RunQueueExecute:
self.sq_buildable.remove(tid)
if tid in self.sq_running:
self.sq_running.remove(tid)
if self.sqdata.sq_revdeps[tid].issubset(self.scenequeue_covered | self.scenequeue_notcovered):
harddepfail = False
for t in self.sqdata.sq_harddeps:
if tid in self.sqdata.sq_harddeps[t] and t in self.scenequeue_notcovered:
harddepfail = True
break
if not harddepfail and self.sqdata.sq_revdeps[tid].issubset(self.scenequeue_covered | self.scenequeue_notcovered):
if tid not in self.sq_buildable:
self.sq_buildable.add(tid)
if len(self.sqdata.sq_revdeps[tid]) == 0:
@@ -2361,9 +2372,15 @@ class RunQueueExecute:
if tid in self.build_stamps:
del self.build_stamps[tid]
logger.info("Setscene task %s now valid and being rerun" % tid)
origvalid = False
if tid in self.sqdata.valid:
origvalid = True
self.sqdone = False
update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self)
update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
if tid in self.sqdata.valid and not origvalid:
logger.info("Setscene task %s became valid" % tid)
if harddepfail:
self.sq_task_failoutright(tid)
if changed:
self.holdoff_need_update = True
@@ -2692,9 +2709,9 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
sqdata.stamppresent = set()
sqdata.valid = set()
update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq)
update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True)
def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq):
def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True):
tocheck = set()
@@ -2728,7 +2745,7 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq):
tocheck.add(tid)
sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False)
sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary)
sqdata.hashes = {}
for mc in sorted(sqdata.multiconfigs):

View File

@@ -508,6 +508,7 @@ class SignatureGeneratorUniHashMixIn(object):
if new_unihash != unihash:
bb.debug(1, 'Task %s unihash changed %s -> %s by server %s' % (taskhash, unihash, new_unihash, self.server))
bb.event.fire(bb.runqueue.taskUniHashUpdate(fn + ':do_' + task, new_unihash), d)
self.set_unihash(tid, new_unihash)
else:
bb.debug(1, 'Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server))
except hashserv.client.HashConnectionError as e:

View File

@@ -1863,6 +1863,26 @@ class GitShallowTest(FetcherTest):
with self.assertRaises(bb.fetch2.FetchError):
self.fetch()
def test_shallow_fetch_missing_revs(self):
self.add_empty_file('a')
self.add_empty_file('b')
fetcher, ud = self.fetch(self.d.getVar('SRC_URI'))
self.git('tag v0.0 master', cwd=self.srcdir)
self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0')
self.d.setVar('BB_GIT_SHALLOW_REVS', 'v0.0')
self.fetch_shallow()
def test_shallow_fetch_missing_revs_fails(self):
self.add_empty_file('a')
self.add_empty_file('b')
fetcher, ud = self.fetch(self.d.getVar('SRC_URI'))
self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0')
self.d.setVar('BB_GIT_SHALLOW_REVS', 'v0.0')
with self.assertRaises(bb.fetch2.FetchError), self.assertLogs("BitBake.Fetcher", level="ERROR") as cm:
self.fetch_shallow()
self.assertIn("Unable to find revision v0.0 even from upstream", cm.output[0])
@skipIfNoNetwork()
def test_bitbake(self):
self.git('remote add --mirror=fetch origin git://github.com/openembedded/bitbake', cwd=self.srcdir)

View File

@@ -255,7 +255,7 @@ class RunQueueTests(unittest.TestCase):
cmd = ["bitbake", "a1", "b1"]
tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv, cleanup=True)
expected = ['a1:populate_sysroot', 'a1:package', 'a1:package_write_rpm_setscene', 'a1:packagedata_setscene',
'a1:package_write_ipk_setscene', 'a1:package_qa_setscene']
'a1:package_write_ipk_setscene', 'a1:package_qa_setscene', 'a1:build']
self.assertEqual(set(tasks), set(expected))
self.shutdown(tempdir)

View File

@@ -103,6 +103,32 @@ class Path(unittest.TestCase):
result = bb.utils._check_unsafe_delete_path(arg1)
self.assertEqual(result, correctresult, '_check_unsafe_delete_path("%s") != %s' % (arg1, correctresult))
class Checksum(unittest.TestCase):
filler = b"Shiver me timbers square-rigged spike Gold Road galleon bilge water boatswain wherry jack pirate. Mizzenmast rum lad Privateer jack salmagundi hang the jib piracy Pieces of Eight Corsair. Parrel marooned black spot yawl provost quarterdeck cable no prey, no pay spirits lateen sail."
def test_md5(self):
import hashlib
with tempfile.NamedTemporaryFile() as f:
f.write(self.filler)
f.flush()
checksum = bb.utils.md5_file(f.name)
self.assertEqual(checksum, "bd572cd5de30a785f4efcb6eaf5089e3")
def test_sha1(self):
import hashlib
with tempfile.NamedTemporaryFile() as f:
f.write(self.filler)
f.flush()
checksum = bb.utils.sha1_file(f.name)
self.assertEqual(checksum, "249eb8fd654732ea836d5e702d7aa567898eca71")
def test_sha256(self):
import hashlib
with tempfile.NamedTemporaryFile() as f:
f.write(self.filler)
f.flush()
checksum = bb.utils.sha256_file(f.name)
self.assertEqual(checksum, "fcfbae8bf6b721dbb9d2dc6a9334a58f2031a9a9b302999243f99da4d7f12d0f")
class EditMetadataFile(unittest.TestCase):
_origfile = """

View File

@@ -520,22 +520,26 @@ def unlockfile(lf):
fcntl.flock(lf.fileno(), fcntl.LOCK_UN)
lf.close()
def _hasher(method, filename):
import mmap
with open(filename, "rb") as f:
try:
with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as mm:
for chunk in iter(lambda: mm.read(8192), b''):
method.update(chunk)
except ValueError:
# You can't mmap() an empty file so silence this exception
pass
return method.hexdigest()
def md5_file(filename):
"""
Return the hex string representation of the MD5 checksum of filename.
"""
import hashlib, mmap
with open(filename, "rb") as f:
m = hashlib.md5()
try:
with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as mm:
for chunk in iter(lambda: mm.read(8192), b''):
m.update(chunk)
except ValueError:
# You can't mmap() an empty file so silence this exception
pass
return m.hexdigest()
import hashlib
return _hasher(hashlib.md5(), filename)
def sha256_file(filename):
"""
@@ -543,24 +547,14 @@ def sha256_file(filename):
filename.
"""
import hashlib
s = hashlib.sha256()
with open(filename, "rb") as f:
for line in f:
s.update(line)
return s.hexdigest()
return _hasher(hashlib.sha256(), filename)
def sha1_file(filename):
"""
Return the hex string representation of the SHA1 checksum of the filename
"""
import hashlib
s = hashlib.sha1()
with open(filename, "rb") as f:
for line in f:
s.update(line)
return s.hexdigest()
return _hasher(hashlib.sha1(), filename)
def preserved_envvars_exported():
"""Variables which are taken from the environment and placed in and exported

View File

@@ -243,6 +243,7 @@ class PRServer(SimpleXMLRPCServer):
try:
pid = os.fork()
if pid > 0:
self.socket.close() # avoid ResourceWarning in parent
return pid
except OSError as e:
raise Exception("%s [%d]" % (e.strerror, e.errno))
@@ -449,29 +450,35 @@ class PRServiceConfigError(Exception):
def auto_start(d):
global singleton
# Shutdown any existing PR Server
auto_shutdown()
host_params = list(filter(None, (d.getVar('PRSERV_HOST') or '').split(':')))
if not host_params:
# Shutdown any existing PR Server
auto_shutdown()
return None
if len(host_params) != 2:
# Shutdown any existing PR Server
auto_shutdown()
logger.critical('\n'.join(['PRSERV_HOST: incorrect format',
'Usage: PRSERV_HOST = "<hostname>:<port>"']))
raise PRServiceConfigError
if is_local_special(host_params[0], int(host_params[1])) and not singleton:
if is_local_special(host_params[0], int(host_params[1])):
import bb.utils
cachedir = (d.getVar("PERSISTENT_DIR") or d.getVar("CACHE"))
if not cachedir:
logger.critical("Please set the 'PERSISTENT_DIR' or 'CACHE' variable")
raise PRServiceConfigError
bb.utils.mkdirhier(cachedir)
dbfile = os.path.join(cachedir, "prserv.sqlite3")
logfile = os.path.join(cachedir, "prserv.log")
singleton = PRServSingleton(os.path.abspath(dbfile), os.path.abspath(logfile), ("localhost",0))
singleton.start()
if singleton:
if singleton.dbfile != dbfile:
# Shutdown any existing PR Server as doesn't match config
auto_shutdown()
if not singleton:
bb.utils.mkdirhier(cachedir)
singleton = PRServSingleton(os.path.abspath(dbfile), os.path.abspath(logfile), ("localhost",0))
singleton.start()
if singleton:
host, port = singleton.getinfo()
else:

View File

@@ -132,9 +132,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>

View File

@@ -2349,7 +2349,7 @@
Most software provides some means of setting build-time
configuration options before compilation.
Typically, setting these options is accomplished by running a
configure script with some options, or by modifying a build
configure script with options, or by modifying a build
configuration file.
<note>
As of Yocto Project Release 1.7, some of the core recipes
@@ -2389,6 +2389,7 @@
software is built using Autotools.
If this is the case, you just need to worry about
modifying the configuration.</para>
<para>When using Autotools, your recipe needs to inherit
the
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
@@ -2401,13 +2402,15 @@
or
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
to pass any needed configure options that are specific
to the recipe.</para></listitem>
to the recipe.
</para></listitem>
<listitem><para><emphasis>CMake:</emphasis>
If your source files have a
<filename>CMakeLists.txt</filename> file, then your
software is built using CMake.
If this is the case, you just need to worry about
modifying the configuration.</para>
<para>When you use CMake, your recipe needs to inherit
the
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-cmake'><filename>cmake</filename></ulink>
@@ -2417,7 +2420,16 @@
You can make some adjustments by setting
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></ulink>
to pass any needed configure options that are specific
to the recipe.</para></listitem>
to the recipe.
<note>
If you need to install one or more custom CMake
toolchain files that are supplied by the
application you are building, install the files to
<filename>${D}${datadir}/cmake/</filename> Modules
during
<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>.
</note>
</para></listitem>
<listitem><para><emphasis>Other:</emphasis>
If your source files do not have a
<filename>configure.ac</filename> or
@@ -2780,6 +2792,14 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></ulink>
for additional information.
</para></listitem>
<listitem><para>
If you need to install one or more custom CMake
toolchain files that are supplied by the
application you are building, install the files to
<filename>${D}${datadir}/cmake/</filename> Modules
during
<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>.
</para></listitem>
</itemizedlist>
</note>
</section>
@@ -5420,12 +5440,16 @@
<literallayout class='monospaced'>
BBMULTICONFIG = "x86 arm"
</literallayout>
</para>
<para>Please note, that a "default" configuration already exists by definition,
this configuration is named: "" (empty string) and is defined by the variables
coming from your local.conf file. So, the previous example actually adds two
additional configurations to your build "arm" and "x86" along with "".
<note>
A "default" configuration already exists by
definition.
This configuration is named: "" (i.e. empty
string) and is defined by the variables coming
from your <filename>local.conf</filename> file.
Consequently, the previous example actually
adds two additional configurations to your
build: "arm" and "x86" along with "".
</note>
</para></listitem>
<listitem><para>
<emphasis>Launch BitBake</emphasis>:
@@ -5445,9 +5469,10 @@
<filename>x86.conf</filename> configuration file,
a <filename>core-image-sato</filename>
image that is configured through the
<filename>arm.conf</filename> configuration file and a
<filename>core-image-base</filename> that is configured
through your <filename>local.conf</filename> configuration file.
<filename>arm.conf</filename> configuration file
and a <filename>core-image-base</filename> that is
configured through your
<filename>local.conf</filename> configuration file.
</para></listitem>
</itemizedlist>
<note>
@@ -10819,6 +10844,47 @@
features that are used by many distributions.
</para>
<para>
By default, the Yocto Project uses SysVinit as the initialization
manager.
However, support also exists for systemd,
which is a full replacement for init with
parallel starting of services, reduced shell overhead and other
features that are used by many distributions.
</para>
<para>
Within the system, SysVinit treats system components as services.
These services are maintained as shell scripts stored in the
<filename>/etc/init.d/</filename> directory.
Services organize into different run levels.
This organization is maintained by putting links to the services
in the <filename>/etc/rcN.d/</filename> directories, where
<replaceable>N/</replaceable> is one of the following options:
"S", "0", "1", "2", "3", "4", "5", or "6".
<note>
Each runlevel has a dependency on the previous runlevel.
This dependency allows the services to work properly.
</note>
</para>
<para>
In comparison, systemd treats components as units.
Using units is a broader concept as compared to using a service.
A unit includes several different types of entities.
Service is one of the types of entities.
The runlevel concept in SysVinit corresponds to the concept of a
target in systemd, where target is also a type of supported unit.
</para>
<para>
In a SysVinit-based system, services load sequentially (i.e. one
by one) during and parallelization is not supported.
With systemd, services start in parallel.
Needless to say, the method can have an impact on system startup
performance.
</para>
<para>
If you want to use SysVinit, you do
not have to do anything.

View File

@@ -117,9 +117,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>

View File

@@ -549,9 +549,9 @@
<literallayout class='monospaced'>
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append += "file://<replaceable>patch-file-one</replaceable>"
SRC_URI_append += "file://<replaceable>patch-file-two</replaceable>"
SRC_URI_append += "file://<replaceable>patch-file-three</replaceable>"
SRC_URI_append = " file://<replaceable>patch-file-one</replaceable>"
SRC_URI_append = " file://<replaceable>patch-file-two</replaceable>"
SRC_URI_append = " file://<replaceable>patch-file-three</replaceable>"
</literallayout>
The
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>

View File

@@ -102,9 +102,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>

View File

@@ -88,9 +88,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>
@@ -332,22 +332,22 @@
</para>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml"/>
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml"/>
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml"/>
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml"/>
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml"/>
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml"/>
xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml"/>
</book>

View File

@@ -47,9 +47,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>

View File

@@ -1,14 +1,14 @@
<!ENTITY DISTRO "2.8">
<!ENTITY DISTRO_COMPRESSED "28">
<!ENTITY DISTRO "3.0">
<!ENTITY DISTRO_COMPRESSED "30">
<!ENTITY DISTRO_NAME_NO_CAP "zeus">
<!ENTITY DISTRO_NAME "Zeus">
<!ENTITY DISTRO_NAME_NO_CAP_MINUS_ONE "warrior">
<!ENTITY DISTRO_NAME_MINUS_ONE "Warrior">
<!ENTITY YOCTO_DOC_VERSION "2.8">
<!ENTITY YOCTO_DOC_VERSION "3.0">
<!ENTITY YOCTO_DOC_VERSION_MINUS_ONE "2.7">
<!ENTITY DISTRO_REL_TAG "yocto-2.8">
<!ENTITY DISTRO_REL_TAG "yocto-3.0">
<!ENTITY METAINTELVERSION "9.0">
<!ENTITY REL_MONTH_YEAR "TBD">
<!ENTITY REL_MONTH_YEAR "October 2019">
<!ENTITY META_INTEL_REL_TAG "&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;">
<!ENTITY POKYVERSION "22.0.0">
<!ENTITY POKYVERSION_COMPRESSED "2200">

View File

@@ -102,9 +102,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>

View File

@@ -2103,10 +2103,9 @@
</para>
<para>
Additionally, a
<link linkend='ref-classes-bluetooth'><filename>bluetooth</filename></link>
class has been added to make selection of the appropriate bluetooth
support within a recipe a little easier.
Additionally, a <filename>bluetooth</filename> class has been added
to make selection of the appropriate bluetooth support within a
recipe a little easier.
If you wish to make use of this class in a recipe, add something
such as the following:
<literallayout class='monospaced'>
@@ -4740,7 +4739,7 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
<para>
This section provides information about packaging changes that have
ocurred:
occurred:
<itemizedlist>
<listitem><para>
<emphasis><filename>python3</filename> Changes:</emphasis>
@@ -6597,6 +6596,505 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
</para>
</section>
</section>
<section id='moving-to-the-yocto-project-3.0-release'>
<title>Moving to the Yocto Project 3.0 Release</title>
<para>
This section provides migration information for moving to the
Yocto Project 3.0 Release from the prior release.
</para>
<section id='migration-3.0-init-system-selection'>
<title>Init System Selection</title>
<para>
Changing the init system manager previously required setting a
number of different variables.
You can now change the manager by setting the
<filename>INIT_MANAGER</filename> variable and the corresponding
include files
(i.e. <filename>conf/distro/include/init-manager-*.conf</filename>).
Include files are provided for four values: "none", "sysvinit",
"systemd", and "mdev-busybox".
The default value, "none", for <filename>INIT_MANAGER</filename>
should allow your current settings to continue working.
However, it is advisable to explicitly set
<filename>INIT_MANAGER</filename>.
</para>
</section>
<section id='migration-3.0-lsb-support-removed'>
<title>LSB Support Removed</title>
<para>
Linux Standard Base (LSB) as a standard is not current, and
is not well suited for embedded applications.
Support can be continued in a separate layer if needed.
However, presently LSB support has been removed from the core.
</para>
<para>
As a result of this change, the <filename>poky-lsb</filename>
derivative distribution configuration that was also used for
testing alternative configurations has been replaced with a
<filename>poky-altcfg</filename> distribution that has LSB
parts removed.
</para>
</section>
<section id='migration-3.0-removed-recipes'>
<title>Removed Recipes</title>
<para>
The following recipes have been removed.
<itemizedlist>
<listitem><para>
<filename>core-image-lsb-dev</filename>: Part of removed
LSB support.
</para></listitem>
<listitem><para>
<filename>core-image-lsb</filename>: Part of removed
LSB support.
</para></listitem>
<listitem><para>
<filename>core-image-lsb-sdk</filename>: Part of removed
LSB support.
</para></listitem>
<listitem><para>
<filename>cve-check-tool</filename>: Functionally replaced
by the <filename>cve-update-db</filename> recipe and
<filename>cve-check</filename> class.
</para></listitem>
<listitem><para>
<filename>eglinfo</filename>: No longer maintained.
<filename>eglinfo</filename> from
<filename>mesa-demos</filename> is an adequate and
maintained alternative.
</para></listitem>
<listitem><para>
<filename>gcc-8.3</filename>: Version 8.3 removed.
Replaced by 9.2.
</para></listitem>
<listitem><para>
<filename>gnome-themes-standard</filename>: Only needed
by gtk+ 2.x, which has been removed.
</para></listitem>
<listitem><para>
<filename>gtk+</filename>: GTK+ 2 is obsolete and has been
replaced by gtk+3.
</para></listitem>
<listitem><para>
<filename>irda-utils</filename>: Has become obsolete.
IrDA support has been removed from the Linux kernel in
version 4.17 and later.
</para></listitem>
<listitem><para>
<filename>libnewt-python</filename>:
<filename>libnewt</filename> Python support merged into
main <filename>libnewt</filename> recipe.
</para></listitem>
<listitem><para>
<filename>libsdl</filename>: Replaced by newer
<filename>libsdl2</filename>.
</para></listitem>
<listitem><para>
<filename>libx11-diet</filename>: Became obsolete.
</para></listitem>
<listitem><para>
<filename>libxx86dga</filename>: Removed obsolete client
library.
</para></listitem>
<listitem><para>
<filename>libxx86misc</filename>: Removed. Library is
redundant.
</para></listitem>
<listitem><para>
<filename>linux-yocto</filename>: Version 5.0 removed,
which is now redundant (5.2 / 4.19 present).
</para></listitem>
<listitem><para>
<filename>lsbinitscripts</filename>: Part of removed LSB
support.
</para></listitem>
<listitem><para>
<filename>lsb</filename>: Part of removed LSB support.
</para></listitem>
<listitem><para>
<filename>lsbtest</filename>: Part of removed LSB support.
</para></listitem>
<listitem><para>
<filename>openssl10</filename>: Replaced by newer
<filename>openssl</filename> version 1.1.
</para></listitem>
<listitem><para>
<filename>packagegroup-core-lsb</filename>: Part of removed
LSB support.
</para></listitem>
<listitem><para>
<filename>python-nose</filename>: Removed the Python 2.x
version of the recipe.
</para></listitem>
<listitem><para>
<filename>python-numpy</filename>: Removed the Python 2.x
version of the recipe.
</para></listitem>
<listitem><para>
<filename>python-scons</filename>: Removed the Python 2.x
version of the recipe.
</para></listitem>
<listitem><para>
<filename>source-highlight</filename>: No longer needed.
</para></listitem>
<listitem><para>
<filename>stress</filename>: Replaced by
<filename>stress-ng</filename>.
</para></listitem>
<listitem><para>
<filename>vulkan</filename>: Split into
<filename>vulkan-loader</filename>,
<filename>vulkan-headers</filename>, and
<filename>vulkan-tools</filename>.
</para></listitem>
<listitem><para>
<filename>weston-conf</filename>: Functionality moved to
<filename>weston-init</filename>.
</para></listitem>
</itemizedlist>
</para>
</section>
<section id='migration-3.0-packaging-changes'>
<title>Packaging Changes</title>
<para>
The following packaging changes have occurred.
<itemizedlist>
<listitem><para>
The
<ulink url='https://en.wikipedia.org/wiki/GNOME_Web'>Epiphany</ulink>
browser has been dropped from
<filename>packagegroup-self-hosted</filename> as it has
not been needed inside
<filename>build-appliance-image</filename> for
quite some time and was causing resource problems.
</para></listitem>
<listitem><para>
<filename>libcap-ng</filename> Python support has been
moved to a separate <filename>libcap-ng-python</filename>
recipe to streamline the build process when the Python
bindings are not needed.
</para></listitem>
<listitem><para>
<filename>libdrm</filename> now packages the file
<filename>amdgpu.ids</filename> into a separate
<filename>libdrm-amdgpu</filename> package.
</para></listitem>
<listitem><para>
<filename>python3</filename>: The
<filename>runpy</filename> module is now in the
<filename>python3-core</filename> package as it is
required to support the common "python3 -m" command usage.
</para></listitem>
<listitem><para>
<filename>distcc</filename> now provides separate
<filename>distcc-client</filename> and
<filename>distcc-server</filename> packages as typically
one or the other are needed, rather than both.
</para></listitem>
<listitem><para>
<filename>python*-setuptools</filename> recipes now
separately package the <filename>pkg_resources</filename>
module in a <filename>python-pkg-resources</filename> /
<filename>python3-pkg-resources</filename> package as
the module is useful independent of the rest of the
setuptools package.
The main <filename>python-setuptools</filename> /
<filename>python3-setuptools</filename> package depends
on this new package so you should only need to update
dependencies unless you want to take advantage of the
increased granularity.
</para></listitem>
</itemizedlist>
</para>
</section>
<section id='migration-3.0-cve-checking'>
<title>CVE Checking</title>
<para>
<filename>cve-check-tool</filename> has been functionally replaced
by a new <filename>cve-update-db</filename> recipe and
functionality built into the <filename>cve-check</filename> class.
The result uses NVD JSON data feeds rather than the deprecated
XML feeds that <filename>cve-check-tool</filename> was using,
supports CVSSv3 scoring, and makes other improvements.
</para>
<para>
Additionally, the <filename>CVE_CHECK_CVE_WHITELIST</filename>
variable has been replaced by
<filename>CVE_CHECK_WHITELIST</filename>.
</para>
</section>
<section id='migration-3.0-bitbake-changes'>
<title>Bitbake Changes</title>
<para>
The following BitBake changes have occurred.
<itemizedlist>
<listitem><para>
<filename>addtask</filename> statements now properly
validate dependent tasks.
Previously, an invalid task was silently ignored.
With this change, the invalid task generates a warning.
</para></listitem>
<listitem><para>
Other invalid <filename>addtask</filename> and
<filename>deltask</filename> usages now trigger these
warnings: "multiple target tasks arguments with
addtask / deltask", and "multiple before/after clauses".
</para></listitem>
<listitem><para>
The "multiconfig" prefix is now shortened to "mc".
"multiconfig" will continue to work, however it may be
removed in a future release.
</para></listitem>
<listitem><para>
The <filename>bitbake -g</filename> command no longer
generates a <filename>recipe-depends.dot</filename> file
as the contents (i.e. a reprocessed version of
<filename>task-depends.dot</filename>) were confusing.
</para></listitem>
<listitem><para>
The <filename>bb.build.FuncFailed</filename> exception,
previously raised by
<filename>bb.build.exec_func()</filename> when certain
other exceptions have occurred, has been removed.
The real underlying exceptions will be raised instead.
If you have calls to
<filename>bb.build.exec_func()</filename> in custom classes
or <filename>tinfoil-using</filename> scripts, any
references to <filename>bb.build.FuncFailed</filename>
should be cleaned up.
</para></listitem>
<listitem><para>
Additionally, the
<filename>bb.build.exec_func()</filename> no longer accepts
the "pythonexception" parameter.
The function now always raises exceptions.
Remove this argument in any calls to
<filename>bb.build.exec_func()</filename> in custom classes
or scripts.
</para></listitem>
<listitem><para>
The
<ulink url='&YOCTO_DOCS_BB_URL;#var-bb-BB_SETSCENE_VERIFY_FUNCTION2'><filename>BB_SETSCENE_VERIFY_FUNCTION2</filename></ulink>
is no longer used.
In the unlikely event that you have any references to it,
they should be removed.
</para></listitem>
<listitem><para>
The <filename>RunQueueExecuteScenequeue</filename> and
<filename>RunQueueExecuteTasks</filename> events have been
removed since setscene tasks are now executed as part of
the normal runqueue.
Any event handling code in custom classes or scripts that
handles these two events need to be updated.
</para></listitem>
<listitem><para>
The arguments passed to functions used with
<ulink url='&YOCTO_DOCS_BB_URL;#var-bb-BB_HASHCHECK_FUNCTION'><filename>BB_HASHCHECK_FUNCTION</filename></ulink>
have changed.
If you are using your own custom hash check function, see
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40a5e193c4ba45c928fccd899415ea56b5417725'></ulink>
for details.
</para></listitem>
<listitem><para>
Task specifications in <filename>BB_TASKDEPDATA</filename>
and class implementations used in signature generator
classes now use "&lt;fn&gt;:&lt;task&gt;" everywhere rather than
the "." delimiter that was being used in some places.
This change makes it consistent with all areas in the code.
Custom signature generator classes and code that reads
<filename>BB_TASKDEPDATA</filename> need to be updated to
use ':' as a separator rather than '.'.
</para></listitem>
</itemizedlist>
</para>
</section>
<section id='migration-3.0-sanity-checks'>
<title>Sanity Checks</title>
<para>
The following sanity check changes occurred.
<itemizedlist>
<listitem><para>
<link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
is now checked for usage of two problematic items:
<itemizedlist>
<listitem><para>
"${PN}" prefix/suffix use - Warnings always appear
if ${PN} is used.
You must fix the issue regardless of whether
multiconfig or anything else that would cause
prefixing/suffixing to happen.
</para></listitem>
<listitem><para>
Github archive tarballs - these are not guaranteed
to be stable.
Consequently, it is likely that the tarballs will
be refreshed and thus the SRC_URI checksums
will fail to apply.
It is recommended that you fetch either an official
release tarball or a specific revision from the
actual Git repository instead.
</para></listitem>
</itemizedlist>
Either one of these items now trigger a warning by default.
If you wish to disable this check, remove
<filename>src-uri-bad</filename> from
<link linkend='var-WARN_QA'><filename>WARN_QA</filename></link>.
</para></listitem>
<listitem><para>
The <filename>file-rdeps</filename> runtime dependency
check no longer expands
<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
recursively as there is no mechanism to ensure they can be
fully computed, and thus races sometimes result in errors
either showing up or not.
Thus, you might now see errors for missing runtime
dependencies that were previously satisfied recursively.
Here is an example: package A contains a shell script
starting with <filename>#!/bin/bash</filename> but has no
dependency on bash.
However, package A depends on package B, which does depend
on bash.
You need to add the missing dependency or dependencies to
resolve the warning.
</para></listitem>
<listitem><para>
Setting <filename>DEPENDS_${PN}</filename> anywhere
(i.e. typically in a recipe) now triggers an error.
The error is triggered because
<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
is not a package-specific variable unlike RDEPENDS.
You should set <filename>DEPENDS</filename> instead.
</para></listitem>
<listitem><para>
systemd currently does not work well with the musl C
library because only upstream officially supports linking
the library with glibc.
Thus, a warning is shown when building systemd in
conjunction with musl.
</para></listitem>
</itemizedlist>
</para>
</section>
<section id='migration-3.0-miscellaneous-changes'>
<title>Miscellaneous Changes</title>
<para>
The following miscellaneous changes have occurred.
<itemizedlist>
<listitem><para>
The <filename>gnome</filename>
class has been removed because it now does very little.
You should update recipes that previously inherited this
class to do the following:
<literallayout class='monospaced'>
inherit gnomebase gtk-icon-cache gconf mime
</literallayout>
</para></listitem>
<listitem><para>
The
<filename>meta/recipes-kernel/linux/linux-dtb.inc</filename>
file has been removed.
This file was previously deprecated in favor of setting
<link linkend='var-KERNEL_DEVICETREE'><filename>KERNEL_DEVICETREE</filename></link>
in any kernel recipe and only produced a warning.
Remove any <filename>include</filename> or
<filename>require</filename> statements pointing to this
file.
</para></listitem>
<listitem><para>
<link linkend='var-TARGET_CFLAGS'><filename>TARGET_CFLAGS</filename></link>,
<link linkend='var-TARGET_CPPFLAGS'><filename>TARGET_CPPFLAGS</filename></link>,
<link linkend='var-TARGET_CXXFLAGS'><filename>TARGET_CXXFLAGS</filename></link>,
and
<link linkend='var-TARGET_LDFLAGS'><filename>TARGET_LDFLAGS</filename></link>
are no longer exported to the external environment.
This change did not require any changes to core recipes,
which is a good indicator that no changes will be
required.
However, if for some reason the software being built by one
of your recipes is expecting these variables to be set,
then building the recipe will fail.
In such cases, you must either export the variable or
variables in the recipe or change the scripts so that
exporting is not necessary.
</para></listitem>
<listitem><para>
You must change the host distro identifier used in
<link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
to use all lowercase characters even if it does not contain
a version number.
This change is necessary only if you are not using
<filename>uninative</filename> and
<link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>.
</para></listitem>
<listitem><para>
In the <filename>base-files</filename> recipe, writing the
hostname into <filename>/etc/hosts</filename> and
<filename>/etc/hostname</filename> is now done within the
main
<link linkend='ref-tasks-install'><filename>do_install</filename></link>
function rather than in the
<filename>do_install_basefilesissue</filename> function.
The reason for the change is because
<filename>do_install_basefilesissue</filename> is more
easily overridden without having to duplicate the hostname
functionality.
If you have done the latter (e.g. in a
<filename>base-files</filename> bbappend), then you should
remove it from your customized
<filename>do_install_basefilesissue</filename> function.
</para></listitem>
<listitem><para>
The <filename>wic --expand</filename> command now uses
commas to separate "key:value" pairs rather than hyphens.
<note>
The wic command-line help is not updated.
</note>
You must update any scripts or commands where you use
<filename>wic --expand</filename> with multiple
"key:value" pairs.
</para></listitem>
<listitem><para>
UEFI image variable settings have been moved from various
places to a central
<filename>conf/image-uefi.conf</filename>.
This change should not influence any existing configuration
as the <filename>meta/conf/image-uefi.conf</filename>
in the core metadata sets defaults that can be overridden
in the same manner as before.
</para></listitem>
<listitem><para>
<filename>conf/distro/include/world-broken.inc</filename>
has been removed.
For cases where certain recipes need to be disabled when
using the musl C library, these recipes now have
<filename>COMPATIBLE_HOST_libc-musl</filename> set with a
comment that explains why.
</para></listitem>
</itemizedlist>
</para>
</section>
</section>
</chapter>
<!--
vim: expandtab tw=80 ts=4

View File

@@ -428,6 +428,14 @@
variable to specify additional configuration options to be passed
using the <filename>cmake</filename> command line.
</para>
<para>
On the occasion that you would be installing custom CMake toolchain
files supplied by the application being built, you should install them
to the preferred CMake Module directory:
<filename>${D}${datadir}/cmake/</filename> Modules during
<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>.
</para>
</section>
<section id='ref-classes-cml1'>

View File

@@ -133,9 +133,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>

View File

@@ -1349,8 +1349,8 @@
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Specifies each additional separate configuration when you are
building targets with multiple configurations.
Specifies each additional separate configuration when you
are building targets with multiple configurations.
Use this variable in your
<filename>conf/local.conf</filename> configuration file.
Specify a <replaceable>multiconfigname</replaceable> for
@@ -2182,9 +2182,10 @@
<para>
The <filename>BUSYBOX_SPLIT_SUID</filename> variable
defaults to "1", which results in a single output
defaults to "1", which results in splitting the output
executable file.
Set the variable to "0" to split the output file.
Set the variable to "0" to get a single output executable
file.
</para>
</glossdef>
</glossentry>

View File

@@ -67,9 +67,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>

View File

@@ -77,9 +77,9 @@
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
<revision>
<revnumber>2.8</revnumber>
<revnumber>3.0</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.8 Release.</revremark>
<revremark>Released with the Yocto Project 3.0 Release.</revremark>
</revision>
</revhistory>

View File

@@ -1,36 +1,36 @@
# Processes bitbake-user-manual (<word>-<word>-<word> style).
# This style is for manual three-word folders, which currently is only the BitBake User Manual.
# We used to have the "yocto-project-qs" and "poky-ref-manual" folders but no longer do.
# s@"ulink" href="http://www.yoctoproject.org/docs/2.8/[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.8/bitbake-user-manual/bitbake-user-manual.html#@"link" href="#@g
# s@"ulink" href="http://www.yoctoproject.org/docs/3.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/3.0/bitbake-user-manual/bitbake-user-manual.html#@"link" href="#@g
# Processes all other manuals (<word>-<word> style).
# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
# Here is the one-liner:
# s@"ulink" href="http://www.yoctoproject.org/docs/2.8/[a-z]*-[a-z]*/[a-z]*-[a-z]*.html#@"link" href="#@g
# s@"ulink" href="http://www.yoctoproject.org/docs/3.0/[a-z]*-[a-z]*/[a-z]*-[a-z]*.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/sdk-manual/sdk-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/bsp-guide/bsp-guide.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/dev-manual/dev-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/overview-manual/overview-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/brief-yoctoprojectqs/brief-yoctoprojectqs.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/kernel-dev/kernel-dev.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/profile-manual/profile-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/ref-manual/ref-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.8/toaster-manual/toaster-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/sdk-manual/sdk-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/bsp-guide/bsp-guide.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/dev-manual/dev-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/overview-manual/overview-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/brief-yoctoprojectqs/brief-yoctoprojectqs.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/kernel-dev/kernel-dev.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/profile-manual/profile-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/3.0/toaster-manual/toaster-manual.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.8/brief-yoctoprojectqs/brief-yoctoprojectqs.html" target="_top">Yocto Project Quick Build</a>@Yocto Project Quick Build@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/bitbake-user-manual/bitbake-user-manual.html" target="_top">BitBake User Manual</a>@BitBake User Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/dev-manual/dev-manual.html" target="_top">Yocto Project Development Tasks Manual</a>@Yocto Project Development Tasks Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/overview-manual/overview-manual.html" target="_top">Yocto Project Overview and Concepts Manual</a>@Yocto project Overview and Concepts Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/sdk-manual/sdk-manual.html" target="_top">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</a>@Yocto Project Application Development and the Extensible Software Development Kit (eSDK)@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/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.8/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.8/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.8/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.8/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/3.0/brief-yoctoprojectqs/brief-yoctoprojectqs.html" target="_top">Yocto Project Quick Build</a>@Yocto Project Quick Build@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/bitbake-user-manual/bitbake-user-manual.html" target="_top">BitBake User Manual</a>@BitBake User Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/dev-manual/dev-manual.html" target="_top">Yocto Project Development Tasks Manual</a>@Yocto Project Development Tasks Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/overview-manual/overview-manual.html" target="_top">Yocto Project Overview and Concepts Manual</a>@Yocto project Overview and Concepts Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/sdk-manual/sdk-manual.html" target="_top">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</a>@Yocto Project Application Development and the Extensible Software Development Kit (eSDK)@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.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/3.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/3.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/3.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/3.0/toaster-manual/toaster-manual.html" target="_top">Toaster User Manual</a>@Toaster User Manual@g
# Process a single, rouge occurrence of a linked reference to the Mega-Manual.
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/mega-manual/mega-manual.html" target="_top">Yocto Project Mega-Manual</a>@Yocto Project Mega-Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/mega-manual/mega-manual.html" target="_top">Yocto Project Mega-Manual</a>@Yocto Project Mega-Manual@g

View File

@@ -1,6 +1,6 @@
DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "3.0"
DISTRO_VERSION = "3.0.1"
DISTRO_CODENAME = "zeus"
SDK_VENDOR = "-pokysdk"
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"

View File

@@ -13,11 +13,6 @@ class VirglTest(OERuntimeTestCase):
@OETestDepends(['virgl.VirglTest.test_kernel_driver'])
def test_kmscube(self):
distro = oe.lsb.distro_identifier()
if distro and distro == 'centos-7':
self.skipTest('kmscube is not working when centos 7 is the host OS')
status, output = self.target.run('kmscube', timeout=30)
self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output))

View File

@@ -0,0 +1,37 @@
commit ced2ec32b657a7f52604b2e16e5d5881041c517a
Author: OpenEmbedded <oe.patch@oe>
Date: Mon Nov 18 18:43:15 2019 +0100
Backport of the NEWS file from version 1.6.0
diff --git a/doc/NEWS b/doc/NEWS
index 69793fc..fd49b1c 100644
--- a/doc/NEWS
+++ b/doc/NEWS
@@ -1,3 +1,26 @@
+1.6.0 - 15 March 2015
+ - fix lstat64 support when unavailable - separate patches supplied by
+ Ganael Laplanche and Peter Korsgaard
+ - (#1506) new option "-D" / "--delay-start" to only show bar after N
+ seconds (Damon Harper)
+ - new option "--fineta" / "-I" to show ETA as time of day rather than time
+ remaining - patch supplied by Erkki Seppälä (r147)
+ - (#1509) change ETA (--eta / -e) so that days are given if the hours
+ remaining are 24 or more (Jacek Wielemborek)
+ - (#1499) repeat read and write attempts on partial buffer fill/empty to
+ work around post-signal transfer rate drop reported by Ralf Ramsauer
+ - (#1507) do not try to calculate total size in line mode, due to bug
+ reported by Jacek Wielemborek and Michiel Van Herwegen
+ - cleanup: removed defunct RATS comments and unnecessary copyright notices
+ - clean up displayed lines when using --watchfd PID, when PID exits
+ - output errors on a new line to avoid overwriting transfer bar
+
+1.5.7 - 26 August 2014
+ - show KiB instead of incorrect kiB (Debian bug #706175)
+ - (#1284) do not gzip man page, for non-Linux OSes (Bob Friesenhahn)
+ - work around "awk" bug in tests/016-numeric-timer in decimal "," locales
+ - fix "make rpm" and "make srpm", extend "make release" to sign releases
+
1.5.3 - 4 May 2014
- remove SPLICE_F_NONBLOCK to fix problem with slow splice() (Jan Seda)

View File

@@ -3,7 +3,9 @@ LICENSE = "Artistic-2.0"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \
file://0001-Add-a-note-line-to-the-quick-reference.patch"
file://0001-Add-a-note-line-to-the-quick-reference.patch \
file://backported.patch \
"
UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"

View File

@@ -3,7 +3,9 @@ LICENSE = "Artistic-2.0"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \
file://0001-Add-a-note-line-to-the-quick-reference.patch"
file://0001-Add-a-note-line-to-the-quick-reference.patch \
file://backported.patch \
"
UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"

View File

@@ -4,7 +4,7 @@ require recipeutils-test.inc
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e"
DEPENDS += "virtual/libx11"
DEPENDS += "zlib"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -62,7 +62,7 @@ python do_cve_check () {
}
addtask cve_check after do_unpack before do_build
addtask cve_check before do_build
do_cve_check[depends] = "cve-update-db-native:do_populate_cve_db"
do_cve_check[nostamp] = "1"
@@ -70,7 +70,6 @@ python cve_check_cleanup () {
"""
Delete the file used to gather all the CVE information.
"""
bb.utils.remove(e.data.getVar("CVE_CHECK_TMP_FILE"))
}
@@ -166,7 +165,6 @@ def check_cves(d, patched_cves):
"""
Connect to the NVD database and find unpatched cves.
"""
import ast, csv, tempfile, subprocess, io
from distutils.version import LooseVersion
cves_unpatched = []
@@ -188,63 +186,74 @@ def check_cves(d, patched_cves):
cve_whitelist = d.getVar("CVE_CHECK_WHITELIST").split()
import sqlite3
db_file = d.getVar("CVE_CHECK_DB_FILE")
conn = sqlite3.connect(db_file)
db_file = d.expand("file:${CVE_CHECK_DB_FILE}?mode=ro")
conn = sqlite3.connect(db_file, uri=True)
# For each of the known product names (e.g. curl has CPEs using curl and libcurl)...
for product in products:
c = conn.cursor()
if ":" in product:
vendor, product = product.split(":", 1)
c.execute("SELECT * FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR IS ?", (product, vendor))
else:
c.execute("SELECT * FROM PRODUCTS WHERE PRODUCT IS ?", (product,))
vendor = "%"
for row in c:
cve = row[0]
version_start = row[3]
operator_start = row[4]
version_end = row[5]
operator_end = row[6]
# Find all relevant CVE IDs.
for cverow in conn.execute("SELECT DISTINCT ID FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR LIKE ?", (product, vendor)):
cve = cverow[0]
if cve in cve_whitelist:
bb.note("%s-%s has been whitelisted for %s" % (product, pv, cve))
# TODO: this should be in the report as 'whitelisted'
patched_cves.add(cve)
continue
elif cve in patched_cves:
bb.note("%s has been patched" % (cve))
else:
to_append = False
continue
vulnerable = False
for row in conn.execute("SELECT * FROM PRODUCTS WHERE ID IS ? AND PRODUCT IS ? AND VENDOR LIKE ?", (cve, product, vendor)):
(_, _, _, version_start, operator_start, version_end, operator_end) = row
#bb.debug(2, "Evaluating row " + str(row))
if (operator_start == '=' and pv == version_start):
cves_unpatched.append(cve)
vulnerable = True
else:
if operator_start:
try:
to_append_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start))
to_append_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start))
vulnerable_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start))
vulnerable_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start))
except:
bb.note("%s: Failed to compare %s %s %s for %s" %
bb.warn("%s: Failed to compare %s %s %s for %s" %
(product, pv, operator_start, version_start, cve))
to_append_start = False
vulnerable_start = False
else:
to_append_start = False
vulnerable_start = False
if operator_end:
try:
to_append_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end))
to_append_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end))
vulnerable_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end))
vulnerable_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end))
except:
bb.note("%s: Failed to compare %s %s %s for %s" %
bb.warn("%s: Failed to compare %s %s %s for %s" %
(product, pv, operator_end, version_end, cve))
to_append_end = False
vulnerable_end = False
else:
to_append_end = False
vulnerable_end = False
if operator_start and operator_end:
to_append = to_append_start and to_append_end
vulnerable = vulnerable_start and vulnerable_end
else:
to_append = to_append_start or to_append_end
vulnerable = vulnerable_start or vulnerable_end
if to_append:
if vulnerable:
bb.note("%s-%s is vulnerable to %s" % (product, pv, cve))
cves_unpatched.append(cve)
bb.debug(2, "%s-%s is not patched for %s" % (product, pv, cve))
break
if not vulnerable:
bb.note("%s-%s is not vulnerable to %s" % (product, pv, cve))
# TODO: not patched but not vulnerable
patched_cves.add(cve)
conn.close()
return (list(patched_cves), cves_unpatched)
@@ -252,31 +261,23 @@ def check_cves(d, patched_cves):
def get_cve_info(d, cves):
"""
Get CVE information from the database.
Unfortunately the only way to get CVE info is set the output to
html (hard to parse) or query directly the database.
"""
try:
import sqlite3
except ImportError:
from pysqlite2 import dbapi2 as sqlite3
import sqlite3
cve_data = {}
db_file = d.getVar("CVE_CHECK_DB_FILE")
placeholder = ",".join("?" * len(cves))
query = "SELECT * FROM NVD WHERE id IN (%s)" % placeholder
conn = sqlite3.connect(db_file)
cur = conn.cursor()
for row in cur.execute(query, tuple(cves)):
cve_data[row[0]] = {}
cve_data[row[0]]["summary"] = row[1]
cve_data[row[0]]["scorev2"] = row[2]
cve_data[row[0]]["scorev3"] = row[3]
cve_data[row[0]]["modified"] = row[4]
cve_data[row[0]]["vector"] = row[5]
conn.close()
conn = sqlite3.connect(d.getVar("CVE_CHECK_DB_FILE"))
for cve in cves:
for row in conn.execute("SELECT * FROM NVD WHERE ID IS ?", (cve,)):
cve_data[row[0]] = {}
cve_data[row[0]]["summary"] = row[1]
cve_data[row[0]]["scorev2"] = row[2]
cve_data[row[0]]["scorev3"] = row[3]
cve_data[row[0]]["modified"] = row[4]
cve_data[row[0]]["vector"] = row[5]
conn.close()
return cve_data
def cve_write_data(d, patched, unpatched, cve_data):

View File

@@ -356,17 +356,6 @@ set_icecc_env() {
return
fi
# Create symlinks to icecc in the recipe-sysroot directory
mkdir -p ${ICE_PATH}
if [ -n "${KERNEL_CC}" ]; then
compilers="${@get_cross_kernel_cc(bb,d)}"
else
compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++"
fi
for compiler in $compilers; do
ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler
done
ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}"
ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}"
# cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix
@@ -385,6 +374,26 @@ set_icecc_env() {
return
fi
# Create symlinks to icecc and wrapper-scripts in the recipe-sysroot directory
mkdir -p $ICE_PATH/symlinks
if [ -n "${KERNEL_CC}" ]; then
compilers="${@get_cross_kernel_cc(bb,d)}"
else
compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++"
fi
for compiler in $compilers; do
ln -sf $ICECC_BIN $ICE_PATH/symlinks/$compiler
rm -f $ICE_PATH/$compiler
cat <<-__EOF__ > $ICE_PATH/$compiler
#!/bin/sh -e
export ICECC_VERSION=$ICECC_VERSION
export ICECC_CC=$ICECC_CC
export ICECC_CXX=$ICECC_CXX
$ICE_PATH/symlinks/$compiler "\$@"
__EOF__
chmod 775 $ICE_PATH/$compiler
done
ICECC_AS="`${ICECC_CC} -print-prog-name=as`"
# for target recipes should return something like:
# /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as
@@ -417,7 +426,6 @@ set_icecc_env() {
export CCACHE_PATH="$PATH"
export CCACHE_DISABLE="1"
export ICECC_VERSION ICECC_CC ICECC_CXX
export PATH="$ICE_PATH:$PATH"
bbnote "Using icecc path: $ICE_PATH"

View File

@@ -64,6 +64,15 @@ do_rm_work () {
mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"`
i=dummy
;;
*do_image_qa_setscene*)
# Ensure we don't 'stack' setscene extensions to this stamp with the section below
i=dummy
;;
*do_image_qa*)
# Promote do_image_qa stamps to setscene versions (ahead of *do_image* below)
mv $i `echo $i | sed -e "s#do_image_qa#do_image_qa_setscene#"`
i=dummy
;;
*do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*)
i=dummy
;;

View File

@@ -523,6 +523,7 @@ def check_wsl(d):
# Tar version 1.24 and onwards handle overwriting symlinks correctly
# but earlier versions do not; this needs to work properly for sstate
# Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled
def check_tar_version(sanity_data):
from distutils.version import LooseVersion
import subprocess
@@ -532,7 +533,9 @@ def check_tar_version(sanity_data):
return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output)
version = result.split()[3]
if LooseVersion(version) < LooseVersion("1.24"):
return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n"
return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar (1.28+).\n"
if LooseVersion(version) < LooseVersion("1.28"):
return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the projects buildtools-tarball from our last release).\n"
return None
# We use git parameters and functionality only found in 1.7.8 or later
@@ -798,6 +801,11 @@ def check_sanity_everybuild(status, d):
elif d.getVar('SDK_ARCH', False) == "${BUILD_ARCH}":
status.addresult('SDKMACHINE is set, but SDK_ARCH has not been changed as a result - SDKMACHINE may have been set too late (e.g. in the distro configuration)\n')
# If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early
sdkvendor = d.getVar("SDK_VENDOR")
if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1):
status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash\n")
check_supported_distro(d)
omask = os.umask(0o022)

View File

@@ -45,7 +45,7 @@ python uninative_event_fetchloader() {
tarballdir = os.path.join(d.getVar("UNINATIVE_DLDIR"), chksum)
tarballpath = os.path.join(tarballdir, tarball)
if not os.path.exists(tarballpath):
if not os.path.exists(tarballpath + ".done"):
bb.utils.mkdirhier(tarballdir)
if d.getVar("UNINATIVE_URL") == "unset":
bb.fatal("Uninative selected but not configured, please set UNINATIVE_URL")

View File

@@ -15,10 +15,6 @@ DISABLE_STATIC_pn-nativesdk-libcap = ""
DISABLE_STATIC_pn-libpcap = ""
# needed by gdb
DISABLE_STATIC_pn-readline = ""
# needed by pseudo
DISABLE_STATIC_pn-sqlite3 = ""
DISABLE_STATIC_pn-sqlite3-native = ""
DISABLE_STATIC_pn-nativesdk-sqlite3 = ""
# openjade/sgml-common have build issues without static libs
DISABLE_STATIC_pn-sgml-common-native = ""
DISABLE_STATIC_pn-openjade-native = ""

View File

@@ -1496,11 +1496,13 @@ class DevtoolUpgradeTests(DevtoolBase):
recipedir = os.path.dirname(oldrecipefile)
olddir = os.path.join(recipedir, recipe + '-' + oldversion)
patchfn = '0001-Add-a-note-line-to-the-quick-reference.patch'
backportedpatchfn = 'backported.patch'
self.assertExists(os.path.join(olddir, patchfn), 'Original patch file does not exist')
return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn
self.assertExists(os.path.join(olddir, backportedpatchfn), 'Backported patch file does not exist')
return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn
def test_devtool_finish_upgrade_origlayer(self):
recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade()
recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade()
# Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
self.assertIn('/meta-selftest/', recipedir)
# Try finish to the original layer
@@ -1511,14 +1513,23 @@ class DevtoolUpgradeTests(DevtoolBase):
self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish')
self.assertNotExists(oldrecipefile, 'Old recipe file should have been deleted but wasn\'t')
self.assertNotExists(os.path.join(olddir, patchfn), 'Old patch file should have been deleted but wasn\'t')
self.assertNotExists(os.path.join(olddir, backportedpatchfn), 'Old backported patch file should have been deleted but wasn\'t')
newrecipefile = os.path.join(recipedir, '%s_%s.bb' % (recipe, newversion))
newdir = os.path.join(recipedir, recipe + '-' + newversion)
self.assertExists(newrecipefile, 'New recipe file should have been copied into existing layer but wasn\'t')
self.assertExists(os.path.join(newdir, patchfn), 'Patch file should have been copied into new directory but wasn\'t')
self.assertNotExists(os.path.join(newdir, backportedpatchfn), 'Backported patch file should not have been copied into new directory but was')
self.assertExists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch'), 'New patch file should have been created but wasn\'t')
with open(newrecipefile, 'r') as f:
newcontent = f.read()
self.assertNotIn(backportedpatchfn, newcontent, "Backported patch should have been removed from the recipe but wasn't")
self.assertIn(patchfn, newcontent, "Old patch should have not been removed from the recipe but was")
self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't")
self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI")
def test_devtool_finish_upgrade_otherlayer(self):
recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade()
recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade()
# Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
self.assertIn('/meta-selftest/', recipedir)
# Try finish to a different layer - should create a bbappend
@@ -1534,10 +1545,18 @@ class DevtoolUpgradeTests(DevtoolBase):
self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish')
self.assertExists(oldrecipefile, 'Old recipe file should not have been deleted')
self.assertExists(os.path.join(olddir, patchfn), 'Old patch file should not have been deleted')
self.assertExists(os.path.join(olddir, backportedpatchfn), 'Old backported patch file should not have been deleted')
newdir = os.path.join(newrecipedir, recipe + '-' + newversion)
self.assertExists(newrecipefile, 'New recipe file should have been copied into existing layer but wasn\'t')
self.assertExists(os.path.join(newdir, patchfn), 'Patch file should have been copied into new directory but wasn\'t')
self.assertNotExists(os.path.join(newdir, backportedpatchfn), 'Backported patch file should not have been copied into new directory but was')
self.assertExists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch'), 'New patch file should have been created but wasn\'t')
with open(newrecipefile, 'r') as f:
newcontent = f.read()
self.assertNotIn(backportedpatchfn, newcontent, "Backported patch should have been removed from the recipe but wasn't")
self.assertIn(patchfn, newcontent, "Old patch should have not been removed from the recipe but was")
self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't")
self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI")
def _setup_test_devtool_finish_modify(self):
# Check preconditions

View File

@@ -5,11 +5,16 @@
from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
import bb.utils
import functools
import multiprocessing
import textwrap
import json
import unittest
import tempfile
import shutil
import stat
import os
MISSING = 'MISSING'
DIFFERENT = 'DIFFERENT'
@@ -74,6 +79,7 @@ def compare_file(reference, test, diffutils_sysroot):
class ReproducibleTests(OESelftestTestCase):
package_classes = ['deb', 'ipk']
images = ['core-image-minimal']
save_results = False
def setUpLocal(self):
super().setUpLocal()
@@ -117,9 +123,18 @@ class ReproducibleTests(OESelftestTestCase):
self.extrasresults['reproducible']['files'].setdefault(package_class, {})[name] = [
{'reference': p.reference, 'test': p.test} for p in packages]
def copy_file(self, source, dest):
bb.utils.mkdirhier(os.path.dirname(dest))
shutil.copyfile(source, dest)
def test_reproducible_builds(self):
capture_vars = ['DEPLOY_DIR_' + c.upper() for c in self.package_classes]
if self.save_results:
save_dir = tempfile.mkdtemp(prefix='oe-reproducible-')
os.chmod(save_dir, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
self.logger.info('Non-reproducible packages will be copied to %s', save_dir)
# Build native utilities
self.write_config('')
bitbake("diffutils-native -c addto_recipe_sysroot")
@@ -176,6 +191,11 @@ class ReproducibleTests(OESelftestTestCase):
self.write_package_list(package_class, 'different', result.different)
self.write_package_list(package_class, 'same', result.same)
if self.save_results:
for d in result.different:
self.copy_file(d.reference, '/'.join([save_dir, d.reference]))
self.copy_file(d.test, '/'.join([save_dir, d.test]))
if result.missing or result.different:
self.fail("The following %s packages are missing or different: %s" %
(c, ' '.join(r.test for r in (result.missing + result.different))))

View File

@@ -179,6 +179,8 @@ class TestImage(OESelftestTestCase):
distro = oe.lsb.distro_identifier()
if distro and distro == 'debian-8':
self.skipTest('virgl isn\'t working with Debian 8')
if distro and distro == 'centos-7':
self.skipTest('virgl isn\'t working with Centos 7')
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
features = 'INHERIT += "testimage"\n'

View File

@@ -255,6 +255,7 @@ BUILD_ARCH = "x86_64"
BUILD_OS = "linux"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
BB_SIGNATURE_HANDLER = "OEBasicHash"
""")
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
bitbake("core-image-sato -S none")
@@ -266,6 +267,7 @@ BUILD_ARCH = "i686"
BUILD_OS = "linux"
SDKMACHINE = "i686"
PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
BB_SIGNATURE_HANDLER = "OEBasicHash"
""")
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
bitbake("core-image-sato -S none")
@@ -298,6 +300,7 @@ PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
TCLIBCAPPEND = \"\"
NATIVELSBSTRING = \"DistroA\"
BB_SIGNATURE_HANDLER = "OEBasicHash"
""")
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
bitbake("core-image-sato -S none")
@@ -305,6 +308,7 @@ NATIVELSBSTRING = \"DistroA\"
TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
TCLIBCAPPEND = \"\"
NATIVELSBSTRING = \"DistroB\"
BB_SIGNATURE_HANDLER = "OEBasicHash"
""")
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
bitbake("core-image-sato -S none")
@@ -332,11 +336,13 @@ NATIVELSBSTRING = \"DistroB\"
TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
TCLIBCAPPEND = \"\"
MACHINE = \"qemux86-64\"
BB_SIGNATURE_HANDLER = "OEBasicHash"
"""
configB = """
TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
TCLIBCAPPEND = \"\"
MACHINE = \"qemuarm\"
BB_SIGNATURE_HANDLER = "OEBasicHash"
"""
self.sstate_allarch_samesigs(configA, configB)
@@ -352,6 +358,7 @@ MACHINE = \"qemux86-64\"
require conf/multilib.conf
MULTILIBS = \"multilib:lib32\"
DEFAULTTUNE_virtclass-multilib-lib32 = \"x86\"
BB_SIGNATURE_HANDLER = "OEBasicHash"
"""
configB = """
TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
@@ -359,6 +366,7 @@ TCLIBCAPPEND = \"\"
MACHINE = \"qemuarm\"
require conf/multilib.conf
MULTILIBS = \"\"
BB_SIGNATURE_HANDLER = "OEBasicHash"
"""
self.sstate_allarch_samesigs(configA, configB)
@@ -404,6 +412,7 @@ MACHINE = \"qemux86\"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
BB_SIGNATURE_HANDLER = "OEBasicHash"
""")
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
bitbake("world meta-toolchain -S none")
@@ -414,6 +423,7 @@ MACHINE = \"qemux86copy\"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
BB_SIGNATURE_HANDLER = "OEBasicHash"
""")
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
bitbake("world meta-toolchain -S none")
@@ -452,6 +462,7 @@ TIME = "111111"
DATE = "20161111"
INHERIT_remove = "buildstats-summary buildhistory uninative"
http_proxy = ""
BB_SIGNATURE_HANDLER = "OEBasicHash"
""")
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
self.track_for_cleanup(self.topdir + "/download1")
@@ -468,6 +479,7 @@ DATE = "20161212"
INHERIT_remove = "uninative"
INHERIT += "buildstats-summary buildhistory"
http_proxy = "http://example.com/"
BB_SIGNATURE_HANDLER = "OEBasicHash"
""")
self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
self.track_for_cleanup(self.topdir + "/download2")

View File

@@ -0,0 +1,64 @@
Backport patch to fix CVE-2019-6471.
Ref:
https://security-tracker.debian.org/tracker/CVE-2019-6471
CVE: CVE-2019-6471
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/3a9c7bb]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001
From: Mark Andrews <marka@isc.org>
Date: Tue, 19 Mar 2019 14:14:21 +1100
Subject: [PATCH] move item_out test inside lock in dns_dispatch_getnext()
(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712)
---
lib/dns/dispatch.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c
index 408beda367..3278db4a07 100644
--- a/lib/dns/dispatch.c
+++ b/lib/dns/dispatch.c
@@ -134,7 +134,7 @@ struct dns_dispentry {
isc_task_t *task;
isc_taskaction_t action;
void *arg;
- bool item_out;
+ bool item_out;
dispsocket_t *dispsocket;
ISC_LIST(dns_dispatchevent_t) items;
ISC_LINK(dns_dispentry_t) link;
@@ -3422,13 +3422,14 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) {
disp = resp->disp;
REQUIRE(VALID_DISPATCH(disp));
- REQUIRE(resp->item_out == true);
- resp->item_out = false;
-
ev = *sockevent;
*sockevent = NULL;
LOCK(&disp->lock);
+
+ REQUIRE(resp->item_out == true);
+ resp->item_out = false;
+
if (ev->buffer.base != NULL)
free_buffer(disp, ev->buffer.base, ev->buffer.length);
free_devent(disp, ev);
@@ -3573,6 +3574,9 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp,
isc_task_send(disp->task[0], &disp->ctlevent);
}
+/*
+ * disp must be locked.
+ */
static void
do_cancel(dns_dispatch_t *disp) {
dns_dispatchevent_t *ev;
--
2.20.1

View File

@@ -0,0 +1,60 @@
Backport patch to fix CVE-2018-5743.
Ref:
https://security-tracker.debian.org/tracker/CVE-2018-5743
CVE: CVE-2018-5743
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/ec2d50d]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From ec2d50da8d81814640e28593d912f4b96c7efece Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
Date: Thu, 3 Jan 2019 14:17:43 +0100
Subject: [PATCH 1/6] fix enforcement of tcp-clients (v1)
tcp-clients settings could be exceeded in some cases by
creating more and more active TCP clients that are over
the set quota limit, which in the end could lead to a
DoS attack by e.g. exhaustion of file descriptors.
If TCP client we're closing went over the quota (so it's
not attached to a quota) mark it as mortal - so that it
will be destroyed and not set up to listen for new
connections - unless it's the last client for a specific
interface.
(cherry picked from commit f97131d21b97381cef72b971b157345c1f9b4115)
(cherry picked from commit 9689ffc485df8f971f0ad81ab8ab1f5389493776)
---
bin/named/client.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/bin/named/client.c b/bin/named/client.c
index d482da7121..0739dd48af 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -421,8 +421,19 @@ exit_check(ns_client_t *client) {
isc_socket_detach(&client->tcpsocket);
}
- if (client->tcpquota != NULL)
+ if (client->tcpquota != NULL) {
isc_quota_detach(&client->tcpquota);
+ } else {
+ /*
+ * We went over quota with this client, we don't
+ * want to restart listening unless this is the
+ * last client on this interface, which is
+ * checked later.
+ */
+ if (TCP_CLIENT(client)) {
+ client->mortal = true;
+ }
+ }
if (client->timerset) {
(void)isc_timer_reset(client->timer,
--
2.20.1

View File

@@ -0,0 +1,670 @@
Backport patch to fix CVE-2018-5743.
Ref:
https://security-tracker.debian.org/tracker/CVE-2018-5743
CVE: CVE-2018-5743
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/719f604]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From 719f604e3fad5b7479bd14e2fa0ef4413f0a8fdc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
Date: Fri, 4 Jan 2019 12:50:51 +0100
Subject: [PATCH 2/6] tcp-clients could still be exceeded (v2)
the TCP client quota could still be ineffective under some
circumstances. this change:
- improves quota accounting to ensure that TCP clients are
properly limited, while still guaranteeing that at least one client
is always available to serve TCP connections on each interface.
- uses more descriptive names and removes one (ntcptarget) that
was no longer needed
- adds comments
(cherry picked from commit 924651f1d5e605cd186d03f4f7340bcc54d77cc2)
(cherry picked from commit 55a7a458e30e47874d34bdf1079eb863a0512396)
---
bin/named/client.c | 311 ++++++++++++++++++++-----
bin/named/include/named/client.h | 14 +-
bin/named/include/named/interfacemgr.h | 11 +-
bin/named/interfacemgr.c | 8 +-
4 files changed, 267 insertions(+), 77 deletions(-)
diff --git a/bin/named/client.c b/bin/named/client.c
index 0739dd48af..a7b49a0f71 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -246,10 +246,11 @@ static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
dns_dispatch_t *disp, bool tcp);
static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp,
- isc_socket_t *sock);
+ isc_socket_t *sock, ns_client_t *oldclient);
static inline bool
-allowed(isc_netaddr_t *addr, dns_name_t *signer, isc_netaddr_t *ecs_addr,
- uint8_t ecs_addrlen, uint8_t *ecs_scope, dns_acl_t *acl);
+allowed(isc_netaddr_t *addr, dns_name_t *signer,
+ isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen,
+ uint8_t *ecs_scope, dns_acl_t *acl)
static void compute_cookie(ns_client_t *client, uint32_t when,
uint32_t nonce, const unsigned char *secret,
isc_buffer_t *buf);
@@ -405,8 +406,11 @@ exit_check(ns_client_t *client) {
*/
INSIST(client->recursionquota == NULL);
INSIST(client->newstate <= NS_CLIENTSTATE_READY);
- if (client->nreads > 0)
+
+ if (client->nreads > 0) {
dns_tcpmsg_cancelread(&client->tcpmsg);
+ }
+
if (client->nreads != 0) {
/* Still waiting for read cancel completion. */
return (true);
@@ -416,25 +420,58 @@ exit_check(ns_client_t *client) {
dns_tcpmsg_invalidate(&client->tcpmsg);
client->tcpmsg_valid = false;
}
+
if (client->tcpsocket != NULL) {
CTRACE("closetcp");
isc_socket_detach(&client->tcpsocket);
+
+ if (client->tcpactive) {
+ LOCK(&client->interface->lock);
+ INSIST(client->interface->ntcpactive > 0);
+ client->interface->ntcpactive--;
+ UNLOCK(&client->interface->lock);
+ client->tcpactive = false;
+ }
}
if (client->tcpquota != NULL) {
- isc_quota_detach(&client->tcpquota);
- } else {
/*
- * We went over quota with this client, we don't
- * want to restart listening unless this is the
- * last client on this interface, which is
- * checked later.
+ * If we are not in a pipeline group, or
+ * we are the last client in the group, detach from
+ * tcpquota; otherwise, transfer the quota to
+ * another client in the same group.
*/
- if (TCP_CLIENT(client)) {
- client->mortal = true;
+ if (!ISC_LINK_LINKED(client, glink) ||
+ (client->glink.next == NULL &&
+ client->glink.prev == NULL))
+ {
+ isc_quota_detach(&client->tcpquota);
+ } else if (client->glink.next != NULL) {
+ INSIST(client->glink.next->tcpquota == NULL);
+ client->glink.next->tcpquota = client->tcpquota;
+ client->tcpquota = NULL;
+ } else {
+ INSIST(client->glink.prev->tcpquota == NULL);
+ client->glink.prev->tcpquota = client->tcpquota;
+ client->tcpquota = NULL;
}
}
+ /*
+ * Unlink from pipeline group.
+ */
+ if (ISC_LINK_LINKED(client, glink)) {
+ if (client->glink.next != NULL) {
+ client->glink.next->glink.prev =
+ client->glink.prev;
+ }
+ if (client->glink.prev != NULL) {
+ client->glink.prev->glink.next =
+ client->glink.next;
+ }
+ ISC_LINK_INIT(client, glink);
+ }
+
if (client->timerset) {
(void)isc_timer_reset(client->timer,
isc_timertype_inactive,
@@ -455,15 +492,16 @@ exit_check(ns_client_t *client) {
* that already. Check whether this client needs to remain
* active and force it to go inactive if not.
*
- * UDP clients go inactive at this point, but TCP clients
- * may remain active if we have fewer active TCP client
- * objects than desired due to an earlier quota exhaustion.
+ * UDP clients go inactive at this point, but a TCP client
+ * will needs to remain active if no other clients are
+ * listening for TCP requests on this interface, to
+ * prevent this interface from going nonresponsive.
*/
if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) {
LOCK(&client->interface->lock);
- if (client->interface->ntcpcurrent <
- client->interface->ntcptarget)
+ if (client->interface->ntcpaccepting == 0) {
client->mortal = false;
+ }
UNLOCK(&client->interface->lock);
}
@@ -472,15 +510,17 @@ exit_check(ns_client_t *client) {
* queue for recycling.
*/
if (client->mortal) {
- if (client->newstate > NS_CLIENTSTATE_INACTIVE)
+ if (client->newstate > NS_CLIENTSTATE_INACTIVE) {
client->newstate = NS_CLIENTSTATE_INACTIVE;
+ }
}
if (NS_CLIENTSTATE_READY == client->newstate) {
if (TCP_CLIENT(client)) {
client_accept(client);
- } else
+ } else {
client_udprecv(client);
+ }
client->newstate = NS_CLIENTSTATE_MAX;
return (true);
}
@@ -492,41 +532,57 @@ exit_check(ns_client_t *client) {
/*
* We are trying to enter the inactive state.
*/
- if (client->naccepts > 0)
+ if (client->naccepts > 0) {
isc_socket_cancel(client->tcplistener, client->task,
ISC_SOCKCANCEL_ACCEPT);
+ }
/* Still waiting for accept cancel completion. */
- if (! (client->naccepts == 0))
+ if (! (client->naccepts == 0)) {
return (true);
+ }
/* Accept cancel is complete. */
- if (client->nrecvs > 0)
+ if (client->nrecvs > 0) {
isc_socket_cancel(client->udpsocket, client->task,
ISC_SOCKCANCEL_RECV);
+ }
/* Still waiting for recv cancel completion. */
- if (! (client->nrecvs == 0))
+ if (! (client->nrecvs == 0)) {
return (true);
+ }
/* Still waiting for control event to be delivered */
- if (client->nctls > 0)
+ if (client->nctls > 0) {
return (true);
-
- /* Deactivate the client. */
- if (client->interface)
- ns_interface_detach(&client->interface);
+ }
INSIST(client->naccepts == 0);
INSIST(client->recursionquota == NULL);
- if (client->tcplistener != NULL)
+ if (client->tcplistener != NULL) {
isc_socket_detach(&client->tcplistener);
- if (client->udpsocket != NULL)
+ if (client->tcpactive) {
+ LOCK(&client->interface->lock);
+ INSIST(client->interface->ntcpactive > 0);
+ client->interface->ntcpactive--;
+ UNLOCK(&client->interface->lock);
+ client->tcpactive = false;
+ }
+ }
+ if (client->udpsocket != NULL) {
isc_socket_detach(&client->udpsocket);
+ }
- if (client->dispatch != NULL)
+ /* Deactivate the client. */
+ if (client->interface != NULL) {
+ ns_interface_detach(&client->interface);
+ }
+
+ if (client->dispatch != NULL) {
dns_dispatch_detach(&client->dispatch);
+ }
client->attributes = 0;
client->mortal = false;
@@ -551,10 +607,13 @@ exit_check(ns_client_t *client) {
client->newstate = NS_CLIENTSTATE_MAX;
if (!ns_g_clienttest && manager != NULL &&
!manager->exiting)
+ {
ISC_QUEUE_PUSH(manager->inactive, client,
ilink);
- if (client->needshutdown)
+ }
+ if (client->needshutdown) {
isc_task_shutdown(client->task);
+ }
return (true);
}
}
@@ -675,7 +734,6 @@ client_start(isc_task_t *task, isc_event_t *event) {
}
}
-
/*%
* The client's task has received a shutdown event.
*/
@@ -2507,17 +2565,12 @@ client_request(isc_task_t *task, isc_event_t *event) {
/*
* Pipeline TCP query processing.
*/
- if (client->message->opcode != dns_opcode_query)
+ if (client->message->opcode != dns_opcode_query) {
client->pipelined = false;
+ }
if (TCP_CLIENT(client) && client->pipelined) {
- result = isc_quota_reserve(&ns_g_server->tcpquota);
- if (result == ISC_R_SUCCESS)
- result = ns_client_replace(client);
+ result = ns_client_replace(client);
if (result != ISC_R_SUCCESS) {
- ns_client_log(client, NS_LOGCATEGORY_CLIENT,
- NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
- "no more TCP clients(read): %s",
- isc_result_totext(result));
client->pipelined = false;
}
}
@@ -3087,6 +3140,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->filter_aaaa = dns_aaaa_ok;
#endif
client->needshutdown = ns_g_clienttest;
+ client->tcpactive = false;
ISC_EVENT_INIT(&client->ctlevent, sizeof(client->ctlevent), 0, NULL,
NS_EVENT_CLIENTCONTROL, client_start, client, client,
@@ -3100,6 +3154,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->formerrcache.id = 0;
ISC_LINK_INIT(client, link);
ISC_LINK_INIT(client, rlink);
+ ISC_LINK_INIT(client, glink);
ISC_QLINK_INIT(client, ilink);
client->keytag = NULL;
client->keytag_len = 0;
@@ -3193,12 +3248,19 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
INSIST(client->state == NS_CLIENTSTATE_READY);
+ /*
+ * The accept() was successful and we're now establishing a new
+ * connection. We need to make note of it in the client and
+ * interface objects so client objects can do the right thing
+ * when going inactive in exit_check() (see comments in
+ * client_accept() for details).
+ */
INSIST(client->naccepts == 1);
client->naccepts--;
LOCK(&client->interface->lock);
- INSIST(client->interface->ntcpcurrent > 0);
- client->interface->ntcpcurrent--;
+ INSIST(client->interface->ntcpaccepting > 0);
+ client->interface->ntcpaccepting--;
UNLOCK(&client->interface->lock);
/*
@@ -3232,6 +3294,9 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
"accept failed: %s",
isc_result_totext(nevent->result));
+ if (client->tcpquota != NULL) {
+ isc_quota_detach(&client->tcpquota);
+ }
}
if (exit_check(client))
@@ -3270,18 +3335,12 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
* deny service to legitimate TCP clients.
*/
client->pipelined = false;
- result = isc_quota_attach(&ns_g_server->tcpquota,
- &client->tcpquota);
- if (result == ISC_R_SUCCESS)
- result = ns_client_replace(client);
- if (result != ISC_R_SUCCESS) {
- ns_client_log(client, NS_LOGCATEGORY_CLIENT,
- NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
- "no more TCP clients(accept): %s",
- isc_result_totext(result));
- } else if (ns_g_server->keepresporder == NULL ||
- !allowed(&netaddr, NULL, NULL, 0, NULL,
- ns_g_server->keepresporder)) {
+ result = ns_client_replace(client);
+ if (result == ISC_R_SUCCESS &&
+ (client->sctx->keepresporder == NULL ||
+ !allowed(&netaddr, NULL, NULL, 0, NULL,
+ ns_g_server->keepresporder)))
+ {
client->pipelined = true;
}
@@ -3298,12 +3357,80 @@ client_accept(ns_client_t *client) {
CTRACE("accept");
+ /*
+ * The tcpquota object can only be simultaneously referenced a
+ * pre-defined number of times; this is configured by 'tcp-clients'
+ * in named.conf. If we can't attach to it here, that means the TCP
+ * client quota has been exceeded.
+ */
+ result = isc_quota_attach(&client->sctx->tcpquota,
+ &client->tcpquota);
+ if (result != ISC_R_SUCCESS) {
+ bool exit;
+
+ ns_client_log(client, NS_LOGCATEGORY_CLIENT,
+ NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
+ "no more TCP clients: %s",
+ isc_result_totext(result));
+
+ /*
+ * We have exceeded the system-wide TCP client
+ * quota. But, we can't just block this accept
+ * in all cases, because if we did, a heavy TCP
+ * load on other interfaces might cause this
+ * interface to be starved, with no clients able
+ * to accept new connections.
+ *
+ * So, we check here to see if any other client
+ * is already servicing TCP queries on this
+ * interface (whether accepting, reading, or
+ * processing).
+ *
+ * If so, then it's okay *not* to call
+ * accept - we can let this client to go inactive
+ * and the other one handle the next connection
+ * when it's ready.
+ *
+ * But if not, then we need to be a little bit
+ * flexible about the quota. We allow *one* extra
+ * TCP client through, to ensure we're listening on
+ * every interface.
+ *
+ * (Note: In practice this means that the *real*
+ * TCP client quota is tcp-clients plus the number
+ * of interfaces.)
+ */
+ LOCK(&client->interface->lock);
+ exit = (client->interface->ntcpactive > 0);
+ UNLOCK(&client->interface->lock);
+
+ if (exit) {
+ client->newstate = NS_CLIENTSTATE_INACTIVE;
+ (void)exit_check(client);
+ return;
+ }
+ }
+
+ /*
+ * By incrementing the interface's ntcpactive counter we signal
+ * that there is at least one client servicing TCP queries for the
+ * interface.
+ *
+ * We also make note of the fact in the client itself with the
+ * tcpactive flag. This ensures proper accounting by preventing
+ * us from accidentally incrementing or decrementing ntcpactive
+ * more than once per client object.
+ */
+ if (!client->tcpactive) {
+ LOCK(&client->interface->lock);
+ client->interface->ntcpactive++;
+ UNLOCK(&client->interface->lock);
+ client->tcpactive = true;
+ }
+
result = isc_socket_accept(client->tcplistener, client->task,
client_newconn, client);
if (result != ISC_R_SUCCESS) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_socket_accept() failed: %s",
- isc_result_totext(result));
/*
* XXXRTH What should we do? We're trying to accept but
* it didn't work. If we just give up, then TCP
@@ -3311,12 +3438,39 @@ client_accept(ns_client_t *client) {
*
* For now, we just go idle.
*/
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "isc_socket_accept() failed: %s",
+ isc_result_totext(result));
+ if (client->tcpquota != NULL) {
+ isc_quota_detach(&client->tcpquota);
+ }
return;
}
+
+ /*
+ * The client's 'naccepts' counter indicates that this client has
+ * called accept() and is waiting for a new connection. It should
+ * never exceed 1.
+ */
INSIST(client->naccepts == 0);
client->naccepts++;
+
+ /*
+ * The interface's 'ntcpaccepting' counter is incremented when
+ * any client calls accept(), and decremented in client_newconn()
+ * once the connection is established.
+ *
+ * When the client object is shutting down after handling a TCP
+ * request (see exit_check()), it looks to see whether this value is
+ * non-zero. If so, that means another client has already called
+ * accept() and is waiting to establish the next connection, which
+ * means the first client is free to go inactive. Otherwise,
+ * the first client must come back and call accept() again; this
+ * guarantees there will always be at least one client listening
+ * for new TCP connections on each interface.
+ */
LOCK(&client->interface->lock);
- client->interface->ntcpcurrent++;
+ client->interface->ntcpaccepting++;
UNLOCK(&client->interface->lock);
}
@@ -3390,13 +3544,14 @@ ns_client_replace(ns_client_t *client) {
tcp = TCP_CLIENT(client);
if (tcp && client->pipelined) {
result = get_worker(client->manager, client->interface,
- client->tcpsocket);
+ client->tcpsocket, client);
} else {
result = get_client(client->manager, client->interface,
client->dispatch, tcp);
}
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS) {
return (result);
+ }
/*
* The responsibility for listening for new requests is hereby
@@ -3585,6 +3740,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
client->attributes |= NS_CLIENTATTR_TCP;
isc_socket_attach(ifp->tcpsocket,
&client->tcplistener);
+
} else {
isc_socket_t *sock;
@@ -3602,7 +3758,8 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
}
static isc_result_t
-get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
+get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock,
+ ns_client_t *oldclient)
{
isc_result_t result = ISC_R_SUCCESS;
isc_event_t *ev;
@@ -3610,6 +3767,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
MTRACE("get worker");
REQUIRE(manager != NULL);
+ REQUIRE(oldclient != NULL);
if (manager->exiting)
return (ISC_R_SHUTTINGDOWN);
@@ -3642,7 +3800,28 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
ns_interface_attach(ifp, &client->interface);
client->newstate = client->state = NS_CLIENTSTATE_WORKING;
INSIST(client->recursionquota == NULL);
- client->tcpquota = &ns_g_server->tcpquota;
+
+ /*
+ * Transfer TCP quota to the new client.
+ */
+ INSIST(client->tcpquota == NULL);
+ INSIST(oldclient->tcpquota != NULL);
+ client->tcpquota = oldclient->tcpquota;
+ oldclient->tcpquota = NULL;
+
+ /*
+ * Link to a pipeline group, creating it if needed.
+ */
+ if (!ISC_LINK_LINKED(oldclient, glink)) {
+ oldclient->glink.next = NULL;
+ oldclient->glink.prev = NULL;
+ }
+ client->glink.next = oldclient->glink.next;
+ client->glink.prev = oldclient;
+ if (oldclient->glink.next != NULL) {
+ oldclient->glink.next->glink.prev = client;
+ }
+ oldclient->glink.next = client;
client->dscp = ifp->dscp;
@@ -3656,6 +3835,12 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
(void)isc_socket_getpeername(client->tcpsocket, &client->peeraddr);
client->peeraddr_valid = true;
+ LOCK(&client->interface->lock);
+ client->interface->ntcpactive++;
+ UNLOCK(&client->interface->lock);
+
+ client->tcpactive = true;
+
INSIST(client->tcpmsg_valid == false);
dns_tcpmsg_init(client->mctx, client->tcpsocket, &client->tcpmsg);
client->tcpmsg_valid = true;
diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h
index b23a7b191d..1f7973f9c5 100644
--- a/bin/named/include/named/client.h
+++ b/bin/named/include/named/client.h
@@ -94,7 +94,8 @@ struct ns_client {
int nupdates;
int nctls;
int references;
- bool needshutdown; /*
+ bool tcpactive;
+ bool needshutdown; /*
* Used by clienttest to get
* the client to go from
* inactive to free state
@@ -130,9 +131,9 @@ struct ns_client {
isc_stdtime_t now;
isc_time_t tnow;
dns_name_t signername; /*%< [T]SIG key name */
- dns_name_t * signer; /*%< NULL if not valid sig */
- bool mortal; /*%< Die after handling request */
- bool pipelined; /*%< TCP queries not in sequence */
+ dns_name_t *signer; /*%< NULL if not valid sig */
+ bool mortal; /*%< Die after handling request */
+ bool pipelined; /*%< TCP queries not in sequence */
isc_quota_t *tcpquota;
isc_quota_t *recursionquota;
ns_interface_t *interface;
@@ -143,8 +144,8 @@ struct ns_client {
isc_sockaddr_t destsockaddr;
isc_netaddr_t ecs_addr; /*%< EDNS client subnet */
- uint8_t ecs_addrlen;
- uint8_t ecs_scope;
+ uint8_t ecs_addrlen;
+ uint8_t ecs_scope;
struct in6_pktinfo pktinfo;
isc_dscp_t dscp;
@@ -166,6 +167,7 @@ struct ns_client {
ISC_LINK(ns_client_t) link;
ISC_LINK(ns_client_t) rlink;
+ ISC_LINK(ns_client_t) glink;
ISC_QLINK(ns_client_t) ilink;
unsigned char cookie[8];
uint32_t expire;
diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h
index 7d1883e1e8..61b08826a6 100644
--- a/bin/named/include/named/interfacemgr.h
+++ b/bin/named/include/named/interfacemgr.h
@@ -77,9 +77,14 @@ struct ns_interface {
/*%< UDP dispatchers. */
isc_socket_t * tcpsocket; /*%< TCP socket. */
isc_dscp_t dscp; /*%< "listen-on" DSCP value */
- int ntcptarget; /*%< Desired number of concurrent
- TCP accepts */
- int ntcpcurrent; /*%< Current ditto, locked */
+ int ntcpaccepting; /*%< Number of clients
+ ready to accept new
+ TCP connections on this
+ interface */
+ int ntcpactive; /*%< Number of clients
+ servicing TCP queries
+ (whether accepting or
+ connected) */
int nudpdispatch; /*%< Number of UDP dispatches */
ns_clientmgr_t * clientmgr; /*%< Client manager. */
ISC_LINK(ns_interface_t) link;
diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c
index 419927bf54..955096ef47 100644
--- a/bin/named/interfacemgr.c
+++ b/bin/named/interfacemgr.c
@@ -386,8 +386,8 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
* connections will be handled in parallel even though there is
* only one client initially.
*/
- ifp->ntcptarget = 1;
- ifp->ntcpcurrent = 0;
+ ifp->ntcpaccepting = 0;
+ ifp->ntcpactive = 0;
ifp->nudpdispatch = 0;
ifp->dscp = -1;
@@ -522,9 +522,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
*/
(void)isc_socket_filter(ifp->tcpsocket, "dataready");
- result = ns_clientmgr_createclients(ifp->clientmgr,
- ifp->ntcptarget, ifp,
- true);
+ result = ns_clientmgr_createclients(ifp->clientmgr, 1, ifp, true);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"TCP ns_clientmgr_createclients(): %s",
--
2.20.1

View File

@@ -0,0 +1,278 @@
Backport patch to fix CVE-2018-5743.
Ref:
https://security-tracker.debian.org/tracker/CVE-2018-5743
CVE: CVE-2018-5743
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/366b4e1]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From 366b4e1ede8aed690e981e07137cb1cb77879c36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <michal@isc.org>
Date: Thu, 17 Jan 2019 15:53:38 +0100
Subject: [PATCH 3/6] use reference counter for pipeline groups (v3)
Track pipeline groups using a shared reference counter
instead of a linked list.
(cherry picked from commit 513afd33eb17d5dc41a3f0d2d38204ef8c5f6f91)
(cherry picked from commit 9446629b730c59c4215f08d37fbaf810282fbccb)
---
bin/named/client.c | 171 ++++++++++++++++++++-----------
bin/named/include/named/client.h | 2 +-
2 files changed, 110 insertions(+), 63 deletions(-)
diff --git a/bin/named/client.c b/bin/named/client.c
index a7b49a0f71..277656cef0 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -299,6 +299,75 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
}
}
+/*%
+ * Allocate a reference counter that will track the number of client structures
+ * using the TCP connection that 'client' called accept() for. This counter
+ * will be shared between all client structures associated with this TCP
+ * connection.
+ */
+static void
+pipeline_init(ns_client_t *client) {
+ isc_refcount_t *refs;
+
+ REQUIRE(client->pipeline_refs == NULL);
+
+ /*
+ * A global memory context is used for the allocation as different
+ * client structures may have different memory contexts assigned and a
+ * reference counter allocated here might need to be freed by a
+ * different client. The performance impact caused by memory context
+ * contention here is expected to be negligible, given that this code
+ * is only executed for TCP connections.
+ */
+ refs = isc_mem_allocate(client->sctx->mctx, sizeof(*refs));
+ isc_refcount_init(refs, 1);
+ client->pipeline_refs = refs;
+}
+
+/*%
+ * Increase the count of client structures using the TCP connection that
+ * 'source' is associated with and put a pointer to that count in 'target',
+ * thus associating it with the same TCP connection.
+ */
+static void
+pipeline_attach(ns_client_t *source, ns_client_t *target) {
+ int old_refs;
+
+ REQUIRE(source->pipeline_refs != NULL);
+ REQUIRE(target->pipeline_refs == NULL);
+
+ old_refs = isc_refcount_increment(source->pipeline_refs);
+ INSIST(old_refs > 0);
+ target->pipeline_refs = source->pipeline_refs;
+}
+
+/*%
+ * Decrease the count of client structures using the TCP connection that
+ * 'client' is associated with. If this is the last client using this TCP
+ * connection, free the reference counter and return true; otherwise, return
+ * false.
+ */
+static bool
+pipeline_detach(ns_client_t *client) {
+ isc_refcount_t *refs;
+ int old_refs;
+
+ REQUIRE(client->pipeline_refs != NULL);
+
+ refs = client->pipeline_refs;
+ client->pipeline_refs = NULL;
+
+ old_refs = isc_refcount_decrement(refs);
+ INSIST(old_refs > 0);
+
+ if (old_refs == 1) {
+ isc_mem_free(client->sctx->mctx, refs);
+ return (true);
+ }
+
+ return (false);
+}
+
/*%
* Check for a deactivation or shutdown request and take appropriate
* action. Returns true if either is in progress; in this case
@@ -421,6 +490,40 @@ exit_check(ns_client_t *client) {
client->tcpmsg_valid = false;
}
+ if (client->tcpquota != NULL) {
+ if (client->pipeline_refs == NULL ||
+ pipeline_detach(client))
+ {
+ /*
+ * Only detach from the TCP client quota if
+ * there are no more client structures using
+ * this TCP connection.
+ *
+ * Note that we check 'pipeline_refs' and not
+ * 'pipelined' because in some cases (e.g.
+ * after receiving a request with an opcode
+ * different than QUERY) 'pipelined' is set to
+ * false after the reference counter gets
+ * allocated in pipeline_init() and we must
+ * still drop our reference as failing to do so
+ * would prevent the reference counter itself
+ * from being freed.
+ */
+ isc_quota_detach(&client->tcpquota);
+ } else {
+ /*
+ * There are other client structures using this
+ * TCP connection, so we cannot detach from the
+ * TCP client quota to prevent excess TCP
+ * connections from being accepted. However,
+ * this client structure might later be reused
+ * for accepting new connections and thus must
+ * have its 'tcpquota' field set to NULL.
+ */
+ client->tcpquota = NULL;
+ }
+ }
+
if (client->tcpsocket != NULL) {
CTRACE("closetcp");
isc_socket_detach(&client->tcpsocket);
@@ -434,44 +537,6 @@ exit_check(ns_client_t *client) {
}
}
- if (client->tcpquota != NULL) {
- /*
- * If we are not in a pipeline group, or
- * we are the last client in the group, detach from
- * tcpquota; otherwise, transfer the quota to
- * another client in the same group.
- */
- if (!ISC_LINK_LINKED(client, glink) ||
- (client->glink.next == NULL &&
- client->glink.prev == NULL))
- {
- isc_quota_detach(&client->tcpquota);
- } else if (client->glink.next != NULL) {
- INSIST(client->glink.next->tcpquota == NULL);
- client->glink.next->tcpquota = client->tcpquota;
- client->tcpquota = NULL;
- } else {
- INSIST(client->glink.prev->tcpquota == NULL);
- client->glink.prev->tcpquota = client->tcpquota;
- client->tcpquota = NULL;
- }
- }
-
- /*
- * Unlink from pipeline group.
- */
- if (ISC_LINK_LINKED(client, glink)) {
- if (client->glink.next != NULL) {
- client->glink.next->glink.prev =
- client->glink.prev;
- }
- if (client->glink.prev != NULL) {
- client->glink.prev->glink.next =
- client->glink.next;
- }
- ISC_LINK_INIT(client, glink);
- }
-
if (client->timerset) {
(void)isc_timer_reset(client->timer,
isc_timertype_inactive,
@@ -3130,6 +3195,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
dns_name_init(&client->signername, NULL);
client->mortal = false;
client->pipelined = false;
+ client->pipeline_refs = NULL;
client->tcpquota = NULL;
client->recursionquota = NULL;
client->interface = NULL;
@@ -3154,7 +3220,6 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->formerrcache.id = 0;
ISC_LINK_INIT(client, link);
ISC_LINK_INIT(client, rlink);
- ISC_LINK_INIT(client, glink);
ISC_QLINK_INIT(client, ilink);
client->keytag = NULL;
client->keytag_len = 0;
@@ -3341,6 +3406,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
!allowed(&netaddr, NULL, NULL, 0, NULL,
ns_g_server->keepresporder)))
{
+ pipeline_init(client);
client->pipelined = true;
}
@@ -3800,35 +3866,16 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock,
ns_interface_attach(ifp, &client->interface);
client->newstate = client->state = NS_CLIENTSTATE_WORKING;
INSIST(client->recursionquota == NULL);
-
- /*
- * Transfer TCP quota to the new client.
- */
- INSIST(client->tcpquota == NULL);
- INSIST(oldclient->tcpquota != NULL);
- client->tcpquota = oldclient->tcpquota;
- oldclient->tcpquota = NULL;
-
- /*
- * Link to a pipeline group, creating it if needed.
- */
- if (!ISC_LINK_LINKED(oldclient, glink)) {
- oldclient->glink.next = NULL;
- oldclient->glink.prev = NULL;
- }
- client->glink.next = oldclient->glink.next;
- client->glink.prev = oldclient;
- if (oldclient->glink.next != NULL) {
- oldclient->glink.next->glink.prev = client;
- }
- oldclient->glink.next = client;
+ client->tcpquota = &client->sctx->tcpquota;
client->dscp = ifp->dscp;
client->attributes |= NS_CLIENTATTR_TCP;
- client->pipelined = true;
client->mortal = true;
+ pipeline_attach(oldclient, client);
+ client->pipelined = true;
+
isc_socket_attach(ifp->tcpsocket, &client->tcplistener);
isc_socket_attach(sock, &client->tcpsocket);
isc_socket_setname(client->tcpsocket, "worker-tcp", NULL);
diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h
index 1f7973f9c5..aeed9ccdda 100644
--- a/bin/named/include/named/client.h
+++ b/bin/named/include/named/client.h
@@ -134,6 +134,7 @@ struct ns_client {
dns_name_t *signer; /*%< NULL if not valid sig */
bool mortal; /*%< Die after handling request */
bool pipelined; /*%< TCP queries not in sequence */
+ isc_refcount_t *pipeline_refs;
isc_quota_t *tcpquota;
isc_quota_t *recursionquota;
ns_interface_t *interface;
@@ -167,7 +168,6 @@ struct ns_client {
ISC_LINK(ns_client_t) link;
ISC_LINK(ns_client_t) rlink;
- ISC_LINK(ns_client_t) glink;
ISC_QLINK(ns_client_t) ilink;
unsigned char cookie[8];
uint32_t expire;
--
2.20.1

View File

@@ -0,0 +1,512 @@
Backport patch to fix CVE-2018-5743.
Ref:
https://security-tracker.debian.org/tracker/CVE-2018-5743
CVE: CVE-2018-5743
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/2ab8a08]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From 2ab8a085b3c666f28f1f9229bd6ecb59915b26c3 Mon Sep 17 00:00:00 2001
From: Evan Hunt <each@isc.org>
Date: Fri, 5 Apr 2019 16:12:18 -0700
Subject: [PATCH 4/6] better tcpquota accounting and client mortality checks
- ensure that tcpactive is cleaned up correctly when accept() fails.
- set 'client->tcpattached' when the client is attached to the tcpquota.
carry this value on to new clients sharing the same pipeline group.
don't call isc_quota_detach() on the tcpquota unless tcpattached is
set. this way clients that were allowed to accept TCP connections
despite being over quota (and therefore, were never attached to the
quota) will not inadvertently detach from it and mess up the
accounting.
- simplify the code for tcpquota disconnection by using a new function
tcpquota_disconnect().
- before deciding whether to reject a new connection due to quota
exhaustion, check to see whether there are at least two active
clients. previously, this was "at least one", but that could be
insufficient if there was one other client in READING state (waiting
for messages on an open connection) but none in READY (listening
for new connections).
- before deciding whether a TCP client object can to go inactive, we
must ensure there are enough other clients to maintain service
afterward -- both accepting new connections and reading/processing new
queries. A TCP client can't shut down unless at least one
client is accepting new connections and (in the case of pipelined
clients) at least one additional client is waiting to read.
(cherry picked from commit c7394738b2445c16f728a88394864dd61baad900)
(cherry picked from commit e965d5f11d3d0f6d59704e614fceca2093cb1856)
(cherry picked from commit 87d431161450777ea093821212abfb52d51b36e3)
---
bin/named/client.c | 244 +++++++++++++++++++------------
bin/named/include/named/client.h | 3 +-
2 files changed, 152 insertions(+), 95 deletions(-)
diff --git a/bin/named/client.c b/bin/named/client.c
index 277656cef0..61e96dd28c 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -244,13 +244,14 @@ static void client_start(isc_task_t *task, isc_event_t *event);
static void client_request(isc_task_t *task, isc_event_t *event);
static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
- dns_dispatch_t *disp, bool tcp);
+ dns_dispatch_t *disp, ns_client_t *oldclient,
+ bool tcp);
static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp,
isc_socket_t *sock, ns_client_t *oldclient);
static inline bool
allowed(isc_netaddr_t *addr, dns_name_t *signer,
isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen,
- uint8_t *ecs_scope, dns_acl_t *acl)
+ uint8_t *ecs_scope, dns_acl_t *acl);
static void compute_cookie(ns_client_t *client, uint32_t when,
uint32_t nonce, const unsigned char *secret,
isc_buffer_t *buf);
@@ -319,7 +320,7 @@ pipeline_init(ns_client_t *client) {
* contention here is expected to be negligible, given that this code
* is only executed for TCP connections.
*/
- refs = isc_mem_allocate(client->sctx->mctx, sizeof(*refs));
+ refs = isc_mem_allocate(ns_g_mctx, sizeof(*refs));
isc_refcount_init(refs, 1);
client->pipeline_refs = refs;
}
@@ -331,13 +332,13 @@ pipeline_init(ns_client_t *client) {
*/
static void
pipeline_attach(ns_client_t *source, ns_client_t *target) {
- int old_refs;
+ int refs;
REQUIRE(source->pipeline_refs != NULL);
REQUIRE(target->pipeline_refs == NULL);
- old_refs = isc_refcount_increment(source->pipeline_refs);
- INSIST(old_refs > 0);
+ isc_refcount_increment(source->pipeline_refs, &refs);
+ INSIST(refs > 1);
target->pipeline_refs = source->pipeline_refs;
}
@@ -349,25 +350,51 @@ pipeline_attach(ns_client_t *source, ns_client_t *target) {
*/
static bool
pipeline_detach(ns_client_t *client) {
- isc_refcount_t *refs;
- int old_refs;
+ isc_refcount_t *refcount;
+ int refs;
REQUIRE(client->pipeline_refs != NULL);
- refs = client->pipeline_refs;
+ refcount = client->pipeline_refs;
client->pipeline_refs = NULL;
- old_refs = isc_refcount_decrement(refs);
- INSIST(old_refs > 0);
+ isc_refcount_decrement(refcount, refs);
- if (old_refs == 1) {
- isc_mem_free(client->sctx->mctx, refs);
+ if (refs == 0) {
+ isc_mem_free(ns_g_mctx, refs);
return (true);
}
return (false);
}
+/*
+ * Detach a client from the TCP client quota if appropriate, and set
+ * the quota pointer to NULL.
+ *
+ * Sometimes when the TCP client quota is exhausted but there are no other
+ * clients servicing the interface, a client will be allowed to continue
+ * running despite not having been attached to the quota. In this event,
+ * the TCP quota was never attached to the client, so when the client (or
+ * associated pipeline group) shuts down, the quota must NOT be detached.
+ *
+ * Otherwise, if the quota pointer is set, it should be detached. If not
+ * set at all, we just return without doing anything.
+ */
+static void
+tcpquota_disconnect(ns_client_t *client) {
+ if (client->tcpquota == NULL) {
+ return;
+ }
+
+ if (client->tcpattached) {
+ isc_quota_detach(&client->tcpquota);
+ client->tcpattached = false;
+ } else {
+ client->tcpquota = NULL;
+ }
+}
+
/*%
* Check for a deactivation or shutdown request and take appropriate
* action. Returns true if either is in progress; in this case
@@ -490,38 +517,31 @@ exit_check(ns_client_t *client) {
client->tcpmsg_valid = false;
}
- if (client->tcpquota != NULL) {
- if (client->pipeline_refs == NULL ||
- pipeline_detach(client))
- {
- /*
- * Only detach from the TCP client quota if
- * there are no more client structures using
- * this TCP connection.
- *
- * Note that we check 'pipeline_refs' and not
- * 'pipelined' because in some cases (e.g.
- * after receiving a request with an opcode
- * different than QUERY) 'pipelined' is set to
- * false after the reference counter gets
- * allocated in pipeline_init() and we must
- * still drop our reference as failing to do so
- * would prevent the reference counter itself
- * from being freed.
- */
- isc_quota_detach(&client->tcpquota);
- } else {
- /*
- * There are other client structures using this
- * TCP connection, so we cannot detach from the
- * TCP client quota to prevent excess TCP
- * connections from being accepted. However,
- * this client structure might later be reused
- * for accepting new connections and thus must
- * have its 'tcpquota' field set to NULL.
- */
- client->tcpquota = NULL;
- }
+ /*
+ * Detach from pipeline group and from TCP client quota,
+ * if appropriate.
+ *
+ * - If no pipeline group is active, attempt to
+ * detach from the TCP client quota.
+ *
+ * - If a pipeline group is active, detach from it;
+ * if the return code indicates that there no more
+ * clients left if this pipeline group, we also detach
+ * from the TCP client quota.
+ *
+ * - Otherwise we don't try to detach, we just set the
+ * TCP quota pointer to NULL if it wasn't NULL already.
+ *
+ * tcpquota_disconnect() will set tcpquota to NULL, either
+ * by detaching it or by assignment, depending on the
+ * needs of the client. See the comments on that function
+ * for further information.
+ */
+ if (client->pipeline_refs == NULL || pipeline_detach(client)) {
+ tcpquota_disconnect(client);
+ } else {
+ client->tcpquota = NULL;
+ client->tcpattached = false;
}
if (client->tcpsocket != NULL) {
@@ -544,8 +564,6 @@ exit_check(ns_client_t *client) {
client->timerset = false;
}
- client->pipelined = false;
-
client->peeraddr_valid = false;
client->state = NS_CLIENTSTATE_READY;
@@ -558,18 +576,27 @@ exit_check(ns_client_t *client) {
* active and force it to go inactive if not.
*
* UDP clients go inactive at this point, but a TCP client
- * will needs to remain active if no other clients are
- * listening for TCP requests on this interface, to
- * prevent this interface from going nonresponsive.
+ * may need to remain active and go into ready state if
+ * no other clients are available to listen for TCP
+ * requests on this interface or (in the case of pipelined
+ * clients) to read for additional messages on the current
+ * connection.
*/
if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) {
LOCK(&client->interface->lock);
- if (client->interface->ntcpaccepting == 0) {
+ if ((client->interface->ntcpaccepting == 0 ||
+ (client->pipelined &&
+ client->interface->ntcpactive < 2)) &&
+ client->newstate != NS_CLIENTSTATE_FREED)
+ {
client->mortal = false;
+ client->newstate = NS_CLIENTSTATE_READY;
}
UNLOCK(&client->interface->lock);
}
+ client->pipelined = false;
+
/*
* We don't need the client; send it to the inactive
* queue for recycling.
@@ -2634,6 +2661,18 @@ client_request(isc_task_t *task, isc_event_t *event) {
client->pipelined = false;
}
if (TCP_CLIENT(client) && client->pipelined) {
+ /*
+ * We're pipelining. Replace the client; the
+ * the replacement can read the TCP socket looking
+ * for new messages and this client can process the
+ * current message asynchronously.
+ *
+ * There are now at least three clients using this
+ * TCP socket - one accepting new connections,
+ * one reading an existing connection to get new
+ * messages, and one answering the message already
+ * received.
+ */
result = ns_client_replace(client);
if (result != ISC_R_SUCCESS) {
client->pipelined = false;
@@ -3197,6 +3236,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->pipelined = false;
client->pipeline_refs = NULL;
client->tcpquota = NULL;
+ client->tcpattached = false;
client->recursionquota = NULL;
client->interface = NULL;
client->peeraddr_valid = false;
@@ -3359,9 +3399,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
"accept failed: %s",
isc_result_totext(nevent->result));
- if (client->tcpquota != NULL) {
- isc_quota_detach(&client->tcpquota);
- }
+ tcpquota_disconnect(client);
}
if (exit_check(client))
@@ -3402,7 +3440,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
client->pipelined = false;
result = ns_client_replace(client);
if (result == ISC_R_SUCCESS &&
- (client->sctx->keepresporder == NULL ||
+ (ns_g_server->keepresporder == NULL ||
!allowed(&netaddr, NULL, NULL, 0, NULL,
ns_g_server->keepresporder)))
{
@@ -3429,7 +3467,7 @@ client_accept(ns_client_t *client) {
* in named.conf. If we can't attach to it here, that means the TCP
* client quota has been exceeded.
*/
- result = isc_quota_attach(&client->sctx->tcpquota,
+ result = isc_quota_attach(&ns_g_server->tcpquota,
&client->tcpquota);
if (result != ISC_R_SUCCESS) {
bool exit;
@@ -3447,27 +3485,27 @@ client_accept(ns_client_t *client) {
* interface to be starved, with no clients able
* to accept new connections.
*
- * So, we check here to see if any other client
- * is already servicing TCP queries on this
+ * So, we check here to see if any other clients
+ * are already servicing TCP queries on this
* interface (whether accepting, reading, or
- * processing).
- *
- * If so, then it's okay *not* to call
- * accept - we can let this client to go inactive
- * and the other one handle the next connection
- * when it's ready.
+ * processing). If there are at least two
+ * (one reading and one processing a request)
+ * then it's okay *not* to call accept - we
+ * can let this client go inactive and another
+ * one will resume accepting when it's done.
*
- * But if not, then we need to be a little bit
- * flexible about the quota. We allow *one* extra
- * TCP client through, to ensure we're listening on
- * every interface.
+ * If there aren't enough active clients on the
+ * interface, then we can be a little bit
+ * flexible about the quota. We'll allow *one*
+ * extra client through to ensure we're listening
+ * on every interface.
*
- * (Note: In practice this means that the *real*
- * TCP client quota is tcp-clients plus the number
- * of interfaces.)
+ * (Note: In practice this means that the real
+ * TCP client quota is tcp-clients plus the
+ * number of listening interfaces plus 2.)
*/
LOCK(&client->interface->lock);
- exit = (client->interface->ntcpactive > 0);
+ exit = (client->interface->ntcpactive > 1);
UNLOCK(&client->interface->lock);
if (exit) {
@@ -3475,6 +3513,9 @@ client_accept(ns_client_t *client) {
(void)exit_check(client);
return;
}
+
+ } else {
+ client->tcpattached = true;
}
/*
@@ -3507,9 +3548,16 @@ client_accept(ns_client_t *client) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_socket_accept() failed: %s",
isc_result_totext(result));
- if (client->tcpquota != NULL) {
- isc_quota_detach(&client->tcpquota);
+
+ tcpquota_disconnect(client);
+
+ if (client->tcpactive) {
+ LOCK(&client->interface->lock);
+ client->interface->ntcpactive--;
+ UNLOCK(&client->interface->lock);
+ client->tcpactive = false;
}
+
return;
}
@@ -3527,13 +3575,12 @@ client_accept(ns_client_t *client) {
* once the connection is established.
*
* When the client object is shutting down after handling a TCP
- * request (see exit_check()), it looks to see whether this value is
- * non-zero. If so, that means another client has already called
- * accept() and is waiting to establish the next connection, which
- * means the first client is free to go inactive. Otherwise,
- * the first client must come back and call accept() again; this
- * guarantees there will always be at least one client listening
- * for new TCP connections on each interface.
+ * request (see exit_check()), if this value is at least one, that
+ * means another client has called accept() and is waiting to
+ * establish the next connection. That means the client may be
+ * be free to become inactive; otherwise it may need to start
+ * listening for connections itself to prevent the interface
+ * going dead.
*/
LOCK(&client->interface->lock);
client->interface->ntcpaccepting++;
@@ -3613,19 +3660,19 @@ ns_client_replace(ns_client_t *client) {
client->tcpsocket, client);
} else {
result = get_client(client->manager, client->interface,
- client->dispatch, tcp);
+ client->dispatch, client, tcp);
+
+ /*
+ * The responsibility for listening for new requests is hereby
+ * transferred to the new client. Therefore, the old client
+ * should refrain from listening for any more requests.
+ */
+ client->mortal = true;
}
if (result != ISC_R_SUCCESS) {
return (result);
}
- /*
- * The responsibility for listening for new requests is hereby
- * transferred to the new client. Therefore, the old client
- * should refrain from listening for any more requests.
- */
- client->mortal = true;
-
return (ISC_R_SUCCESS);
}
@@ -3759,7 +3806,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
static isc_result_t
get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
- dns_dispatch_t *disp, bool tcp)
+ dns_dispatch_t *disp, ns_client_t *oldclient, bool tcp)
{
isc_result_t result = ISC_R_SUCCESS;
isc_event_t *ev;
@@ -3803,6 +3850,16 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
client->dscp = ifp->dscp;
if (tcp) {
+ client->tcpattached = false;
+ if (oldclient != NULL) {
+ client->tcpattached = oldclient->tcpattached;
+ }
+
+ LOCK(&client->interface->lock);
+ client->interface->ntcpactive++;
+ UNLOCK(&client->interface->lock);
+ client->tcpactive = true;
+
client->attributes |= NS_CLIENTATTR_TCP;
isc_socket_attach(ifp->tcpsocket,
&client->tcplistener);
@@ -3866,7 +3923,8 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock,
ns_interface_attach(ifp, &client->interface);
client->newstate = client->state = NS_CLIENTSTATE_WORKING;
INSIST(client->recursionquota == NULL);
- client->tcpquota = &client->sctx->tcpquota;
+ client->tcpquota = &ns_g_server->tcpquota;
+ client->tcpattached = oldclient->tcpattached;
client->dscp = ifp->dscp;
@@ -3885,7 +3943,6 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock,
LOCK(&client->interface->lock);
client->interface->ntcpactive++;
UNLOCK(&client->interface->lock);
-
client->tcpactive = true;
INSIST(client->tcpmsg_valid == false);
@@ -3913,7 +3970,8 @@ ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n,
MTRACE("createclients");
for (disp = 0; disp < n; disp++) {
- result = get_client(manager, ifp, ifp->udpdispatch[disp], tcp);
+ result = get_client(manager, ifp, ifp->udpdispatch[disp],
+ NULL, tcp);
if (result != ISC_R_SUCCESS)
break;
}
diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h
index aeed9ccdda..e2c40acd28 100644
--- a/bin/named/include/named/client.h
+++ b/bin/named/include/named/client.h
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
-/* $Id: client.h,v 1.96 2012/01/31 23:47:31 tbox Exp $ */
-
#ifndef NAMED_CLIENT_H
#define NAMED_CLIENT_H 1
@@ -136,6 +134,7 @@ struct ns_client {
bool pipelined; /*%< TCP queries not in sequence */
isc_refcount_t *pipeline_refs;
isc_quota_t *tcpquota;
+ bool tcpattached;
isc_quota_t *recursionquota;
ns_interface_t *interface;
--
2.20.1

View File

@@ -0,0 +1,911 @@
Backport patch to fix CVE-2018-5743.
Ref:
https://security-tracker.debian.org/tracker/CVE-2018-5743
CVE: CVE-2018-5743
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/c47ccf6]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From c47ccf630f147378568b33e8fdb7b754f228c346 Mon Sep 17 00:00:00 2001
From: Evan Hunt <each@isc.org>
Date: Fri, 5 Apr 2019 16:26:05 -0700
Subject: [PATCH 5/6] refactor tcpquota and pipeline refs; allow special-case
overrun in isc_quota
- if the TCP quota has been exceeded but there are no clients listening
for new connections on the interface, we can now force attachment to the
quota using isc_quota_force(), instead of carrying on with the quota not
attached.
- the TCP client quota is now referenced via a reference-counted
'ns_tcpconn' object, one of which is created whenever a client begins
listening for new connections, and attached to by members of that
client's pipeline group. when the last reference to the tcpconn
object is detached, it is freed and the TCP quota slot is released.
- reduce code duplication by adding mark_tcp_active() function.
- convert counters to atomic.
(cherry picked from commit 7e8222378ca24f1302a0c1c638565050ab04681b)
(cherry picked from commit 4939451275722bfda490ea86ca13e84f6bc71e46)
(cherry picked from commit 13f7c918b8720d890408f678bd73c20e634539d9)
---
bin/named/client.c | 444 +++++++++++--------------
bin/named/include/named/client.h | 12 +-
bin/named/include/named/interfacemgr.h | 6 +-
bin/named/interfacemgr.c | 1 +
lib/isc/include/isc/quota.h | 7 +
lib/isc/quota.c | 33 +-
lib/isc/win32/libisc.def.in | 1 +
7 files changed, 236 insertions(+), 268 deletions(-)
diff --git a/bin/named/client.c b/bin/named/client.c
index 61e96dd28c..d826ab32bf 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -244,8 +244,7 @@ static void client_start(isc_task_t *task, isc_event_t *event);
static void client_request(isc_task_t *task, isc_event_t *event);
static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
- dns_dispatch_t *disp, ns_client_t *oldclient,
- bool tcp);
+ dns_dispatch_t *disp, bool tcp);
static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp,
isc_socket_t *sock, ns_client_t *oldclient);
static inline bool
@@ -301,16 +300,32 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
}
/*%
- * Allocate a reference counter that will track the number of client structures
- * using the TCP connection that 'client' called accept() for. This counter
- * will be shared between all client structures associated with this TCP
- * connection.
+ * Allocate a reference-counted object that will maintain a single pointer to
+ * the (also reference-counted) TCP client quota, shared between all the
+ * clients processing queries on a single TCP connection, so that all
+ * clients sharing the one socket will together consume only one slot in
+ * the 'tcp-clients' quota.
*/
-static void
-pipeline_init(ns_client_t *client) {
- isc_refcount_t *refs;
+static isc_result_t
+tcpconn_init(ns_client_t *client, bool force) {
+ isc_result_t result;
+ isc_quota_t *quota = NULL;
+ ns_tcpconn_t *tconn = NULL;
- REQUIRE(client->pipeline_refs == NULL);
+ REQUIRE(client->tcpconn == NULL);
+
+ /*
+ * Try to attach to the quota first, so we won't pointlessly
+ * allocate memory for a tcpconn object if we can't get one.
+ */
+ if (force) {
+ result = isc_quota_force(&ns_g_server->tcpquota, &quota);
+ } else {
+ result = isc_quota_attach(&ns_g_server->tcpquota, &quota);
+ }
+ if (result != ISC_R_SUCCESS) {
+ return (result);
+ }
/*
* A global memory context is used for the allocation as different
@@ -320,78 +335,80 @@ pipeline_init(ns_client_t *client) {
* contention here is expected to be negligible, given that this code
* is only executed for TCP connections.
*/
- refs = isc_mem_allocate(ns_g_mctx, sizeof(*refs));
- isc_refcount_init(refs, 1);
- client->pipeline_refs = refs;
+ tconn = isc_mem_allocate(ns_g_mctx, sizeof(*tconn));
+
+ isc_refcount_init(&tconn->refs, 1);
+ tconn->tcpquota = quota;
+ quota = NULL;
+ tconn->pipelined = false;
+
+ client->tcpconn = tconn;
+
+ return (ISC_R_SUCCESS);
}
/*%
- * Increase the count of client structures using the TCP connection that
- * 'source' is associated with and put a pointer to that count in 'target',
- * thus associating it with the same TCP connection.
+ * Increase the count of client structures sharing the TCP connection
+ * that 'source' is associated with; add a pointer to the same tcpconn
+ * to 'target', thus associating it with the same TCP connection.
*/
static void
-pipeline_attach(ns_client_t *source, ns_client_t *target) {
+tcpconn_attach(ns_client_t *source, ns_client_t *target) {
int refs;
- REQUIRE(source->pipeline_refs != NULL);
- REQUIRE(target->pipeline_refs == NULL);
+ REQUIRE(source->tcpconn != NULL);
+ REQUIRE(target->tcpconn == NULL);
+ REQUIRE(source->tcpconn->pipelined);
- isc_refcount_increment(source->pipeline_refs, &refs);
+ isc_refcount_increment(&source->tcpconn->refs, &refs);
INSIST(refs > 1);
- target->pipeline_refs = source->pipeline_refs;
+ target->tcpconn = source->tcpconn;
}
/*%
- * Decrease the count of client structures using the TCP connection that
+ * Decrease the count of client structures sharing the TCP connection that
* 'client' is associated with. If this is the last client using this TCP
- * connection, free the reference counter and return true; otherwise, return
- * false.
+ * connection, we detach from the TCP quota and free the tcpconn
+ * object. Either way, client->tcpconn is set to NULL.
*/
-static bool
-pipeline_detach(ns_client_t *client) {
- isc_refcount_t *refcount;
+static void
+tcpconn_detach(ns_client_t *client) {
+ ns_tcpconn_t *tconn = NULL;
int refs;
- REQUIRE(client->pipeline_refs != NULL);
-
- refcount = client->pipeline_refs;
- client->pipeline_refs = NULL;
+ REQUIRE(client->tcpconn != NULL);
- isc_refcount_decrement(refcount, refs);
+ tconn = client->tcpconn;
+ client->tcpconn = NULL;
+ isc_refcount_decrement(&tconn->refs, &refs);
if (refs == 0) {
- isc_mem_free(ns_g_mctx, refs);
- return (true);
+ isc_quota_detach(&tconn->tcpquota);
+ isc_mem_free(ns_g_mctx, tconn);
}
-
- return (false);
}
-/*
- * Detach a client from the TCP client quota if appropriate, and set
- * the quota pointer to NULL.
- *
- * Sometimes when the TCP client quota is exhausted but there are no other
- * clients servicing the interface, a client will be allowed to continue
- * running despite not having been attached to the quota. In this event,
- * the TCP quota was never attached to the client, so when the client (or
- * associated pipeline group) shuts down, the quota must NOT be detached.
+/*%
+ * Mark a client as active and increment the interface's 'ntcpactive'
+ * counter, as a signal that there is at least one client servicing
+ * TCP queries for the interface. If we reach the TCP client quota at
+ * some point, this will be used to determine whether a quota overrun
+ * should be permitted.
*
- * Otherwise, if the quota pointer is set, it should be detached. If not
- * set at all, we just return without doing anything.
+ * Marking the client active with the 'tcpactive' flag ensures proper
+ * accounting, by preventing us from incrementing or decrementing
+ * 'ntcpactive' more than once per client.
*/
static void
-tcpquota_disconnect(ns_client_t *client) {
- if (client->tcpquota == NULL) {
- return;
- }
-
- if (client->tcpattached) {
- isc_quota_detach(&client->tcpquota);
- client->tcpattached = false;
- } else {
- client->tcpquota = NULL;
+mark_tcp_active(ns_client_t *client, bool active) {
+ if (active && !client->tcpactive) {
+ isc_atomic_xadd(&client->interface->ntcpactive, 1);
+ client->tcpactive = active;
+ } else if (!active && client->tcpactive) {
+ uint32_t old =
+ isc_atomic_xadd(&client->interface->ntcpactive, -1);
+ INSIST(old > 0);
+ client->tcpactive = active;
}
}
@@ -484,7 +501,8 @@ exit_check(ns_client_t *client) {
INSIST(client->recursionquota == NULL);
if (NS_CLIENTSTATE_READING == client->newstate) {
- if (!client->pipelined) {
+ INSIST(client->tcpconn != NULL);
+ if (!client->tcpconn->pipelined) {
client_read(client);
client->newstate = NS_CLIENTSTATE_MAX;
return (true); /* We're done. */
@@ -507,8 +525,8 @@ exit_check(ns_client_t *client) {
dns_tcpmsg_cancelread(&client->tcpmsg);
}
- if (client->nreads != 0) {
- /* Still waiting for read cancel completion. */
+ /* Still waiting for read cancel completion. */
+ if (client->nreads > 0) {
return (true);
}
@@ -518,43 +536,45 @@ exit_check(ns_client_t *client) {
}
/*
- * Detach from pipeline group and from TCP client quota,
- * if appropriate.
+ * Soon the client will be ready to accept a new TCP
+ * connection or UDP request, but we may have enough
+ * clients doing that already. Check whether this client
+ * needs to remain active and allow it go inactive if
+ * not.
*
- * - If no pipeline group is active, attempt to
- * detach from the TCP client quota.
+ * UDP clients always go inactive at this point, but a TCP
+ * client may need to stay active and return to READY
+ * state if no other clients are available to listen
+ * for TCP requests on this interface.
*
- * - If a pipeline group is active, detach from it;
- * if the return code indicates that there no more
- * clients left if this pipeline group, we also detach
- * from the TCP client quota.
- *
- * - Otherwise we don't try to detach, we just set the
- * TCP quota pointer to NULL if it wasn't NULL already.
- *
- * tcpquota_disconnect() will set tcpquota to NULL, either
- * by detaching it or by assignment, depending on the
- * needs of the client. See the comments on that function
- * for further information.
+ * Regardless, if we're going to FREED state, that means
+ * the system is shutting down and we don't need to
+ * retain clients.
*/
- if (client->pipeline_refs == NULL || pipeline_detach(client)) {
- tcpquota_disconnect(client);
- } else {
- client->tcpquota = NULL;
- client->tcpattached = false;
+ if (client->mortal && TCP_CLIENT(client) &&
+ client->newstate != NS_CLIENTSTATE_FREED &&
+ !ns_g_clienttest &&
+ isc_atomic_xadd(&client->interface->ntcpaccepting, 0) == 0)
+ {
+ /* Nobody else is accepting */
+ client->mortal = false;
+ client->newstate = NS_CLIENTSTATE_READY;
+ }
+
+ /*
+ * Detach from TCP connection and TCP client quota,
+ * if appropriate. If this is the last reference to
+ * the TCP connection in our pipeline group, the
+ * TCP quota slot will be released.
+ */
+ if (client->tcpconn) {
+ tcpconn_detach(client);
}
if (client->tcpsocket != NULL) {
CTRACE("closetcp");
isc_socket_detach(&client->tcpsocket);
-
- if (client->tcpactive) {
- LOCK(&client->interface->lock);
- INSIST(client->interface->ntcpactive > 0);
- client->interface->ntcpactive--;
- UNLOCK(&client->interface->lock);
- client->tcpactive = false;
- }
+ mark_tcp_active(client, false);
}
if (client->timerset) {
@@ -567,35 +587,6 @@ exit_check(ns_client_t *client) {
client->peeraddr_valid = false;
client->state = NS_CLIENTSTATE_READY;
- INSIST(client->recursionquota == NULL);
-
- /*
- * Now the client is ready to accept a new TCP connection
- * or UDP request, but we may have enough clients doing
- * that already. Check whether this client needs to remain
- * active and force it to go inactive if not.
- *
- * UDP clients go inactive at this point, but a TCP client
- * may need to remain active and go into ready state if
- * no other clients are available to listen for TCP
- * requests on this interface or (in the case of pipelined
- * clients) to read for additional messages on the current
- * connection.
- */
- if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) {
- LOCK(&client->interface->lock);
- if ((client->interface->ntcpaccepting == 0 ||
- (client->pipelined &&
- client->interface->ntcpactive < 2)) &&
- client->newstate != NS_CLIENTSTATE_FREED)
- {
- client->mortal = false;
- client->newstate = NS_CLIENTSTATE_READY;
- }
- UNLOCK(&client->interface->lock);
- }
-
- client->pipelined = false;
/*
* We don't need the client; send it to the inactive
@@ -630,7 +621,7 @@ exit_check(ns_client_t *client) {
}
/* Still waiting for accept cancel completion. */
- if (! (client->naccepts == 0)) {
+ if (client->naccepts > 0) {
return (true);
}
@@ -641,7 +632,7 @@ exit_check(ns_client_t *client) {
}
/* Still waiting for recv cancel completion. */
- if (! (client->nrecvs == 0)) {
+ if (client->nrecvs > 0) {
return (true);
}
@@ -654,14 +645,7 @@ exit_check(ns_client_t *client) {
INSIST(client->recursionquota == NULL);
if (client->tcplistener != NULL) {
isc_socket_detach(&client->tcplistener);
-
- if (client->tcpactive) {
- LOCK(&client->interface->lock);
- INSIST(client->interface->ntcpactive > 0);
- client->interface->ntcpactive--;
- UNLOCK(&client->interface->lock);
- client->tcpactive = false;
- }
+ mark_tcp_active(client, false);
}
if (client->udpsocket != NULL) {
isc_socket_detach(&client->udpsocket);
@@ -816,7 +800,7 @@ client_start(isc_task_t *task, isc_event_t *event) {
return;
if (TCP_CLIENT(client)) {
- if (client->pipelined) {
+ if (client->tcpconn != NULL) {
client_read(client);
} else {
client_accept(client);
@@ -2470,6 +2454,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
client->nrecvs--;
} else {
INSIST(TCP_CLIENT(client));
+ INSIST(client->tcpconn != NULL);
REQUIRE(event->ev_type == DNS_EVENT_TCPMSG);
REQUIRE(event->ev_sender == &client->tcpmsg);
buffer = &client->tcpmsg.buffer;
@@ -2657,17 +2642,19 @@ client_request(isc_task_t *task, isc_event_t *event) {
/*
* Pipeline TCP query processing.
*/
- if (client->message->opcode != dns_opcode_query) {
- client->pipelined = false;
+ if (TCP_CLIENT(client) &&
+ client->message->opcode != dns_opcode_query)
+ {
+ client->tcpconn->pipelined = false;
}
- if (TCP_CLIENT(client) && client->pipelined) {
+ if (TCP_CLIENT(client) && client->tcpconn->pipelined) {
/*
* We're pipelining. Replace the client; the
- * the replacement can read the TCP socket looking
- * for new messages and this client can process the
+ * replacement can read the TCP socket looking
+ * for new messages and this one can process the
* current message asynchronously.
*
- * There are now at least three clients using this
+ * There will now be at least three clients using this
* TCP socket - one accepting new connections,
* one reading an existing connection to get new
* messages, and one answering the message already
@@ -2675,7 +2662,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
*/
result = ns_client_replace(client);
if (result != ISC_R_SUCCESS) {
- client->pipelined = false;
+ client->tcpconn->pipelined = false;
}
}
@@ -3233,10 +3220,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->signer = NULL;
dns_name_init(&client->signername, NULL);
client->mortal = false;
- client->pipelined = false;
- client->pipeline_refs = NULL;
- client->tcpquota = NULL;
- client->tcpattached = false;
+ client->tcpconn = NULL;
client->recursionquota = NULL;
client->interface = NULL;
client->peeraddr_valid = false;
@@ -3341,9 +3325,10 @@ client_read(ns_client_t *client) {
static void
client_newconn(isc_task_t *task, isc_event_t *event) {
+ isc_result_t result;
ns_client_t *client = event->ev_arg;
isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event;
- isc_result_t result;
+ uint32_t old;
REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN);
REQUIRE(NS_CLIENT_VALID(client));
@@ -3363,10 +3348,8 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
INSIST(client->naccepts == 1);
client->naccepts--;
- LOCK(&client->interface->lock);
- INSIST(client->interface->ntcpaccepting > 0);
- client->interface->ntcpaccepting--;
- UNLOCK(&client->interface->lock);
+ old = isc_atomic_xadd(&client->interface->ntcpaccepting, -1);
+ INSIST(old > 0);
/*
* We must take ownership of the new socket before the exit
@@ -3399,7 +3382,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
"accept failed: %s",
isc_result_totext(nevent->result));
- tcpquota_disconnect(client);
+ tcpconn_detach(client);
}
if (exit_check(client))
@@ -3437,15 +3420,13 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
* telnetting to port 53 (once per CPU) will
* deny service to legitimate TCP clients.
*/
- client->pipelined = false;
result = ns_client_replace(client);
if (result == ISC_R_SUCCESS &&
(ns_g_server->keepresporder == NULL ||
!allowed(&netaddr, NULL, NULL, 0, NULL,
ns_g_server->keepresporder)))
{
- pipeline_init(client);
- client->pipelined = true;
+ client->tcpconn->pipelined = true;
}
client_read(client);
@@ -3462,78 +3443,59 @@ client_accept(ns_client_t *client) {
CTRACE("accept");
/*
- * The tcpquota object can only be simultaneously referenced a
- * pre-defined number of times; this is configured by 'tcp-clients'
- * in named.conf. If we can't attach to it here, that means the TCP
- * client quota has been exceeded.
+ * Set up a new TCP connection. This means try to attach to the
+ * TCP client quota (tcp-clients), but fail if we're over quota.
*/
- result = isc_quota_attach(&ns_g_server->tcpquota,
- &client->tcpquota);
+ result = tcpconn_init(client, false);
if (result != ISC_R_SUCCESS) {
- bool exit;
+ bool exit;
- ns_client_log(client, NS_LOGCATEGORY_CLIENT,
- NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
- "no more TCP clients: %s",
- isc_result_totext(result));
-
- /*
- * We have exceeded the system-wide TCP client
- * quota. But, we can't just block this accept
- * in all cases, because if we did, a heavy TCP
- * load on other interfaces might cause this
- * interface to be starved, with no clients able
- * to accept new connections.
- *
- * So, we check here to see if any other clients
- * are already servicing TCP queries on this
- * interface (whether accepting, reading, or
- * processing). If there are at least two
- * (one reading and one processing a request)
- * then it's okay *not* to call accept - we
- * can let this client go inactive and another
- * one will resume accepting when it's done.
- *
- * If there aren't enough active clients on the
- * interface, then we can be a little bit
- * flexible about the quota. We'll allow *one*
- * extra client through to ensure we're listening
- * on every interface.
- *
- * (Note: In practice this means that the real
- * TCP client quota is tcp-clients plus the
- * number of listening interfaces plus 2.)
- */
- LOCK(&client->interface->lock);
- exit = (client->interface->ntcpactive > 1);
- UNLOCK(&client->interface->lock);
+ ns_client_log(client, NS_LOGCATEGORY_CLIENT,
+ NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
+ "TCP client quota reached: %s",
+ isc_result_totext(result));
- if (exit) {
- client->newstate = NS_CLIENTSTATE_INACTIVE;
- (void)exit_check(client);
- return;
- }
+ /*
+ * We have exceeded the system-wide TCP client quota. But,
+ * we can't just block this accept in all cases, because if
+ * we did, a heavy TCP load on other interfaces might cause
+ * this interface to be starved, with no clients able to
+ * accept new connections.
+ *
+ * So, we check here to see if any other clients are
+ * already servicing TCP queries on this interface (whether
+ * accepting, reading, or processing). If we find at least
+ * one, then it's okay *not* to call accept - we can let this
+ * client go inactive and another will take over when it's
+ * done.
+ *
+ * If there aren't enough active clients on the interface,
+ * then we can be a little bit flexible about the quota.
+ * We'll allow *one* extra client through to ensure we're
+ * listening on every interface; we do this by setting the
+ * 'force' option to tcpconn_init().
+ *
+ * (Note: In practice this means that the real TCP client
+ * quota is tcp-clients plus the number of listening
+ * interfaces plus 1.)
+ */
+ exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > 0);
+ if (exit) {
+ client->newstate = NS_CLIENTSTATE_INACTIVE;
+ (void)exit_check(client);
+ return;
+ }
- } else {
- client->tcpattached = true;
+ result = tcpconn_init(client, true);
+ RUNTIME_CHECK(result == ISC_R_SUCCESS);
}
/*
- * By incrementing the interface's ntcpactive counter we signal
- * that there is at least one client servicing TCP queries for the
- * interface.
- *
- * We also make note of the fact in the client itself with the
- * tcpactive flag. This ensures proper accounting by preventing
- * us from accidentally incrementing or decrementing ntcpactive
- * more than once per client object.
+ * If this client was set up using get_client() or get_worker(),
+ * then TCP is already marked active. However, if it was restarted
+ * from exit_check(), it might not be, so we take care of it now.
*/
- if (!client->tcpactive) {
- LOCK(&client->interface->lock);
- client->interface->ntcpactive++;
- UNLOCK(&client->interface->lock);
- client->tcpactive = true;
- }
+ mark_tcp_active(client, true);
result = isc_socket_accept(client->tcplistener, client->task,
client_newconn, client);
@@ -3549,15 +3511,8 @@ client_accept(ns_client_t *client) {
"isc_socket_accept() failed: %s",
isc_result_totext(result));
- tcpquota_disconnect(client);
-
- if (client->tcpactive) {
- LOCK(&client->interface->lock);
- client->interface->ntcpactive--;
- UNLOCK(&client->interface->lock);
- client->tcpactive = false;
- }
-
+ tcpconn_detach(client);
+ mark_tcp_active(client, false);
return;
}
@@ -3582,9 +3537,7 @@ client_accept(ns_client_t *client) {
* listening for connections itself to prevent the interface
* going dead.
*/
- LOCK(&client->interface->lock);
- client->interface->ntcpaccepting++;
- UNLOCK(&client->interface->lock);
+ isc_atomic_xadd(&client->interface->ntcpaccepting, 1);
}
static void
@@ -3655,24 +3608,25 @@ ns_client_replace(ns_client_t *client) {
REQUIRE(client->manager != NULL);
tcp = TCP_CLIENT(client);
- if (tcp && client->pipelined) {
+ if (tcp && client->tcpconn != NULL && client->tcpconn->pipelined) {
result = get_worker(client->manager, client->interface,
client->tcpsocket, client);
} else {
result = get_client(client->manager, client->interface,
- client->dispatch, client, tcp);
+ client->dispatch, tcp);
- /*
- * The responsibility for listening for new requests is hereby
- * transferred to the new client. Therefore, the old client
- * should refrain from listening for any more requests.
- */
- client->mortal = true;
}
if (result != ISC_R_SUCCESS) {
return (result);
}
+ /*
+ * The responsibility for listening for new requests is hereby
+ * transferred to the new client. Therefore, the old client
+ * should refrain from listening for any more requests.
+ */
+ client->mortal = true;
+
return (ISC_R_SUCCESS);
}
@@ -3806,7 +3760,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
static isc_result_t
get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
- dns_dispatch_t *disp, ns_client_t *oldclient, bool tcp)
+ dns_dispatch_t *disp, bool tcp)
{
isc_result_t result = ISC_R_SUCCESS;
isc_event_t *ev;
@@ -3850,15 +3804,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
client->dscp = ifp->dscp;
if (tcp) {
- client->tcpattached = false;
- if (oldclient != NULL) {
- client->tcpattached = oldclient->tcpattached;
- }
-
- LOCK(&client->interface->lock);
- client->interface->ntcpactive++;
- UNLOCK(&client->interface->lock);
- client->tcpactive = true;
+ mark_tcp_active(client, true);
client->attributes |= NS_CLIENTATTR_TCP;
isc_socket_attach(ifp->tcpsocket,
@@ -3923,16 +3869,14 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock,
ns_interface_attach(ifp, &client->interface);
client->newstate = client->state = NS_CLIENTSTATE_WORKING;
INSIST(client->recursionquota == NULL);
- client->tcpquota = &ns_g_server->tcpquota;
- client->tcpattached = oldclient->tcpattached;
client->dscp = ifp->dscp;
client->attributes |= NS_CLIENTATTR_TCP;
client->mortal = true;
- pipeline_attach(oldclient, client);
- client->pipelined = true;
+ tcpconn_attach(oldclient, client);
+ mark_tcp_active(client, true);
isc_socket_attach(ifp->tcpsocket, &client->tcplistener);
isc_socket_attach(sock, &client->tcpsocket);
@@ -3940,11 +3884,6 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock,
(void)isc_socket_getpeername(client->tcpsocket, &client->peeraddr);
client->peeraddr_valid = true;
- LOCK(&client->interface->lock);
- client->interface->ntcpactive++;
- UNLOCK(&client->interface->lock);
- client->tcpactive = true;
-
INSIST(client->tcpmsg_valid == false);
dns_tcpmsg_init(client->mctx, client->tcpsocket, &client->tcpmsg);
client->tcpmsg_valid = true;
@@ -3970,8 +3909,7 @@ ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n,
MTRACE("createclients");
for (disp = 0; disp < n; disp++) {
- result = get_client(manager, ifp, ifp->udpdispatch[disp],
- NULL, tcp);
+ result = get_client(manager, ifp, ifp->udpdispatch[disp], tcp);
if (result != ISC_R_SUCCESS)
break;
}
diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h
index e2c40acd28..969ee4c08f 100644
--- a/bin/named/include/named/client.h
+++ b/bin/named/include/named/client.h
@@ -78,6 +78,13 @@
*** Types
***/
+/*% reference-counted TCP connection object */
+typedef struct ns_tcpconn {
+ isc_refcount_t refs;
+ isc_quota_t *tcpquota;
+ bool pipelined;
+} ns_tcpconn_t;
+
/*% nameserver client structure */
struct ns_client {
unsigned int magic;
@@ -131,10 +138,7 @@ struct ns_client {
dns_name_t signername; /*%< [T]SIG key name */
dns_name_t *signer; /*%< NULL if not valid sig */
bool mortal; /*%< Die after handling request */
- bool pipelined; /*%< TCP queries not in sequence */
- isc_refcount_t *pipeline_refs;
- isc_quota_t *tcpquota;
- bool tcpattached;
+ ns_tcpconn_t *tcpconn;
isc_quota_t *recursionquota;
ns_interface_t *interface;
diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h
index 61b08826a6..3535ef22a8 100644
--- a/bin/named/include/named/interfacemgr.h
+++ b/bin/named/include/named/interfacemgr.h
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
-/* $Id: interfacemgr.h,v 1.35 2011/07/28 23:47:58 tbox Exp $ */
-
#ifndef NAMED_INTERFACEMGR_H
#define NAMED_INTERFACEMGR_H 1
@@ -77,11 +75,11 @@ struct ns_interface {
/*%< UDP dispatchers. */
isc_socket_t * tcpsocket; /*%< TCP socket. */
isc_dscp_t dscp; /*%< "listen-on" DSCP value */
- int ntcpaccepting; /*%< Number of clients
+ int32_t ntcpaccepting; /*%< Number of clients
ready to accept new
TCP connections on this
interface */
- int ntcpactive; /*%< Number of clients
+ int32_t ntcpactive; /*%< Number of clients
servicing TCP queries
(whether accepting or
connected) */
diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c
index 955096ef47..d9f6df5802 100644
--- a/bin/named/interfacemgr.c
+++ b/bin/named/interfacemgr.c
@@ -388,6 +388,7 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
*/
ifp->ntcpaccepting = 0;
ifp->ntcpactive = 0;
+
ifp->nudpdispatch = 0;
ifp->dscp = -1;
diff --git a/lib/isc/include/isc/quota.h b/lib/isc/include/isc/quota.h
index b9bf59877a..36c5830242 100644
--- a/lib/isc/include/isc/quota.h
+++ b/lib/isc/include/isc/quota.h
@@ -100,6 +100,13 @@ isc_quota_attach(isc_quota_t *quota, isc_quota_t **p);
* quota if successful (ISC_R_SUCCESS or ISC_R_SOFTQUOTA).
*/
+isc_result_t
+isc_quota_force(isc_quota_t *quota, isc_quota_t **p);
+/*%<
+ * Like isc_quota_attach, but will attach '*p' to the quota
+ * even if the hard quota has been exceeded.
+ */
+
void
isc_quota_detach(isc_quota_t **p);
/*%<
diff --git a/lib/isc/quota.c b/lib/isc/quota.c
index 3ddff0d875..556a61f21d 100644
--- a/lib/isc/quota.c
+++ b/lib/isc/quota.c
@@ -74,20 +74,39 @@ isc_quota_release(isc_quota_t *quota) {
UNLOCK(&quota->lock);
}
-isc_result_t
-isc_quota_attach(isc_quota_t *quota, isc_quota_t **p)
-{
+static isc_result_t
+doattach(isc_quota_t *quota, isc_quota_t **p, bool force) {
isc_result_t result;
- INSIST(p != NULL && *p == NULL);
+ REQUIRE(p != NULL && *p == NULL);
+
result = isc_quota_reserve(quota);
- if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA)
+ if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA) {
+ *p = quota;
+ } else if (result == ISC_R_QUOTA && force) {
+ /* attach anyway */
+ LOCK(&quota->lock);
+ quota->used++;
+ UNLOCK(&quota->lock);
+
*p = quota;
+ result = ISC_R_SUCCESS;
+ }
+
return (result);
}
+isc_result_t
+isc_quota_attach(isc_quota_t *quota, isc_quota_t **p) {
+ return (doattach(quota, p, false));
+}
+
+isc_result_t
+isc_quota_force(isc_quota_t *quota, isc_quota_t **p) {
+ return (doattach(quota, p, true));
+}
+
void
-isc_quota_detach(isc_quota_t **p)
-{
+isc_quota_detach(isc_quota_t **p) {
INSIST(p != NULL && *p != NULL);
isc_quota_release(*p);
*p = NULL;
diff --git a/lib/isc/win32/libisc.def.in b/lib/isc/win32/libisc.def.in
index a82facec0f..7b9f23d776 100644
--- a/lib/isc/win32/libisc.def.in
+++ b/lib/isc/win32/libisc.def.in
@@ -519,6 +519,7 @@ isc_portset_removerange
isc_quota_attach
isc_quota_destroy
isc_quota_detach
+isc_quota_force
isc_quota_init
isc_quota_max
isc_quota_release
--
2.20.1

View File

@@ -0,0 +1,80 @@
Backport patch to fix CVE-2018-5743.
Ref:
https://security-tracker.debian.org/tracker/CVE-2018-5743
CVE: CVE-2018-5743
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/59434b9]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From 59434b987e8eb436b08c24e559ee094c4e939daa Mon Sep 17 00:00:00 2001
From: Evan Hunt <each@isc.org>
Date: Fri, 5 Apr 2019 16:26:19 -0700
Subject: [PATCH 6/6] restore allowance for tcp-clients < interfaces
in the "refactor tcpquota and pipeline refs" commit, the counting
of active interfaces was tightened in such a way that named could
fail to listen on an interface if there were more interfaces than
tcp-clients. when checking the quota to start accepting on an
interface, if the number of active clients was above zero, then
it was presumed that some other client was able to handle accepting
new connections. this, however, ignored the fact that the current client
could be included in that count, so if the quota was already exceeded
before all the interfaces were listening, some interfaces would never
listen.
we now check whether the current client has been marked active; if so,
then the number of active clients on the interface must be greater
than 1, not 0.
(cherry picked from commit 0b4e2cd4c3192ba88569dd344f542a8cc43742b5)
(cherry picked from commit d01023aaac35543daffbdf48464e320150235d41)
---
bin/named/client.c | 8 +++++---
doc/arm/Bv9ARM-book.xml | 3 ++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/bin/named/client.c b/bin/named/client.c
index d826ab32bf..845326abc0 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -3464,8 +3464,9 @@ client_accept(ns_client_t *client) {
*
* So, we check here to see if any other clients are
* already servicing TCP queries on this interface (whether
- * accepting, reading, or processing). If we find at least
- * one, then it's okay *not* to call accept - we can let this
+ * accepting, reading, or processing). If we find that at
+ * least one client other than this one is active, then
+ * it's okay *not* to call accept - we can let this
* client go inactive and another will take over when it's
* done.
*
@@ -3479,7 +3480,8 @@ client_accept(ns_client_t *client) {
* quota is tcp-clients plus the number of listening
* interfaces plus 1.)
*/
- exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > 0);
+ exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) >
+ (client->tcpactive ? 1 : 0));
if (exit) {
client->newstate = NS_CLIENTSTATE_INACTIVE;
(void)exit_check(client);
diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml
index 381768d540..9c76d3cd6f 100644
--- a/doc/arm/Bv9ARM-book.xml
+++ b/doc/arm/Bv9ARM-book.xml
@@ -8493,7 +8493,8 @@ avoid-v6-udp-ports { 40000; range 50000 60000; };
<para>
The number of file descriptors reserved for TCP, stdio,
etc. This needs to be big enough to cover the number of
- interfaces <command>named</command> listens on, <command>tcp-clients</command> as well as
+ interfaces <command>named</command> listens on plus
+ <command>tcp-clients</command>, as well as
to provide room for outgoing TCP queries and incoming zone
transfers. The default is <literal>512</literal>.
The minimum value is <literal>128</literal> and the
--
2.20.1

View File

@@ -0,0 +1,140 @@
Backport commit to fix compile error on arm caused by commits which are
to fix CVE-2018-5743.
CVE: CVE-2018-5743
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/ef49780]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From ef49780d30d3ddc5735cfc32561b678a634fa72f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org>
Date: Wed, 17 Apr 2019 15:22:27 +0200
Subject: [PATCH] Replace atomic operations in bin/named/client.c with
isc_refcount reference counting
---
bin/named/client.c | 18 +++++++-----------
bin/named/include/named/interfacemgr.h | 5 +++--
bin/named/interfacemgr.c | 7 +++++--
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/bin/named/client.c b/bin/named/client.c
index 845326abc0..29fecadca8 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -402,12 +402,10 @@ tcpconn_detach(ns_client_t *client) {
static void
mark_tcp_active(ns_client_t *client, bool active) {
if (active && !client->tcpactive) {
- isc_atomic_xadd(&client->interface->ntcpactive, 1);
+ isc_refcount_increment0(&client->interface->ntcpactive, NULL);
client->tcpactive = active;
} else if (!active && client->tcpactive) {
- uint32_t old =
- isc_atomic_xadd(&client->interface->ntcpactive, -1);
- INSIST(old > 0);
+ isc_refcount_decrement(&client->interface->ntcpactive, NULL);
client->tcpactive = active;
}
}
@@ -554,7 +552,7 @@ exit_check(ns_client_t *client) {
if (client->mortal && TCP_CLIENT(client) &&
client->newstate != NS_CLIENTSTATE_FREED &&
!ns_g_clienttest &&
- isc_atomic_xadd(&client->interface->ntcpaccepting, 0) == 0)
+ isc_refcount_current(&client->interface->ntcpaccepting) == 0)
{
/* Nobody else is accepting */
client->mortal = false;
@@ -3328,7 +3326,6 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
isc_result_t result;
ns_client_t *client = event->ev_arg;
isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event;
- uint32_t old;
REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN);
REQUIRE(NS_CLIENT_VALID(client));
@@ -3348,8 +3345,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
INSIST(client->naccepts == 1);
client->naccepts--;
- old = isc_atomic_xadd(&client->interface->ntcpaccepting, -1);
- INSIST(old > 0);
+ isc_refcount_decrement(&client->interface->ntcpaccepting, NULL);
/*
* We must take ownership of the new socket before the exit
@@ -3480,8 +3476,8 @@ client_accept(ns_client_t *client) {
* quota is tcp-clients plus the number of listening
* interfaces plus 1.)
*/
- exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) >
- (client->tcpactive ? 1 : 0));
+ exit = (isc_refcount_current(&client->interface->ntcpactive) >
+ (client->tcpactive ? 1U : 0U));
if (exit) {
client->newstate = NS_CLIENTSTATE_INACTIVE;
(void)exit_check(client);
@@ -3539,7 +3535,7 @@ client_accept(ns_client_t *client) {
* listening for connections itself to prevent the interface
* going dead.
*/
- isc_atomic_xadd(&client->interface->ntcpaccepting, 1);
+ isc_refcount_increment0(&client->interface->ntcpaccepting, NULL);
}
static void
diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h
index 3535ef22a8..6e10f210fd 100644
--- a/bin/named/include/named/interfacemgr.h
+++ b/bin/named/include/named/interfacemgr.h
@@ -45,6 +45,7 @@
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/socket.h>
+#include <isc/refcount.h>
#include <dns/result.h>
@@ -75,11 +76,11 @@ struct ns_interface {
/*%< UDP dispatchers. */
isc_socket_t * tcpsocket; /*%< TCP socket. */
isc_dscp_t dscp; /*%< "listen-on" DSCP value */
- int32_t ntcpaccepting; /*%< Number of clients
+ isc_refcount_t ntcpaccepting; /*%< Number of clients
ready to accept new
TCP connections on this
interface */
- int32_t ntcpactive; /*%< Number of clients
+ isc_refcount_t ntcpactive; /*%< Number of clients
servicing TCP queries
(whether accepting or
connected) */
diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c
index d9f6df5802..135533be6b 100644
--- a/bin/named/interfacemgr.c
+++ b/bin/named/interfacemgr.c
@@ -386,8 +386,8 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
* connections will be handled in parallel even though there is
* only one client initially.
*/
- ifp->ntcpaccepting = 0;
- ifp->ntcpactive = 0;
+ isc_refcount_init(&ifp->ntcpaccepting, 0);
+ isc_refcount_init(&ifp->ntcpactive, 0);
ifp->nudpdispatch = 0;
@@ -618,6 +618,9 @@ ns_interface_destroy(ns_interface_t *ifp) {
ns_interfacemgr_detach(&ifp->mgr);
+ isc_refcount_destroy(&ifp->ntcpactive);
+ isc_refcount_destroy(&ifp->ntcpaccepting);
+
ifp->magic = 0;
isc_mem_put(mctx, ifp, sizeof(*ifp));
}
--
2.20.1

View File

@@ -20,6 +20,14 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \
file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
file://0001-avoid-start-failure-with-bind-user.patch \
file://0001-bind-fix-CVE-2019-6471.patch \
file://0001-fix-enforcement-of-tcp-clients-v1.patch \
file://0002-tcp-clients-could-still-be-exceeded-v2.patch \
file://0003-use-reference-counter-for-pipeline-groups-v3.patch \
file://0004-better-tcpquota-accounting-and-client-mortality-chec.patch \
file://0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch \
file://0006-restore-allowance-for-tcp-clients-interfaces.patch \
file://0007-Replace-atomic-operations-in-bin-named-client.c-with.patch \
"
SRC_URI[md5sum] = "8ddab4b61fa4516fe404679c74e37960"

View File

@@ -59,7 +59,7 @@ INITSCRIPT_NAME = "connman"
INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
python __anonymous () {
systemd_packages = "${PN}"
systemd_packages = "${PN} ${PN}-wait-online"
pkgconfig = d.getVar('PACKAGECONFIG')
if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
systemd_packages += " ${PN}-vpn"

View File

@@ -0,0 +1,40 @@
From 2014fad3d28090b59d2f8a0971166c06e5fa6da6 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 18 Oct 2019 14:56:58 +0800
Subject: [PATCH] upstream: fix integer overflow in XMSS private key parsing.
Reported by Adam Zabrocki via SecuriTeam's SSH program.
Note that this code is experimental and not compiled by default.
ok markus@
OpenBSD-Commit-ID: cd0361896d15e8a1bac495ac583ff065ffca2be1
Signed-off-by: "djm@openbsd.org" <djm@openbsd.org>
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/a546b17bbaeb12beac4c9aeed56f74a42b18a93a]
CVE: CVE-2019-16905
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
sshkey-xmss.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sshkey-xmss.c b/sshkey-xmss.c
index aaae702..c57681a 100644
--- a/sshkey-xmss.c
+++ b/sshkey-xmss.c
@@ -977,7 +977,8 @@ sshkey_xmss_decrypt_state(const struct sshkey *k, struct sshbuf *encoded,
goto out;
}
/* check that an appropriate amount of auth data is present */
- if (sshbuf_len(encoded) < encrypted_len + authlen) {
+ if (sshbuf_len(encoded) < authlen ||
+ sshbuf_len(encoded) - authlen < encrypted_len) {
r = SSH_ERR_INVALID_FORMAT;
goto out;
}
--
2.7.4

View File

@@ -24,6 +24,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
file://sshd_check_keys \
file://add-test-support-for-busybox.patch \
file://0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch \
"
SRC_URI[md5sum] = "bf050f002fe510e1daecd39044e1122d"
SRC_URI[sha256sum] = "bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68"

View File

@@ -148,7 +148,7 @@ do_install_append_class-native () {
OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \
SSL_CERT_DIR=${libdir}/ssl-1.1/certs \
SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \
OPENSSL_ENGINES=${libdir}/ssl-1.1/engines
OPENSSL_ENGINES=${libdir}/engines-1.1
}
do_install_append_class-nativesdk () {

View File

@@ -0,0 +1,82 @@
hostapd before 2.10 and wpa_supplicant before 2.10 allow an incorrect indication
of disconnection in certain situations because source address validation is
mishandled. This is a denial of service that should have been prevented by PMF
(aka management frame protection). The attacker must send a crafted 802.11 frame
from a location that is within the 802.11 communications range.
CVE: CVE-2019-16275
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
From 8c07fa9eda13e835f3f968b2e1c9a8be3a851ff9 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <j@w1.fi>
Date: Thu, 29 Aug 2019 11:52:04 +0300
Subject: [PATCH] AP: Silently ignore management frame from unexpected source
address
Do not process any received Management frames with unexpected/invalid SA
so that we do not add any state for unexpected STA addresses or end up
sending out frames to unexpected destination. This prevents unexpected
sequences where an unprotected frame might end up causing the AP to send
out a response to another device and that other device processing the
unexpected response.
In particular, this prevents some potential denial of service cases
where the unexpected response frame from the AP might result in a
connected station dropping its association.
Signed-off-by: Jouni Malinen <j@w1.fi>
---
src/ap/drv_callbacks.c | 13 +++++++++++++
src/ap/ieee802_11.c | 12 ++++++++++++
2 files changed, 25 insertions(+)
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 31587685fe3b..34ca379edc3d 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -131,6 +131,19 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
"hostapd_notif_assoc: Skip event with no address");
return -1;
}
+
+ if (is_multicast_ether_addr(addr) ||
+ is_zero_ether_addr(addr) ||
+ os_memcmp(addr, hapd->own_addr, ETH_ALEN) == 0) {
+ /* Do not process any frames with unexpected/invalid SA so that
+ * we do not add any state for unexpected STA addresses or end
+ * up sending out frames to unexpected destination. */
+ wpa_printf(MSG_DEBUG, "%s: Invalid SA=" MACSTR
+ " in received indication - ignore this indication silently",
+ __func__, MAC2STR(addr));
+ return 0;
+ }
+
random_add_randomness(addr, ETH_ALEN);
hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index c85a28db44b7..e7065372e158 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -4626,6 +4626,18 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
fc = le_to_host16(mgmt->frame_control);
stype = WLAN_FC_GET_STYPE(fc);
+ if (is_multicast_ether_addr(mgmt->sa) ||
+ is_zero_ether_addr(mgmt->sa) ||
+ os_memcmp(mgmt->sa, hapd->own_addr, ETH_ALEN) == 0) {
+ /* Do not process any frames with unexpected/invalid SA so that
+ * we do not add any state for unexpected STA addresses or end
+ * up sending out frames to unexpected destination. */
+ wpa_printf(MSG_DEBUG, "MGMT: Invalid SA=" MACSTR
+ " in received frame - ignore this frame silently",
+ MAC2STR(mgmt->sa));
+ return 0;
+ }
+
if (stype == WLAN_FC_STYPE_BEACON) {
handle_beacon(hapd, mgmt, len, fi);
return 1;
--
2.20.1

View File

@@ -25,6 +25,7 @@ SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
file://wpa_supplicant.conf-sane \
file://99_wpa_supplicant \
file://0001-replace-systemd-install-Alias-with-WantedBy.patch \
file://0001-AP-Silently-ignore-management-frame-from-unexpected-.patch \
"
SRC_URI[md5sum] = "2d2958c782576dc9901092fbfecb4190"
SRC_URI[sha256sum] = "fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17"

View File

@@ -21,8 +21,8 @@
DAEMON=@bindir@/dbus-daemon
NAME=dbus
DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
DAEMONUSER=messagebus # must match /usr/share/dbus-1/system.conf
PIDFILE=/var/run/dbus/pid # must match /usr/share/dbus-1/system.conf
UUIDDIR=/var/lib/dbus
DESC="system message bus"
EVENTDIR=/etc/dbus-1/event.d

View File

@@ -24,8 +24,8 @@ IMAGE_FSTYPES = "wic.vmdk"
inherit core-image module-base setuptools3
SRCREV ?= "8181681b33da272fef83276104d5c7a93f84da46"
SRC_URI = "git://git.yoctoproject.org/poky \
SRCREV ?= "cf0cefd53c5d4f72e26c74571a10e098996a1ff2"
SRC_URI = "git://git.yoctoproject.org/poky;branch=zeus \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
file://README_VirtualBox_Guest_Additions.txt \

View File

@@ -26,6 +26,10 @@ if [ -e /sys/kernel/config ] && grep -q configfs /proc/filesystems; then
mount -t configfs configfs /sys/kernel/config
fi
if [ -e /sys/firmware/efi/efivars ] && grep -q efivarfs /proc/filesystems; then
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
fi
if ! [ -e /dev/zero ] && [ -e /dev ] && grep -q devtmpfs /proc/filesystems; then
mount -n -t devtmpfs devtmpfs /dev
fi

View File

@@ -21,26 +21,26 @@ python do_populate_cve_db() {
"""
Update NVD database with json data feed
"""
import bb.utils
import sqlite3, urllib, urllib.parse, shutil, gzip
from datetime import date
bb.utils.export_proxies(d)
BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-"
YEAR_START = 2002
db_dir = os.path.join(d.getVar("DL_DIR"), 'CVE_CHECK')
db_file = os.path.join(db_dir, 'nvdcve_1.0.db')
db_file = d.getVar("CVE_CHECK_DB_FILE")
db_dir = os.path.dirname(db_file)
json_tmpfile = os.path.join(db_dir, 'nvd.json.gz')
proxy = d.getVar("https_proxy")
if proxy:
# instantiate an opener but do not install it as the global
# opener unless if we're really sure it's applicable for all
# urllib requests
proxy_handler = urllib.request.ProxyHandler({'https': proxy})
proxy_opener = urllib.request.build_opener(proxy_handler)
else:
proxy_opener = None
# Don't refresh the database more than once an hour
try:
import time
if time.time() - os.path.getmtime(db_file) < (60*60):
return
except OSError:
pass
cve_f = open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a')
@@ -59,15 +59,7 @@ python do_populate_cve_db() {
json_url = year_url + ".json.gz"
# Retrieve meta last modified date
response = None
if proxy_opener:
response = proxy_opener.open(meta_url)
else:
req = urllib.request.Request(meta_url)
response = urllib.request.urlopen(req)
response = urllib.request.urlopen(meta_url)
if response:
for l in response.read().decode("utf-8").splitlines():
key, value = l.split(":", 1)
@@ -87,12 +79,7 @@ python do_populate_cve_db() {
# Update db with current year json file
try:
if proxy_opener:
response = proxy_opener.open(json_url)
else:
req = urllib.request.Request(json_url)
response = urllib.request.urlopen(req)
response = urllib.request.urlopen(json_url)
if response:
update_db(c, gzip.decompress(response.read()).decode('utf-8'))
c.execute("insert or replace into META values (?, ?)", [year, last_modified])
@@ -112,11 +99,14 @@ python do_populate_cve_db() {
def initialize_db(c):
c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)")
c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \
SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)")
c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \
VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \
VERSION_END TEXT, OPERATOR_END TEXT)")
c.execute("CREATE INDEX IF NOT EXISTS PRODUCT_ID_IDX on PRODUCTS(ID);")
def parse_node_and_insert(c, node, cveId):
# Parse children node if needed

View File

@@ -0,0 +1,169 @@
From 064b77f173337aa790f1cec0d741bfbc61a33d31 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <trevor.gamblin@windriver.com>
Date: Fri, 18 Oct 2019 09:57:43 -0400
Subject: [PATCH] ncurses: selective backport of 20191012 patch
Upstream-Status: Backport [https://salsa.debian.org/debian/ncurses/commit/243908b1e3d81]
Contents of the upstream patch that are not applied to comp_hash.c,
parse_entry.c, or dump_entry.c have been omitted.
CVE: CVE-2019-17594
CVE: CVE-2019-17595
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
---
ncurses/tinfo/comp_hash.c | 14 ++++++++++----
ncurses/tinfo/parse_entry.c | 32 ++++++++++++++++----------------
progs/dump_entry.c | 7 ++++---
3 files changed, 30 insertions(+), 23 deletions(-)
diff --git a/ncurses/tinfo/comp_hash.c b/ncurses/tinfo/comp_hash.c
index 21f165ca..a62d38f9 100644
--- a/ncurses/tinfo/comp_hash.c
+++ b/ncurses/tinfo/comp_hash.c
@@ -44,7 +44,7 @@
#include <tic.h>
#include <hashsize.h>
-MODULE_ID("$Id: comp_hash.c,v 1.49 2019/03/10 00:06:48 tom Exp $")
+MODULE_ID("$Id: comp_hash.c,v 1.51 2019/10/12 16:32:13 tom Exp $")
/*
* Finds the entry for the given string in the hash table if present.
@@ -63,7 +63,9 @@ _nc_find_entry(const char *string,
hashvalue = data->hash_of(string);
- if (data->table_data[hashvalue] >= 0) {
+ if (hashvalue >= 0
+ && (unsigned) hashvalue < data->table_size
+ && data->table_data[hashvalue] >= 0) {
real_table = _nc_get_table(termcap);
ptr = real_table + data->table_data[hashvalue];
@@ -96,7 +98,9 @@ _nc_find_type_entry(const char *string,
const HashData *data = _nc_get_hash_info(termcap);
int hashvalue = data->hash_of(string);
- if (data->table_data[hashvalue] >= 0) {
+ if (hashvalue >= 0
+ && (unsigned) hashvalue < data->table_size
+ && data->table_data[hashvalue] >= 0) {
const struct name_table_entry *const table = _nc_get_table(termcap);
ptr = table + data->table_data[hashvalue];
@@ -124,7 +128,9 @@ _nc_find_user_entry(const char *string)
hashvalue = data->hash_of(string);
- if (data->table_data[hashvalue] >= 0) {
+ if (hashvalue >= 0
+ && (unsigned) hashvalue < data->table_size
+ && data->table_data[hashvalue] >= 0) {
real_table = _nc_get_userdefs_table();
ptr = real_table + data->table_data[hashvalue];
diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
index f8cca8b5..064376c5 100644
--- a/ncurses/tinfo/parse_entry.c
+++ b/ncurses/tinfo/parse_entry.c
@@ -47,7 +47,7 @@
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: parse_entry.c,v 1.97 2019/08/03 23:10:38 tom Exp $")
+MODULE_ID("$Id: parse_entry.c,v 1.98 2019/10/12 00:50:31 tom Exp $")
#ifdef LINT
static short const parametrized[] =
@@ -654,12 +654,12 @@ _nc_capcmp(const char *s, const char *t)
}
static void
-append_acs0(string_desc * dst, int code, int src)
+append_acs0(string_desc * dst, int code, char *src, size_t off)
{
- if (src != 0) {
+ if (src != 0 && off < strlen(src)) {
char temp[3];
temp[0] = (char) code;
- temp[1] = (char) src;
+ temp[1] = src[off];
temp[2] = 0;
_nc_safe_strcat(dst, temp);
}
@@ -669,7 +669,7 @@ static void
append_acs(string_desc * dst, int code, char *src)
{
if (VALID_STRING(src) && strlen(src) == 1) {
- append_acs0(dst, code, *src);
+ append_acs0(dst, code, src, 0);
}
}
@@ -1038,17 +1038,17 @@ postprocess_terminfo(TERMTYPE2 *tp)
_nc_str_init(&result, buf2, sizeof(buf2));
_nc_safe_strcat(&result, acs_chars);
- append_acs0(&result, 'l', box_chars_1[0]); /* ACS_ULCORNER */
- append_acs0(&result, 'q', box_chars_1[1]); /* ACS_HLINE */
- append_acs0(&result, 'k', box_chars_1[2]); /* ACS_URCORNER */
- append_acs0(&result, 'x', box_chars_1[3]); /* ACS_VLINE */
- append_acs0(&result, 'j', box_chars_1[4]); /* ACS_LRCORNER */
- append_acs0(&result, 'm', box_chars_1[5]); /* ACS_LLCORNER */
- append_acs0(&result, 'w', box_chars_1[6]); /* ACS_TTEE */
- append_acs0(&result, 'u', box_chars_1[7]); /* ACS_RTEE */
- append_acs0(&result, 'v', box_chars_1[8]); /* ACS_BTEE */
- append_acs0(&result, 't', box_chars_1[9]); /* ACS_LTEE */
- append_acs0(&result, 'n', box_chars_1[10]); /* ACS_PLUS */
+ append_acs0(&result, 'l', box_chars_1, 0); /* ACS_ULCORNER */
+ append_acs0(&result, 'q', box_chars_1, 1); /* ACS_HLINE */
+ append_acs0(&result, 'k', box_chars_1, 2); /* ACS_URCORNER */
+ append_acs0(&result, 'x', box_chars_1, 3); /* ACS_VLINE */
+ append_acs0(&result, 'j', box_chars_1, 4); /* ACS_LRCORNER */
+ append_acs0(&result, 'm', box_chars_1, 5); /* ACS_LLCORNER */
+ append_acs0(&result, 'w', box_chars_1, 6); /* ACS_TTEE */
+ append_acs0(&result, 'u', box_chars_1, 7); /* ACS_RTEE */
+ append_acs0(&result, 'v', box_chars_1, 8); /* ACS_BTEE */
+ append_acs0(&result, 't', box_chars_1, 9); /* ACS_LTEE */
+ append_acs0(&result, 'n', box_chars_1, 10); /* ACS_PLUS */
if (buf2[0]) {
acs_chars = _nc_save_str(buf2);
diff --git a/progs/dump_entry.c b/progs/dump_entry.c
index d0e420ec..8a47084a 100644
--- a/progs/dump_entry.c
+++ b/progs/dump_entry.c
@@ -39,7 +39,7 @@
#include "termsort.c" /* this C file is generated */
#include <parametrized.h> /* so is this */
-MODULE_ID("$Id: dump_entry.c,v 1.173 2019/05/11 21:02:24 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.175 2019/10/12 15:59:07 tom Exp $")
#define DISCARD(string) string = ABSENT_STRING
#define PRINTF (void) printf
@@ -1136,7 +1136,8 @@ fmt_entry(TERMTYPE2 *tterm,
*d++ = '\\';
*d = ':';
} else if (*d == '\\') {
- *++d = *s++;
+ if ((*++d = *s++) == '\0')
+ break;
}
d++;
*d = '\0';
@@ -1396,7 +1397,7 @@ one_one_mapping(const char *mapping)
if (VALID_STRING(mapping)) {
int n = 0;
- while (mapping[n] != '\0') {
+ while (mapping[n] != '\0' && mapping[n + 1] != '\0') {
if (isLine(mapping[n]) &&
mapping[n] != mapping[n + 1]) {
result = FALSE;
--
2.17.1

View File

@@ -3,6 +3,7 @@ require ncurses.inc
SRC_URI += "file://0001-tic-hang.patch \
file://0002-configure-reproducible.patch \
file://config.cache \
file://0001-ncurses-selective-backport-of-20191012-patch.patch \
"
# commit id corresponds to the revision in package version
SRCREV = "3c9b2677c96c645496997321bf2fe465a5e7e21f"

View File

@@ -0,0 +1,36 @@
From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 27 Jun 2019 09:22:18 +0200
Subject: [PATCH] lsblk: force to print PKNAME for partition
PKNAME (parent kernel device name) is based on printed tree according
to parent -> child relationship. The tree is optional and not printed
if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old
versions print the PKNAME also in this case.
Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/e3bb9bfb76c17b1d05814436ced62c05c4011f48]
Addresses: https://github.com/karelzak/util-linux/issues/813
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
misc-utils/lsblk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index e95af7af0256..3ce6da730264 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -1019,6 +1019,9 @@ static void device_to_scols(
DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name));
ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name));
+ if (!parent && dev->wholedisk)
+ parent = dev->wholedisk;
+
/* Do not print device more than one in --list mode */
if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed)
return;
--
2.17.1

View File

@@ -7,6 +7,7 @@ SRC_URI += "file://configure-sbindir.patch \
file://run-ptest \
file://display_testname_for_subtest.patch \
file://avoid_parallel_tests.patch \
file://0001-lsblk-force-to-print-PKNAME-for-partition.patch \
"
SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50"
SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"

View File

@@ -49,6 +49,8 @@ SRC_URI = "\
file://CVE-2019-12972.patch \
file://CVE-2019-14250.patch \
file://CVE-2019-14444.patch \
file://CVE-2019-17450.patch \
file://CVE-2019-17451.patch \
"
S = "${WORKDIR}/git"

View File

@@ -0,0 +1,99 @@
From 09dd135df9ebc7a4b640537e23e26a03a288a789 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Wed, 9 Oct 2019 00:07:29 +1030
Subject: [PATCH] PR25078, stack overflow in function find_abstract_instance
Selectively backporting fix for bfd/dwarf2.c, but not the ChangeLog
file. There are newer versions of binutils, but none of them contain the
commit fixing CVE-2019-17450, so backport it to master and zeus.
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=063c511bd79]
CVE: CVE-2019-17450
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
PR 25078
* dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
recur_count. Error on recur_count reaching 100 rather than
info_ptr matching orig_info_ptr. Adjust calls.
---
bfd/dwarf2.c | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 0b4e485582..20ec9e2e56 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -2803,13 +2803,13 @@ lookup_symbol_in_variable_table (struct comp_unit *unit,
}
static bfd_boolean
-find_abstract_instance (struct comp_unit * unit,
- bfd_byte * orig_info_ptr,
- struct attribute * attr_ptr,
- const char ** pname,
- bfd_boolean * is_linkage,
- char ** filename_ptr,
- int * linenumber_ptr)
+find_abstract_instance (struct comp_unit *unit,
+ struct attribute *attr_ptr,
+ unsigned int recur_count,
+ const char **pname,
+ bfd_boolean *is_linkage,
+ char **filename_ptr,
+ int *linenumber_ptr)
{
bfd *abfd = unit->abfd;
bfd_byte *info_ptr;
@@ -2820,6 +2820,14 @@ find_abstract_instance (struct comp_unit * unit,
struct attribute attr;
const char *name = NULL;
+ if (recur_count == 100)
+ {
+ _bfd_error_handler
+ (_("DWARF error: abstract instance recursion detected"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
/* DW_FORM_ref_addr can reference an entry in a different CU. It
is an offset from the .debug_info section, not the current CU. */
if (attr_ptr->form == DW_FORM_ref_addr)
@@ -2939,15 +2947,6 @@ find_abstract_instance (struct comp_unit * unit,
info_ptr, info_ptr_end);
if (info_ptr == NULL)
break;
- /* It doesn't ever make sense for DW_AT_specification to
- refer to the same DIE. Stop simple recursion. */
- if (info_ptr == orig_info_ptr)
- {
- _bfd_error_handler
- (_("DWARF error: abstract instance recursion detected"));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
switch (attr.name)
{
case DW_AT_name:
@@ -2961,7 +2960,7 @@ find_abstract_instance (struct comp_unit * unit,
}
break;
case DW_AT_specification:
- if (!find_abstract_instance (unit, info_ptr, &attr,
+ if (!find_abstract_instance (unit, &attr, recur_count + 1,
&name, is_linkage,
filename_ptr, linenumber_ptr))
return FALSE;
@@ -3175,7 +3174,7 @@ scan_unit_for_symbols (struct comp_unit *unit)
case DW_AT_abstract_origin:
case DW_AT_specification:
- if (!find_abstract_instance (unit, info_ptr, &attr,
+ if (!find_abstract_instance (unit, &attr, 0,
&func->name,
&func->is_linkage,
&func->file,
--
2.23.0

View File

@@ -0,0 +1,51 @@
From 0192438051a7e781585647d5581a2a6f62fda362 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Wed, 9 Oct 2019 10:47:13 +1030
Subject: [PATCH] PR25070, SEGV in function _bfd_dwarf2_find_nearest_line
Selectively backporting fix for bfd/dwarf2.c, but not the ChangeLog
file. There are newer versions of binutils, but none of them contain the
commit fixing CVE-2019-17451, so backport it to master and zeus.
Upstream-Status: Backport
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=336bfbeb1848]
CVE: CVE-2019-17451
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Evil testcase with two debug info sections, with sizes of 2aaaabac4ec1
and ffffd5555453b140 result in a total size of 1. Reading the first
section of course overflows the buffer and tramples on other memory.
PR 25070
* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
total_size calculation.
---
bfd/dwarf2.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 0b4e485582..a91597b1d0 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -4426,7 +4426,16 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd,
for (total_size = 0;
msec;
msec = find_debug_info (debug_bfd, debug_sections, msec))
- total_size += msec->size;
+ {
+ /* Catch PR25070 testcase overflowing size calculation here. */
+ if (total_size + msec->size < total_size
+ || total_size + msec->size < msec->size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return FALSE;
+ }
+ total_size += msec->size;
+ }
stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size);
if (stash->info_ptr_memory == NULL)
--
2.23.0

View File

@@ -0,0 +1,217 @@
From 8dbe7b475ec5e91ed767239f0e85880f416fc384 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 1 Sep 2019 00:59:16 -0400
Subject: libsupport: add checks to prevent buffer overrun bugs in quota code
A maliciously corrupted file systems can trigger buffer overruns in
the quota code used by e2fsck. To fix this, add sanity checks to the
quota header fields as well as to block number references in the quota
tree.
Addresses: CVE-2019-5094
Addresses: TALOS-2019-0887
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Upstream-Status: Backport [https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?h=maint&id=8dbe7b475ec5e91ed767239f0e85880f416fc384]
CVE: CVE-2019-5094
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
lib/support/mkquota.c | 1 +
lib/support/quotaio_tree.c | 71 ++++++++++++++++++++++++++++++----------------
lib/support/quotaio_v2.c | 28 ++++++++++++++++++
3 files changed, 76 insertions(+), 24 deletions(-)
diff --git a/lib/support/mkquota.c b/lib/support/mkquota.c
index 0b9e7665..ddb53124 100644
--- a/lib/support/mkquota.c
+++ b/lib/support/mkquota.c
@@ -671,6 +671,7 @@ errcode_t quota_compare_and_update(quota_ctx_t qctx, enum quota_type qtype,
err = qh.qh_ops->scan_dquots(&qh, scan_dquots_callback, &scan_data);
if (err) {
log_debug("Error scanning dquots");
+ *usage_inconsistent = 1;
goto out_close_qh;
}
diff --git a/lib/support/quotaio_tree.c b/lib/support/quotaio_tree.c
index a7c2028c..6cc4fb5b 100644
--- a/lib/support/quotaio_tree.c
+++ b/lib/support/quotaio_tree.c
@@ -540,6 +540,17 @@ struct dquot *qtree_read_dquot(struct quota_handle *h, qid_t id)
return dquot;
}
+static int check_reference(struct quota_handle *h, unsigned int blk)
+{
+ if (blk >= h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks) {
+ log_err("Illegal reference (%u >= %u) in %s quota file",
+ blk, h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks,
+ quota_type2name(h->qh_type));
+ return -1;
+ }
+ return 0;
+}
+
/*
* Scan all dquots in file and call callback on each
*/
@@ -558,7 +569,7 @@ static int report_block(struct dquot *dquot, unsigned int blk, char *bitmap,
int entries, i;
if (!buf)
- return 0;
+ return -1;
set_bit(bitmap, blk);
read_blk(dquot->dq_h, blk, buf);
@@ -580,23 +591,12 @@ static int report_block(struct dquot *dquot, unsigned int blk, char *bitmap,
return entries;
}
-static void check_reference(struct quota_handle *h, unsigned int blk)
-{
- if (blk >= h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks)
- log_err("Illegal reference (%u >= %u) in %s quota file. "
- "Quota file is probably corrupted.\n"
- "Please run e2fsck (8) to fix it.",
- blk,
- h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks,
- quota_type2name(h->qh_type));
-}
-
static int report_tree(struct dquot *dquot, unsigned int blk, int depth,
char *bitmap,
int (*process_dquot) (struct dquot *, void *),
void *data)
{
- int entries = 0, i;
+ int entries = 0, ret, i;
dqbuf_t buf = getdqbuf();
__le32 *ref = (__le32 *) buf;
@@ -607,22 +607,40 @@ static int report_tree(struct dquot *dquot, unsigned int blk, int depth,
if (depth == QT_TREEDEPTH - 1) {
for (i = 0; i < QT_BLKSIZE >> 2; i++) {
blk = ext2fs_le32_to_cpu(ref[i]);
- check_reference(dquot->dq_h, blk);
- if (blk && !get_bit(bitmap, blk))
- entries += report_block(dquot, blk, bitmap,
- process_dquot, data);
+ if (check_reference(dquot->dq_h, blk)) {
+ entries = -1;
+ goto errout;
+ }
+ if (blk && !get_bit(bitmap, blk)) {
+ ret = report_block(dquot, blk, bitmap,
+ process_dquot, data);
+ if (ret < 0) {
+ entries = ret;
+ goto errout;
+ }
+ entries += ret;
+ }
}
} else {
for (i = 0; i < QT_BLKSIZE >> 2; i++) {
blk = ext2fs_le32_to_cpu(ref[i]);
if (blk) {
- check_reference(dquot->dq_h, blk);
- entries += report_tree(dquot, blk, depth + 1,
- bitmap, process_dquot,
- data);
+ if (check_reference(dquot->dq_h, blk)) {
+ entries = -1;
+ goto errout;
+ }
+ ret = report_tree(dquot, blk, depth + 1,
+ bitmap, process_dquot,
+ data);
+ if (ret < 0) {
+ entries = ret;
+ goto errout;
+ }
+ entries += ret;
}
}
}
+errout:
freedqbuf(buf);
return entries;
}
@@ -642,6 +660,7 @@ int qtree_scan_dquots(struct quota_handle *h,
int (*process_dquot) (struct dquot *, void *),
void *data)
{
+ int ret;
char *bitmap;
struct v2_mem_dqinfo *v2info = &h->qh_info.u.v2_mdqi;
struct qtree_mem_dqinfo *info = &v2info->dqi_qtree;
@@ -655,10 +674,14 @@ int qtree_scan_dquots(struct quota_handle *h,
ext2fs_free_mem(&dquot);
return -1;
}
- v2info->dqi_used_entries = report_tree(dquot, QT_TREEOFF, 0, bitmap,
- process_dquot, data);
+ ret = report_tree(dquot, QT_TREEOFF, 0, bitmap, process_dquot, data);
+ if (ret < 0)
+ goto errout;
+ v2info->dqi_used_entries = ret;
v2info->dqi_data_blocks = find_set_bits(bitmap, info->dqi_blocks);
+ ret = 0;
+errout:
ext2fs_free_mem(&bitmap);
ext2fs_free_mem(&dquot);
- return 0;
+ return ret;
}
diff --git a/lib/support/quotaio_v2.c b/lib/support/quotaio_v2.c
index 38be2a34..73906676 100644
--- a/lib/support/quotaio_v2.c
+++ b/lib/support/quotaio_v2.c
@@ -175,6 +175,8 @@ static int v2_check_file(struct quota_handle *h, int type, int fmt)
static int v2_init_io(struct quota_handle *h)
{
struct v2_disk_dqinfo ddqinfo;
+ struct v2_mem_dqinfo *info;
+ __u64 filesize;
h->qh_info.u.v2_mdqi.dqi_qtree.dqi_entry_size =
sizeof(struct v2r1_disk_dqblk);
@@ -185,6 +187,32 @@ static int v2_init_io(struct quota_handle *h)
sizeof(ddqinfo)) != sizeof(ddqinfo))
return -1;
v2_disk2memdqinfo(&h->qh_info, &ddqinfo);
+
+ /* Check to make sure quota file info is sane */
+ info = &h->qh_info.u.v2_mdqi;
+ if (ext2fs_file_get_lsize(h->qh_qf.e2_file, &filesize))
+ return -1;
+ if ((filesize > (1U << 31)) ||
+ (info->dqi_qtree.dqi_blocks >
+ (filesize + QT_BLKSIZE - 1) >> QT_BLKSIZE_BITS)) {
+ log_err("Quota inode %u corrupted: file size %llu; "
+ "dqi_blocks %u", h->qh_qf.ino,
+ filesize, info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
+ if (info->dqi_qtree.dqi_free_blk >= info->dqi_qtree.dqi_blocks) {
+ log_err("Quota inode %u corrupted: free_blk %u; dqi_blocks %u",
+ h->qh_qf.ino, info->dqi_qtree.dqi_free_blk,
+ info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
+ if (info->dqi_qtree.dqi_free_entry >= info->dqi_qtree.dqi_blocks) {
+ log_err("Quota inode %u corrupted: free_entry %u; "
+ "dqi_blocks %u", h->qh_qf.ino,
+ info->dqi_qtree.dqi_free_entry,
+ info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
return 0;
}
--
cgit 1.2-0.3.lf.el7

View File

@@ -5,6 +5,7 @@ SRC_URI += "file://remove.ldconfig.call.patch \
file://ptest.patch \
file://mkdir_p.patch \
file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
file://CVE-2019-5094.patch \
"
SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \

View File

@@ -0,0 +1,55 @@
cdf_read_property_info in cdf.c in file through 5.37 does not restrict the
number of CDF_VECTOR elements, which allows a heap-based buffer overflow (4-byte
out-of-bounds write).
CVE: CVE-2019-18218
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
From 46a8443f76cec4b41ec736eca396984c74664f84 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Mon, 26 Aug 2019 14:31:39 +0000
Subject: [PATCH] Limit the number of elements in a vector (found by oss-fuzz)
---
src/cdf.c | 9 ++++-----
src/cdf.h | 1 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/cdf.c b/src/cdf.c
index 9d6396742..bb81d6374 100644
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -1016,8 +1016,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
goto out;
}
nelements = CDF_GETUINT32(q, 1);
- if (nelements == 0) {
- DPRINTF(("CDF_VECTOR with nelements == 0\n"));
+ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) {
+ DPRINTF(("CDF_VECTOR with nelements == %"
+ SIZE_T_FORMAT "u\n", nelements));
goto out;
}
slen = 2;
@@ -1060,8 +1061,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
goto out;
inp += nelem;
}
- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
- nelements));
for (j = 0; j < nelements && i < sh.sh_properties;
j++, i++)
{
diff --git a/src/cdf.h b/src/cdf.h
index 2f7e554b7..05056668f 100644
--- a/src/cdf.h
+++ b/src/cdf.h
@@ -48,6 +48,7 @@
typedef int32_t cdf_secid_t;
#define CDF_LOOP_LIMIT 10000
+#define CDF_ELEMENT_LIMIT 100000
#define CDF_SECID_NULL 0
#define CDF_SECID_FREE -1

View File

@@ -14,13 +14,16 @@ DEPENDS_class-native = "zlib-native"
# Blacklist a bogus tag in upstream check
UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
SRC_URI = "git://github.com/file/file.git"
SRC_URI = "git://github.com/file/file.git \
file://CVE-2019-18218.patch"
SRCREV = "a0d5b0e4e9f97d74a9911e95cedd579852e25398"
S = "${WORKDIR}/git"
inherit autotools update-alternatives
EXTRA_OECONF += "--disable-libseccomp"
ALTERNATIVE_${PN} = "file"
ALTERNATIVE_LINK_NAME[file] = "${bindir}/file"
@@ -29,6 +32,10 @@ EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/
FILES_${PN} += "${datadir}/misc/*.mgc"
do_compile_append_class-native() {
oe_runmake check
}
do_install_append_class-native() {
create_cmdline_wrapper ${D}/${bindir}/file \
--magic-file ${datadir}/misc/magic.mgc

View File

@@ -16,6 +16,7 @@ SRC_URI += "\
file://0006-cmd-dist-separate-host-and-target-builds.patch \
file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \
"
SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"

View File

@@ -0,0 +1,163 @@
From 265b691ac440bfb711d8de323346f7d72e620efe Mon Sep 17 00:00:00 2001
From: Filippo Valsorda <filippo@golang.org>
Date: Thu, 12 Sep 2019 12:37:36 -0400
Subject: [PATCH] [release-branch.go1.12-security] net/textproto: don't
normalize headers with spaces before the colon
RFC 7230 is clear about headers with a space before the colon, like
X-Answer : 42
being invalid, but we've been accepting and normalizing them for compatibility
purposes since CL 5690059 in 2012.
On the client side, this is harmless and indeed most browsers behave the same
to this day. On the server side, this becomes a security issue when the
behavior doesn't match that of a reverse proxy sitting in front of the server.
For example, if a WAF accepts them without normalizing them, it might be
possible to bypass its filters, because the Go server would interpret the
header differently. Worse, if the reverse proxy coalesces requests onto a
single HTTP/1.1 connection to a Go server, the understanding of the request
boundaries can get out of sync between them, allowing an attacker to tack an
arbitrary method and path onto a request by other clients, including
authentication headers unknown to the attacker.
This was recently presented at multiple security conferences:
https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn
net/http servers already reject header keys with invalid characters.
Simply stop normalizing extra spaces in net/textproto, let it return them
unchanged like it does for other invalid headers, and let net/http enforce
RFC 7230, which is HTTP specific. This loses us normalization on the client
side, but there's no right answer on the client side anyway, and hiding the
issue sounds worse than letting the application decide.
Fixes CVE-2019-16276
Change-Id: I6d272de827e0870da85d93df770d6a0e161bbcf1
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/549719
Reviewed-by: Brad Fitzpatrick <bradfitz@google.com>
(cherry picked from commit 1280b868e82bf173ea3e988be3092d160ee66082)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/558776
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
CVE: CVE-2019-16276
Upstream-Status: Backport [https://github.com/golang/go/commit/6e6f4aaf70c8b1cc81e65a26332aa9409de03ad8]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
src/net/http/serve_test.go | 4 ++++
src/net/http/transport_test.go | 27 +++++++++++++++++++++++++++
src/net/textproto/reader.go | 10 ++--------
src/net/textproto/reader_test.go | 13 ++++++-------
4 files changed, 39 insertions(+), 15 deletions(-)
diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go
index 6eb0088a96..89bfdfbb82 100644
--- a/src/net/http/serve_test.go
+++ b/src/net/http/serve_test.go
@@ -4748,6 +4748,10 @@ func TestServerValidatesHeaders(t *testing.T) {
{"foo\xffbar: foo\r\n", 400}, // binary in header
{"foo\x00bar: foo\r\n", 400}, // binary in header
{"Foo: " + strings.Repeat("x", 1<<21) + "\r\n", 431}, // header too large
+ // Spaces between the header key and colon are not allowed.
+ // See RFC 7230, Section 3.2.4.
+ {"Foo : bar\r\n", 400},
+ {"Foo\t: bar\r\n", 400},
{"foo: foo foo\r\n", 200}, // LWS space is okay
{"foo: foo\tfoo\r\n", 200}, // LWS tab is okay
diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go
index 5c329543e2..5e5438a708 100644
--- a/src/net/http/transport_test.go
+++ b/src/net/http/transport_test.go
@@ -5133,3 +5133,30 @@ func TestTransportIgnores408(t *testing.T) {
}
t.Fatalf("timeout after %v waiting for Transport connections to die off", time.Since(t0))
}
+
+func TestInvalidHeaderResponse(t *testing.T) {
+ setParallel(t)
+ defer afterTest(t)
+ cst := newClientServerTest(t, h1Mode, HandlerFunc(func(w ResponseWriter, r *Request) {
+ conn, buf, _ := w.(Hijacker).Hijack()
+ buf.Write([]byte("HTTP/1.1 200 OK\r\n" +
+ "Date: Wed, 30 Aug 2017 19:09:27 GMT\r\n" +
+ "Content-Type: text/html; charset=utf-8\r\n" +
+ "Content-Length: 0\r\n" +
+ "Foo : bar\r\n\r\n"))
+ buf.Flush()
+ conn.Close()
+ }))
+ defer cst.close()
+ res, err := cst.c.Get(cst.ts.URL)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer res.Body.Close()
+ if v := res.Header.Get("Foo"); v != "" {
+ t.Errorf(`unexpected "Foo" header: %q`, v)
+ }
+ if v := res.Header.Get("Foo "); v != "bar" {
+ t.Errorf(`bad "Foo " header value: %q, want %q`, v, "bar")
+ }
+}
diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go
index 2c4f25d5ae..1a5e364cf7 100644
--- a/src/net/textproto/reader.go
+++ b/src/net/textproto/reader.go
@@ -493,18 +493,12 @@ func (r *Reader) ReadMIMEHeader() (MIMEHeader, error) {
return m, err
}
- // Key ends at first colon; should not have trailing spaces
- // but they appear in the wild, violating specs, so we remove
- // them if present.
+ // Key ends at first colon.
i := bytes.IndexByte(kv, ':')
if i < 0 {
return m, ProtocolError("malformed MIME header line: " + string(kv))
}
- endKey := i
- for endKey > 0 && kv[endKey-1] == ' ' {
- endKey--
- }
- key := canonicalMIMEHeaderKey(kv[:endKey])
+ key := canonicalMIMEHeaderKey(kv[:i])
// As per RFC 7230 field-name is a token, tokens consist of one or more chars.
// We could return a ProtocolError here, but better to be liberal in what we
diff --git a/src/net/textproto/reader_test.go b/src/net/textproto/reader_test.go
index f85fbdc36d..b92fdcd3c7 100644
--- a/src/net/textproto/reader_test.go
+++ b/src/net/textproto/reader_test.go
@@ -188,11 +188,10 @@ func TestLargeReadMIMEHeader(t *testing.T) {
}
}
-// Test that we read slightly-bogus MIME headers seen in the wild,
-// with spaces before colons, and spaces in keys.
+// TestReadMIMEHeaderNonCompliant checks that we don't normalize headers
+// with spaces before colons, and accept spaces in keys.
func TestReadMIMEHeaderNonCompliant(t *testing.T) {
- // Invalid HTTP response header as sent by an Axis security
- // camera: (this is handled by IE, Firefox, Chrome, curl, etc.)
+ // These invalid headers will be rejected by net/http according to RFC 7230.
r := reader("Foo: bar\r\n" +
"Content-Language: en\r\n" +
"SID : 0\r\n" +
@@ -202,9 +201,9 @@ func TestReadMIMEHeaderNonCompliant(t *testing.T) {
want := MIMEHeader{
"Foo": {"bar"},
"Content-Language": {"en"},
- "Sid": {"0"},
- "Audio Mode": {"None"},
- "Privilege": {"127"},
+ "SID ": {"0"},
+ "Audio Mode ": {"None"},
+ "Privilege ": {"127"},
}
if !reflect.DeepEqual(m, want) || err != nil {
t.Fatalf("ReadMIMEHeader =\n%v, %v; want:\n%v", m, err, want)

View File

@@ -31,6 +31,7 @@ FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \
perl-module-constant perl-module-file-basename \
perl-module-fcntl perl-module-strict perl-module-vars \
perl-module-carp \
"
ALTERNATIVE_PRIORITY = "100"

View File

@@ -0,0 +1,31 @@
We need opkg-build to fail if for example the tar command is passed invalid
options. Without this, we see silently created empty packaged where data.tar
is zero bytes in size. This creates hard to debug problems.
An example is when reproducible builds are enabled and run on old hosts like
centos7 which has tar < 1.28:
Subprocess output:tar: unrecognized option '--clamp-mtime'
Try `tar --help' or `tar --usage' for more information.
Upstream-Status: Pending
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: opkg-utils-0.4.1/opkg-build
===================================================================
--- opkg-utils-0.4.1.orig/opkg-build
+++ opkg-utils-0.4.1/opkg-build
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
: <<=cut
=head1 NAME
@@ -12,6 +12,7 @@ opkg-build - construct an .opk from a di
# Updated to work on Familiar Pre0.7rc1, with busybox tar.
# Note it Requires: binutils-ar (since the busybox ar can't create)
set -e
+set -o pipefail
version=1.0

View File

@@ -10,6 +10,7 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu
SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
file://0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch \
file://pipefail.patch \
"
UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
@@ -19,6 +20,8 @@ SRC_URI[sha256sum] = "9ea9efdd9fe13661ad251e3a2860c1c93045adcfaa6659c3e86d9748ec
TARGET_CC_ARCH += "${LDFLAGS}"
RDEPENDS_${PN} += "bash"
# For native builds we use the host Python
PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold"
PYTHONRDEPS_class-native = ""

View File

@@ -0,0 +1,46 @@
From alejandro.delcastillo@ni.com Wed Nov 20 22:35:02 2019
From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org>
CC: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Subject: [opkg][PATCH 2/2] open_inner: add support for empty payloads
Date: Wed, 20 Nov 2019 16:34:48 -0600
Message-ID: <20191120223448.26522-3-alejandro.delcastillo@ni.com>
X-Mailer: git-send-email 2.22.0
In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com>
References: <20191120223448.26522-1-alejandro.delcastillo@ni.com>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Support for empty compressed payloads need to be explicitly enabled on
libarchive.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Upstream-Status: Backport
---
libopkg/opkg_archive.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
index 0e9ccea..f19cece 100644
--- a/libopkg/opkg_archive.c
+++ b/libopkg/opkg_archive.c
@@ -618,6 +618,13 @@ static struct archive *open_inner(struct archive *outer)
goto err_cleanup;
}
+ r = archive_read_support_format_empty(inner);
+ if (r != ARCHIVE_OK) {
+ opkg_msg(ERROR, "Empty format not supported: %s\n",
+ archive_error_string(inner));
+ goto err_cleanup;
+ }
+
r = archive_read_open(inner, data, NULL, inner_read, inner_close);
if (r != ARCHIVE_OK) {
opkg_msg(ERROR, "Failed to open inner archive: %s\n",
--
2.22.0

View File

@@ -0,0 +1,54 @@
From alejandro.delcastillo@ni.com Wed Nov 20 22:35:01 2019
Return-Path: <richard.purdie+caf_=rpurdie=rpsys.net@linuxfoundation.org>
From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org>
CC: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Subject: [opkg][PATCH 1/2] opkg_archive.c: avoid double free on uncompress
error
Date: Wed, 20 Nov 2019 16:34:47 -0600
Message-ID: <20191120223448.26522-2-alejandro.delcastillo@ni.com>
X-Mailer: git-send-email 2.22.0
In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com>
References: <20191120223448.26522-1-alejandro.delcastillo@ni.com>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
The open-inner function calls archive_read_open. On error,
archive_read_open calls inner_close, which also closes the outter
archive. On error, return NULL directly to avoid double free.
Upstream-Status: Backport
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
---
libopkg/opkg_archive.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
index 3d87db1..0e9ccea 100644
--- a/libopkg/opkg_archive.c
+++ b/libopkg/opkg_archive.c
@@ -622,7 +622,7 @@ static struct archive *open_inner(struct archive *outer)
if (r != ARCHIVE_OK) {
opkg_msg(ERROR, "Failed to open inner archive: %s\n",
archive_error_string(inner));
- goto err_cleanup;
+ return NULL;
}
return inner;
@@ -683,7 +683,7 @@ static struct archive *extract_outer(const char *filename, const char *arname)
inner = open_inner(outer);
if (!inner)
- goto err_cleanup;
+ return NULL;
return inner;
--
2.22.0

View File

@@ -14,6 +14,8 @@ PE = "1"
SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
file://opkg.conf \
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
file://opkg_archive.patch \
file://open_inner.patch \
file://run-ptest \
"

View File

@@ -6,8 +6,8 @@ Subject: [PATCH] Invoke ed directly instead of using the shell
* src/pch.c (do_ed_script): Invoke ed directly instead of using a shell
command to avoid quoting vulnerabilities.
CVE: CVE-2019-13638
Upstream-Status: Backport[https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0]
CVE: CVE-2019-13638 CVE-2018-20969
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0]
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
---

View File

@@ -0,0 +1,106 @@
From 4e41a05de1f34ba00a68ca4f20fb49c4d1cbd2d0 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 6 Nov 2019 12:17:46 +0000
Subject: [PATCH] Add statx glibc/syscall support
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>
Upstream-Status: Submitted [Emailed to seebs]
---
ports/linux/guts/statx.c | 48 ++++++++++++++++++++++++++++++++++++++++
ports/linux/portdefs.h | 1 +
ports/linux/wrapfuncs.in | 1 +
3 files changed, 50 insertions(+)
create mode 100644 ports/linux/guts/statx.c
diff --git a/ports/linux/statx/guts/statx.c b/ports/linux/statx/guts/statx.c
new file mode 100644
index 0000000..a3259c4
--- /dev/null
+++ b/ports/linux/statx/guts/statx.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019 Linux Foundation
+ * Author: Richard Purdie
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * int
+ * statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf) {
+ * int rc = -1;
+ */
+ pseudo_msg_t *msg;
+ PSEUDO_STATBUF buf;
+ int save_errno;
+
+ rc = real_statx(dirfd, pathname, flags, mask, statxbuf);
+ save_errno = errno;
+ if (rc == -1) {
+ return rc;
+ }
+
+ buf.st_uid = statxbuf->stx_uid;
+ buf.st_gid = statxbuf->stx_gid;
+ buf.st_dev = makedev(statxbuf->stx_dev_major, statxbuf->stx_dev_minor);
+ buf.st_ino = statxbuf->stx_ino;
+ buf.st_mode = statxbuf->stx_mode;
+ buf.st_rdev = makedev(statxbuf->stx_rdev_major, statxbuf->stx_rdev_minor);
+ buf.st_nlink = statxbuf->stx_nlink;
+ msg = pseudo_client_op(OP_STAT, 0, -1, dirfd, pathname, &buf);
+ if (msg && msg->result == RESULT_SUCCEED) {
+ pseudo_debug(PDBGF_FILE, "statx(path %s), flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid);
+ statxbuf->stx_uid = msg->uid;
+ statxbuf->stx_gid = msg->gid;
+ statxbuf->stx_mode = msg->mode;
+ statxbuf->stx_rdev_major = major(msg->rdev);
+ statxbuf->stx_rdev_minor = minor(msg->rdev);
+ } else {
+ pseudo_debug(PDBGF_FILE, "statx(path %s) failed, flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid);
+ }
+ errno = save_errno;
+/* return rc;
+ * }
+ */
diff --git a/ports/linux/statx/portdefs.h b/ports/linux/statx/portdefs.h
new file mode 100644
index 0000000..bf934dc
--- /dev/null
+++ b/ports/linux/statx/portdefs.h
@@ -0,0 +1,6 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ */
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
diff --git a/ports/linux/statx/wrapfuncs.in b/ports/linux/statx/wrapfuncs.in
new file mode 100644
index 0000000..c9cd4c3
--- /dev/null
+++ b/ports/linux/statx/wrapfuncs.in
@@ -0,0 +1 @@
+int statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf);
diff --git a/ports/linux/subports b/ports/linux/subports
index a29044a..49081bf 100755
--- a/ports/linux/subports
+++ b/ports/linux/subports
@@ -54,3 +54,13 @@ else
fi
rm -f dummy.c dummy.o
+cat > dummy.c <<EOF
+#define _GNU_SOURCE
+#include <sys/stat.h>
+struct statx x;
+EOF
+if ${CC} -c -o dummy.o dummy.c >/dev/null 2>&1; then
+ echo "linux/statx"
+fi
+rm -f dummy.c dummy.o
+
--
2.17.1

View File

@@ -30,23 +30,10 @@ PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback --enable-ep
# Compile for the local machine arch...
do_compile () {
SQLITE_LDADD='$(SQLITE)/$(SQLITE_LIB)/libsqlite3.a'
for sqlite_link_opt in $(pkg-config sqlite3 --libs --static)
do
case "$sqlite_link_opt" in
-lsqlite3)
;;
-l*)
SQLITE_LDADD="${SQLITE_LDADD} ${sqlite_link_opt}"
;;
*)
;;
esac
done
if [ "${SITEINFO_BITS}" = "64" ]; then
${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --with-static-sqlite="$SQLITE_LDADD" --without-rpath
${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath
else
${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --with-static-sqlite="$SQLITE_LDADD" --without-rpath
${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath
fi
oe_runmake ${MAKEOPTS}
}

View File

@@ -7,6 +7,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo \
file://moreretries.patch \
file://toomanyfiles.patch \
file://0001-maketables-wrappers-use-Python-3.patch \
file://0001-Add-statx.patch \
"
SRCREV = "060058bb29f70b244e685b3c704eb0641b736f73"

View File

@@ -1,4 +1,4 @@
From 12292444e1b3662b994bc223d92b8338fb0895ff Mon Sep 17 00:00:00 2001
From 6cbb7529cf7ff0da3ca649fb3486facd9620d625 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 25 Oct 2018 07:32:14 +0000
Subject: [PATCH] python-native: fix one do_populate_sysroot warning
@@ -17,23 +17,24 @@ when do_populate_sysroot. use append to fix it.
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 7bf13ed..6c0f29b 100644
index a2c8127..22f9e23 100644
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ def add_dir_to_list(dirlist, dir):
1) 'dir' is not already in 'dirlist'
2) 'dir' actually exists, and is a directory."""
if dir is not None and os.path.isdir(dir) and dir not in dirlist:
- dirlist.insert(0, dir)
+ dirlist.append(dir)
def macosx_sdk_root():
"""
@@ -47,7 +47,7 @@ def add_dir_to_list(dirlist, dir):
else:
dir_exists = os.path.isdir(dir)
if dir_exists:
- dirlist.insert(0, dir)
+ dirlist.append(dir)
MACOS_SDK_ROOT = None
--
2.18.0
2.17.1

View File

@@ -12,7 +12,7 @@ SRC_URI += "\
file://nohostlibs.patch \
file://multilib.patch \
file://add-md5module-support.patch \
file://builddir.patch \
file://0001-python-Resolve-intermediate-staging-issues.patch \
file://parallel-makeinst-create-bindir.patch \
file://revert_use_of_sysconfigdata.patch \
file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \

View File

@@ -8,16 +8,10 @@ INC_PR = "r1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://bpo-35907-cve-2019-9948.patch \
file://bpo-35907-cve-2019-9948-fix.patch \
file://bpo-36216-cve-2019-9636.patch \
file://bpo-36216-cve-2019-9636-fix.patch \
file://CVE-2019-9740.patch \
file://CVE-2018-20852.patch \
"
SRC_URI[md5sum] = "30157d85a2c0479c09ea2cbe61f2aaf5"
SRC_URI[sha256sum] = "f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7"
SRC_URI[md5sum] = "b3b6d2c92f42a60667814358ab9f0cfd"
SRC_URI[sha256sum] = "4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41"
# python recipe is actually python 2.x
# also, exclude pre-releases for both python 2.x and 3.x

View File

@@ -1,5 +1,10 @@
When cross compiling python, we used to need to install the Makefile, pyconfig.h
and the python library to their final location before being able to compile the
From 77bcb3238b2853d511714544e0f84a37be6c79bf Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 14 Nov 2012 14:31:24 +0000
Subject: [PATCH] python: Resolve intermediate staging issues
When cross compiling python, we used to need to install the Makefile, pyconfig.h
and the python library to their final location before being able to compile the
rest of python. This change allows us to point python at its own source when
building, avoiding a variety of sysroot staging issues and simplifying the main
python recipe.
@@ -7,10 +12,29 @@ python recipe.
Upstream-Status: Inappropriate
RP 2012/11/13
Index: Python-2.7.9/Lib/sysconfig.py
===================================================================
--- Python-2.7.9.orig/Lib/sysconfig.py
+++ Python-2.7.9/Lib/sysconfig.py
---
Lib/distutils/sysconfig.py | 3 +++
Lib/sysconfig.py | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 2f4b8ca..15bceb5 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -31,6 +31,9 @@ else:
# sys.executable can be empty if argv[0] has been changed and Python is
# unable to retrieve the real program name
project_base = os.getcwd()
+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
+if _PYTHONBUILDDIR:
+ project_base = _PYTHONBUILDDIR
if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
# PC/VS7.1
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 9c8350d..bddbe2e 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix)
_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
_CONFIG_VARS = None
@@ -30,17 +54,6 @@ Index: Python-2.7.9/Lib/sysconfig.py
_PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
else:
# sys.executable can be empty if argv[0] has been changed and Python is
Index: Python-2.7.9/Lib/distutils/sysconfig.py
===================================================================
--- Python-2.7.9.orig/Lib/distutils/sysconfig.py
+++ Python-2.7.9/Lib/distutils/sysconfig.py
@@ -26,6 +26,9 @@ EXEC_PREFIX = os.path.normpath(sys.exec_
# live in project/PCBuild9. If we're dealing with an x64 Windows build,
# it'll live in project/PCbuild/amd64.
project_base = os.path.dirname(os.path.abspath(sys.executable))
+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
+if _PYTHONBUILDDIR:
+ project_base = _PYTHONBUILDDIR
if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
# PC/VS7.1
--
2.17.1

View File

@@ -1,123 +0,0 @@
From 979daae300916adb399ab5b51410b6ebd0888f13 Mon Sep 17 00:00:00 2001
From: Xtreak <tir.karthi@gmail.com>
Date: Sat, 15 Jun 2019 20:59:43 +0530
Subject: [PATCH] [2.7] bpo-35121: prefix dot in domain for proper subdomain
validation (GH-10258) (GH-13426)
This is a manual backport of ca7fe5063593958e5efdf90f068582837f07bd14 since 2.7 has `http.cookiejar` in `cookielib`
https://bugs.python.org/issue35121
CVE: CVE-2018-20852
Upstream-Status: Backport [https://github.com/python/cpython/pull/13426]
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
Lib/cookielib.py | 13 ++++++--
Lib/test/test_cookielib.py | 30 +++++++++++++++++++
.../2019-05-20-00-35-12.bpo-35121.RRi-HU.rst | 4 +++
3 files changed, 45 insertions(+), 2 deletions(-)
create mode 100644 Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst
diff --git a/Lib/cookielib.py b/Lib/cookielib.py
index 2dd7c48728e0..0b471a42f296 100644
--- a/Lib/cookielib.py
+++ b/Lib/cookielib.py
@@ -1139,6 +1139,11 @@ def return_ok_domain(self, cookie, request):
req_host, erhn = eff_request_host(request)
domain = cookie.domain
+ if domain and not domain.startswith("."):
+ dotdomain = "." + domain
+ else:
+ dotdomain = domain
+
# strict check of non-domain cookies: Mozilla does this, MSIE5 doesn't
if (cookie.version == 0 and
(self.strict_ns_domain & self.DomainStrictNonDomain) and
@@ -1151,7 +1156,7 @@ def return_ok_domain(self, cookie, request):
_debug(" effective request-host name %s does not domain-match "
"RFC 2965 cookie domain %s", erhn, domain)
return False
- if cookie.version == 0 and not ("."+erhn).endswith(domain):
+ if cookie.version == 0 and not ("."+erhn).endswith(dotdomain):
_debug(" request-host %s does not match Netscape cookie domain "
"%s", req_host, domain)
return False
@@ -1165,7 +1170,11 @@ def domain_return_ok(self, domain, request):
req_host = "."+req_host
if not erhn.startswith("."):
erhn = "."+erhn
- if not (req_host.endswith(domain) or erhn.endswith(domain)):
+ if domain and not domain.startswith("."):
+ dotdomain = "." + domain
+ else:
+ dotdomain = domain
+ if not (req_host.endswith(dotdomain) or erhn.endswith(dotdomain)):
#_debug(" request domain %s does not match cookie domain %s",
# req_host, domain)
return False
diff --git a/Lib/test/test_cookielib.py b/Lib/test/test_cookielib.py
index f2dd9727d137..7f7ff614d61d 100644
--- a/Lib/test/test_cookielib.py
+++ b/Lib/test/test_cookielib.py
@@ -368,6 +368,7 @@ def test_domain_return_ok(self):
("http://foo.bar.com/", ".foo.bar.com", True),
("http://foo.bar.com/", "foo.bar.com", True),
("http://foo.bar.com/", ".bar.com", True),
+ ("http://foo.bar.com/", "bar.com", True),
("http://foo.bar.com/", "com", True),
("http://foo.com/", "rhubarb.foo.com", False),
("http://foo.com/", ".foo.com", True),
@@ -378,6 +379,8 @@ def test_domain_return_ok(self):
("http://foo/", "foo", True),
("http://foo/", "foo.local", True),
("http://foo/", ".local", True),
+ ("http://barfoo.com", ".foo.com", False),
+ ("http://barfoo.com", "foo.com", False),
]:
request = urllib2.Request(url)
r = pol.domain_return_ok(domain, request)
@@ -938,6 +941,33 @@ def test_domain_block(self):
c.add_cookie_header(req)
self.assertFalse(req.has_header("Cookie"))
+ c.clear()
+
+ pol.set_blocked_domains([])
+ req = Request("http://acme.com/")
+ res = FakeResponse(headers, "http://acme.com/")
+ cookies = c.make_cookies(res, req)
+ c.extract_cookies(res, req)
+ self.assertEqual(len(c), 1)
+
+ req = Request("http://acme.com/")
+ c.add_cookie_header(req)
+ self.assertTrue(req.has_header("Cookie"))
+
+ req = Request("http://badacme.com/")
+ c.add_cookie_header(req)
+ self.assertFalse(pol.return_ok(cookies[0], req))
+ self.assertFalse(req.has_header("Cookie"))
+
+ p = pol.set_blocked_domains(["acme.com"])
+ req = Request("http://acme.com/")
+ c.add_cookie_header(req)
+ self.assertFalse(req.has_header("Cookie"))
+
+ req = Request("http://badacme.com/")
+ c.add_cookie_header(req)
+ self.assertFalse(req.has_header("Cookie"))
+
def test_secure(self):
from cookielib import CookieJar, DefaultCookiePolicy
diff --git a/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst b/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst
new file mode 100644
index 000000000000..77251806163b
--- /dev/null
+++ b/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst
@@ -0,0 +1,4 @@
+Don't send cookies of domain A without Domain attribute to domain B when
+domain A is a suffix match of domain B while using a cookiejar with
+:class:`cookielib.DefaultCookiePolicy` policy. Patch by Karthikeyan
+Singaravelan.

View File

@@ -1,216 +0,0 @@
From bb8071a4cae5ab3fe321481dd3d73662ffb26052 Mon Sep 17 00:00:00 2001
From: Victor Stinner <victor.stinner@gmail.com>
Date: Tue, 21 May 2019 15:12:33 +0200
Subject: [PATCH] bpo-30458: Disallow control chars in http URLs (GH-12755)
(GH-13154) (GH-13315)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Disallow control chars in http URLs in urllib2.urlopen. This
addresses a potential security problem for applications that do not
sanity check their URLs where http request headers could be injected.
Disable https related urllib tests on a build without ssl (GH-13032)
These tests require an SSL enabled build. Skip these tests when
python is built without SSL to fix test failures.
Use httplib.InvalidURL instead of ValueError as the new error case's
exception. (GH-13044)
Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit 7e200e0763f5b71c199aaf98bd5588f291585619)
Notes on backport to Python 2.7:
* test_urllib tests urllib.urlopen() which quotes the URL and so is
not vulerable to HTTP Header Injection.
* Add tests to test_urllib2 on urllib2.urlopen().
* Reject non-ASCII characters: range 0x80-0xff.
Upstream-Status: Backport
CVE: CVE-2019-9740
CVE: CVE-2019-9947
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
Lib/httplib.py | 16 ++++++
Lib/test/test_urllib.py | 25 +++++++++
Lib/test/test_urllib2.py | 51 ++++++++++++++++++-
Lib/test/test_xmlrpc.py | 8 ++-
.../2019-04-10-08-53-30.bpo-30458.51E-DA.rst | 1 +
5 files changed, 99 insertions(+), 2 deletions(-)
create mode 100644 Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 60a8fb4e355f..1b41c346e090 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -247,6 +247,16 @@
_is_legal_header_name = re.compile(r'\A[^:\s][^:\r\n]*\Z').match
_is_illegal_header_value = re.compile(r'\n(?![ \t])|\r(?![ \t\n])').search
+# These characters are not allowed within HTTP URL paths.
+# See https://tools.ietf.org/html/rfc3986#section-3.3 and the
+# https://tools.ietf.org/html/rfc3986#appendix-A pchar definition.
+# Prevents CVE-2019-9740. Includes control characters such as \r\n.
+# Restrict non-ASCII characters above \x7f (0x80-0xff).
+_contains_disallowed_url_pchar_re = re.compile('[\x00-\x20\x7f-\xff]')
+# Arguably only these _should_ allowed:
+# _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$")
+# We are more lenient for assumed real world compatibility purposes.
+
# We always set the Content-Length header for these methods because some
# servers will otherwise respond with a 411
_METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'}
@@ -927,6 +937,12 @@ def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0):
self._method = method
if not url:
url = '/'
+ # Prevent CVE-2019-9740.
+ match = _contains_disallowed_url_pchar_re.search(url)
+ if match:
+ raise InvalidURL("URL can't contain control characters. %r "
+ "(found at least %r)"
+ % (url, match.group()))
hdr = '%s %s %s' % (method, url, self._http_vsn_str)
self._output(hdr)
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 1ce9201c0693..d7778d4194f3 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -257,6 +257,31 @@ def test_url_fragment(self):
finally:
self.unfakehttp()
+ def test_url_with_control_char_rejected(self):
+ for char_no in range(0, 0x21) + range(0x7f, 0x100):
+ char = chr(char_no)
+ schemeless_url = "//localhost:7777/test%s/" % char
+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
+ try:
+ # urllib quotes the URL so there is no injection.
+ resp = urllib.urlopen("http:" + schemeless_url)
+ self.assertNotIn(char, resp.geturl())
+ finally:
+ self.unfakehttp()
+
+ def test_url_with_newline_header_injection_rejected(self):
+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
+ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
+ schemeless_url = "//" + host + ":8080/test/?test=a"
+ try:
+ # urllib quotes the URL so there is no injection.
+ resp = urllib.urlopen("http:" + schemeless_url)
+ self.assertNotIn(' ', resp.geturl())
+ self.assertNotIn('\r', resp.geturl())
+ self.assertNotIn('\n', resp.geturl())
+ finally:
+ self.unfakehttp()
+
def test_read_bogus(self):
# urlopen() should raise IOError for many error codes.
self.fakehttp('''HTTP/1.1 401 Authentication Required
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 6d24d5ddf83c..9531818e16b2 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -15,6 +15,9 @@
except ImportError:
ssl = None
+from test.test_urllib import FakeHTTPMixin
+
+
# XXX
# Request
# CacheFTPHandler (hard to write)
@@ -1262,7 +1265,7 @@ def _test_basic_auth(self, opener, auth_handler, auth_header,
self.assertEqual(len(http_handler.requests), 1)
self.assertFalse(http_handler.requests[0].has_header(auth_header))
-class MiscTests(unittest.TestCase):
+class MiscTests(unittest.TestCase, FakeHTTPMixin):
def test_build_opener(self):
class MyHTTPHandler(urllib2.HTTPHandler): pass
@@ -1317,6 +1320,52 @@ def test_unsupported_algorithm(self):
"Unsupported digest authentication algorithm 'invalid'"
)
+ @unittest.skipUnless(ssl, "ssl module required")
+ def test_url_with_control_char_rejected(self):
+ for char_no in range(0, 0x21) + range(0x7f, 0x100):
+ char = chr(char_no)
+ schemeless_url = "//localhost:7777/test%s/" % char
+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
+ try:
+ # We explicitly test urllib.request.urlopen() instead of the top
+ # level 'def urlopen()' function defined in this... (quite ugly)
+ # test suite. They use different url opening codepaths. Plain
+ # urlopen uses FancyURLOpener which goes via a codepath that
+ # calls urllib.parse.quote() on the URL which makes all of the
+ # above attempts at injection within the url _path_ safe.
+ escaped_char_repr = repr(char).replace('\\', r'\\')
+ InvalidURL = httplib.InvalidURL
+ with self.assertRaisesRegexp(
+ InvalidURL, "contain control.*" + escaped_char_repr):
+ urllib2.urlopen("http:" + schemeless_url)
+ with self.assertRaisesRegexp(
+ InvalidURL, "contain control.*" + escaped_char_repr):
+ urllib2.urlopen("https:" + schemeless_url)
+ finally:
+ self.unfakehttp()
+
+ @unittest.skipUnless(ssl, "ssl module required")
+ def test_url_with_newline_header_injection_rejected(self):
+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
+ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
+ schemeless_url = "//" + host + ":8080/test/?test=a"
+ try:
+ # We explicitly test urllib2.urlopen() instead of the top
+ # level 'def urlopen()' function defined in this... (quite ugly)
+ # test suite. They use different url opening codepaths. Plain
+ # urlopen uses FancyURLOpener which goes via a codepath that
+ # calls urllib.parse.quote() on the URL which makes all of the
+ # above attempts at injection within the url _path_ safe.
+ InvalidURL = httplib.InvalidURL
+ with self.assertRaisesRegexp(
+ InvalidURL, r"contain control.*\\r.*(found at least . .)"):
+ urllib2.urlopen("http:" + schemeless_url)
+ with self.assertRaisesRegexp(InvalidURL, r"contain control.*\\n"):
+ urllib2.urlopen("https:" + schemeless_url)
+ finally:
+ self.unfakehttp()
+
+
class RequestTests(unittest.TestCase):
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index 36b3be67fd6b..90ccb30716ff 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -659,7 +659,13 @@ def test_dotted_attribute(self):
def test_partial_post(self):
# Check that a partial POST doesn't make the server loop: issue #14001.
conn = httplib.HTTPConnection(ADDR, PORT)
- conn.request('POST', '/RPC2 HTTP/1.0\r\nContent-Length: 100\r\n\r\nbye')
+ conn.send('POST /RPC2 HTTP/1.0\r\n'
+ 'Content-Length: 100\r\n\r\n'
+ 'bye HTTP/1.1\r\n'
+ 'Host: %s:%s\r\n'
+ 'Accept-Encoding: identity\r\n'
+ 'Content-Length: 0\r\n\r\n'
+ % (ADDR, PORT))
conn.close()
class SimpleServerEncodingTestCase(BaseServerTestCase):
diff --git a/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
new file mode 100644
index 000000000000..47cb899df1af
--- /dev/null
+++ b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
@@ -0,0 +1 @@
+Address CVE-2019-9740 by disallowing URL paths with embedded whitespace or control characters through into the underlying http client request. Such potentially malicious header injection URLs now cause an httplib.InvalidURL exception to be raised.

View File

@@ -1,55 +0,0 @@
From 179a5f75f1121dab271fe8f90eb35145f9dcbbda Mon Sep 17 00:00:00 2001
From: Sihoon Lee <push0ebp@gmail.com>
Date: Fri, 17 May 2019 02:41:06 +0900
Subject: [PATCH] Update test_urllib.py and urllib.py\nchange assertEqual into
assertRasies in DummyURLopener test, and simplify mitigation
Upstream-Status: Submitted https://github.com/python/cpython/pull/11842
CVE: CVE-2019-9948
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
Lib/test/test_urllib.py | 11 +++--------
Lib/urllib.py | 4 ++--
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index e5f210e62a18..1e23dfb0bb16 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -1027,14 +1027,9 @@ def test_local_file_open(self):
class DummyURLopener(urllib.URLopener):
def open_local_file(self, url):
return url
- self.assertEqual(DummyURLopener().open(
- 'local-file://example'), '//example')
- self.assertEqual(DummyURLopener().open(
- 'local_file://example'), '//example')
- self.assertRaises(IOError, urllib.urlopen,
- 'local-file://example')
- self.assertRaises(IOError, urllib.urlopen,
- 'local_file://example')
+ for url in ('local_file://example', 'local-file://example'):
+ self.assertRaises(IOError, DummyURLopener().open, url)
+ self.assertRaises(IOError, urllib.urlopen, url)
# Just commented them out.
# Can't really tell why keep failing in windows and sparc.
diff --git a/Lib/urllib.py b/Lib/urllib.py
index a24e9a5c68fb..39b834054e9e 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -203,10 +203,10 @@ def open(self, fullurl, data=None):
name = 'open_' + urltype
self.type = urltype
name = name.replace('-', '_')
-
+
# bpo-35907: # disallow the file reading with the type not allowed
if not hasattr(self, name) or \
- (self == _urlopener and name == 'open_local_file'):
+ getattr(self, name) == self.open_local_file:
if proxy:
return self.open_unknown_proxy(proxy, fullurl, data)
else:

View File

@@ -1,55 +0,0 @@
From 8f99cc799e4393bf1112b9395b2342f81b3f45ef Mon Sep 17 00:00:00 2001
From: push0ebp <push0ebp@shl-MacBook-Pro.local>
Date: Thu, 14 Feb 2019 02:05:46 +0900
Subject: [PATCH] bpo-35907: Avoid file reading as disallowing the unnecessary
URL scheme in urllib
Upstream-Status: Submitted https://github.com/python/cpython/pull/11842
CVE: CVE-2019-9948
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
Lib/test/test_urllib.py | 12 ++++++++++++
Lib/urllib.py | 5 ++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 1ce9201c0693..e5f210e62a18 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -1023,6 +1023,18 @@ def open_spam(self, url):
"spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/"),
"//c:|windows%/:=&?~#+!$,;'@()*[]|/path/")
+ def test_local_file_open(self):
+ class DummyURLopener(urllib.URLopener):
+ def open_local_file(self, url):
+ return url
+ self.assertEqual(DummyURLopener().open(
+ 'local-file://example'), '//example')
+ self.assertEqual(DummyURLopener().open(
+ 'local_file://example'), '//example')
+ self.assertRaises(IOError, urllib.urlopen,
+ 'local-file://example')
+ self.assertRaises(IOError, urllib.urlopen,
+ 'local_file://example')
# Just commented them out.
# Can't really tell why keep failing in windows and sparc.
diff --git a/Lib/urllib.py b/Lib/urllib.py
index d85504a5cb7e..a24e9a5c68fb 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -203,7 +203,10 @@ def open(self, fullurl, data=None):
name = 'open_' + urltype
self.type = urltype
name = name.replace('-', '_')
- if not hasattr(self, name):
+
+ # bpo-35907: # disallow the file reading with the type not allowed
+ if not hasattr(self, name) or \
+ (self == _urlopener and name == 'open_local_file'):
if proxy:
return self.open_unknown_proxy(proxy, fullurl, data)
else:

View File

@@ -1,28 +0,0 @@
From 06b5ee585d6e76bdbb4002f642d864d860cbbd2b Mon Sep 17 00:00:00 2001
From: Steve Dower <steve.dower@python.org>
Date: Tue, 12 Mar 2019 08:23:33 -0700
Subject: [PATCH] bpo-36216: Only print test messages when verbose
CVE: CVE-2019-9636
Upstream-Status: Backport https://github.com/python/cpython/pull/12291/commits/06b5ee585d6e76bdbb4002f642d864d860cbbd2b
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
Lib/test/test_urlparse.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index 73b0228ea8e3..1830d0b28688 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -644,7 +644,8 @@ def test_urlsplit_normalization(self):
for scheme in [u"http", u"https", u"ftp"]:
for c in denorm_chars:
url = u"{}://netloc{}false.netloc/path".format(scheme, c)
- print "Checking %r" % url
+ if test_support.verbose:
+ print "Checking %r" % url
with self.assertRaises(ValueError):
urlparse.urlsplit(url)

View File

@@ -1,111 +0,0 @@
From 3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e Mon Sep 17 00:00:00 2001
From: Steve Dower <steve.dower@python.org>
Date: Thu, 7 Mar 2019 08:25:22 -0800
Subject: [PATCH] bpo-36216: Add check for characters in netloc that normalize
to separators (GH-12201)
CVE: CVE-2019-9636
Upstream-Status: Backport https://github.com/python/cpython/pull/12216/commits/3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
Doc/library/urlparse.rst | 20 ++++++++++++++++
Lib/test/test_urlparse.py | 24 +++++++++++++++++++
Lib/urlparse.py | 17 +++++++++++++
.../2019-03-06-09-38-40.bpo-36216.6q1m4a.rst | 3 +++
4 files changed, 64 insertions(+)
create mode 100644 Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index 4e1ded73c266..73b0228ea8e3 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -1,4 +1,6 @@
from test import test_support
+import sys
+import unicodedata
import unittest
import urlparse
@@ -624,6 +626,28 @@ def test_portseparator(self):
self.assertEqual(urlparse.urlparse("http://www.python.org:80"),
('http','www.python.org:80','','','',''))
+ def test_urlsplit_normalization(self):
+ # Certain characters should never occur in the netloc,
+ # including under normalization.
+ # Ensure that ALL of them are detected and cause an error
+ illegal_chars = u'/:#?@'
+ hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars}
+ denorm_chars = [
+ c for c in map(unichr, range(128, sys.maxunicode))
+ if (hex_chars & set(unicodedata.decomposition(c).split()))
+ and c not in illegal_chars
+ ]
+ # Sanity check that we found at least one such character
+ self.assertIn(u'\u2100', denorm_chars)
+ self.assertIn(u'\uFF03', denorm_chars)
+
+ for scheme in [u"http", u"https", u"ftp"]:
+ for c in denorm_chars:
+ url = u"{}://netloc{}false.netloc/path".format(scheme, c)
+ print "Checking %r" % url
+ with self.assertRaises(ValueError):
+ urlparse.urlsplit(url)
+
def test_main():
test_support.run_unittest(UrlParseTestCase)
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index f7c2b032b097..54eda08651ab 100644
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -165,6 +165,21 @@ def _splitnetloc(url, start=0):
delim = min(delim, wdelim) # use earliest delim position
return url[start:delim], url[delim:] # return (domain, rest)
+def _checknetloc(netloc):
+ if not netloc or not isinstance(netloc, unicode):
+ return
+ # looking for characters like \u2100 that expand to 'a/c'
+ # IDNA uses NFKC equivalence, so normalize for this check
+ import unicodedata
+ netloc2 = unicodedata.normalize('NFKC', netloc)
+ if netloc == netloc2:
+ return
+ _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay
+ for c in '/?#@:':
+ if c in netloc2:
+ raise ValueError("netloc '" + netloc2 + "' contains invalid " +
+ "characters under NFKC normalization")
+
def urlsplit(url, scheme='', allow_fragments=True):
"""Parse a URL into 5 components:
<scheme>://<netloc>/<path>?<query>#<fragment>
@@ -193,6 +208,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
url, fragment = url.split('#', 1)
if '?' in url:
url, query = url.split('?', 1)
+ _checknetloc(netloc)
v = SplitResult(scheme, netloc, url, query, fragment)
_parse_cache[key] = v
return v
@@ -216,6 +232,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
url, fragment = url.split('#', 1)
if '?' in url:
url, query = url.split('?', 1)
+ _checknetloc(netloc)
v = SplitResult(scheme, netloc, url, query, fragment)
_parse_cache[key] = v
return v
diff --git a/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
new file mode 100644
index 000000000000..1e1ad92c6feb
--- /dev/null
+++ b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
@@ -0,0 +1,3 @@
+Changes urlsplit() to raise ValueError when the URL contains characters that
+decompose under IDNA encoding (NFKC-normalization) into characters that
+affect how the URL is parsed.
\ No newline at end of file

View File

@@ -70,7 +70,7 @@ index 6e81b2f..671a20e 100644
Programs/python.o: $(srcdir)/Programs/python.c
@@ -856,7 +857,7 @@ regen-opcode:
Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o Parser/parsetok.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c

View File

@@ -63,7 +63,7 @@ index a7de901..4a3681f 100644
+ case $cc_basename in
*clang*)
AC_SUBST(LLVM_AR)
AC_PATH_TARGET_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
@@ -1426,7 +1427,7 @@ then
fi
fi

View File

@@ -498,7 +498,8 @@
"${libdir}/pkgconfig"
],
"rdepends": [
"core"
"core",
"distutils"
],
"summary": "Python development package"
},

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