Skip to contentSkip to conversation

patch review

PATCH In review Armin Kuster 6 participants 25 messages Jun 24, 2019

lore
Share & tools
lore
#0 lore raw

cover patch review

Please review by Wednesday

The following changes since commit 712c78984c891e6357e1b1dc414431fb6c226c49:

gnutls: Use ca-certificates as default trust store file (2019-06-14 07:05:34 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib stable/warrior-nmut
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/warrior-nmut

Adrian Bunk (2):
libxslt: Fix CVE-2019-11068
wpa-supplicant: Fix CVE-2019-9494 CVE-2019-9495 CVE-2019-9496

    CVE-2019-9497 CVE-2019-9498 CVE-2019-9499 CVE-2019-11555

Chen Qi (2):
context.py: fix skipping function
manifest.py: fix test_SDK_manifest_entries

Hongxu Jia (1):
diffutils/run-ptest: support to run at arbitrary path

Jaewon Lee (1):
devicetree.bbclass: Combine stderr into stdout to see actual dtc error

Kai Kang (1):
openssl: fix failure of ptest test_shlibload

Mariano López (2):
util-linux: Stop udevd to run ptests
linux-yocto: Add scsi_debug module when ptest is in DISTRO_FEATURES

Oleksandr Kravchuk (1):
selftest/devtool: fix URI to MarkupSafe package

Peter Kjellerstedt (3):
texinfo-dummy-native: A little clean up of template.py
texinfo-dummy-native: Rewrite template.py to use argparse package.bbclass: Clean up writing of runtime pkgdata files

Randy MacLeod (1):
ptest-runner: enable child procs as session leader

Ricardo Ribalda Delgado (1):
rootfs: Fix dependency for every dpkg run

Richard Purdie (2):
uninative: Update to 2.6 release gpg_sign/selftest: Fix secmem parameter handling

Ross Burton (1):
oeqa/logparser: ignore test failure commentary

Sakib Sajal (1):
ptest-runner: update SRCREV to latest HEAD on ptest-runner2 repo

 meta/classes/devicetree.bbclass                    |   2 +-
 meta/classes/package.bbclass                       |  56 ++--
 meta/conf/distro/include/yocto-uninative.inc       |   8 +-
 meta/lib/oe/gpg_sign.py                            |  39 +--
 meta/lib/oe/rootfs.py                              |   1 +
 meta/lib/oeqa/core/context.py                      |   7 +-
 meta/lib/oeqa/selftest/cases/devtool.py            |   2 +-
 meta/lib/oeqa/selftest/cases/manifest.py           |   7 +-
 meta/lib/oeqa/selftest/cases/signing.py            |   3 +-
 meta/lib/oeqa/utils/logparser.py                   |   4 +-
 .../recipes-connectivity/openssl/openssl_1.1.1b.bb |   4 +-
 ...pwd-server-Fix-reassembly-buffer-handling.patch |  48 +++
 ...-constant-time-operations-for-private-big.patch |  97 ++++++
 ...er-functions-for-constant-time-operations.patch | 222 ++++++++++++++
 ...P-pwd-peer-Fix-reassembly-buffer-handling.patch |  48 +++
 ...-constant-time-selection-for-crypto_bignu.patch |  64 ++++
 ...-constant-time-and-memory-access-for-find.patch | 327 ++++++++++++++++++++
 ...mize-timing-differences-in-PWE-derivation.patch | 244 +++++++++++++++
 ...id-branches-in-is_quadratic_residue_blind.patch | 147 +++++++++
 ...7-SAE-Mask-timing-of-MODP-groups-22-23-24.patch | 121 ++++++++
 ...E-Use-const_time-selection-for-PWE-in-FFC.patch | 108 +++++++
 ...stant-time-operations-in-sae_test_pwd_see.patch | 139 +++++++++
 ...confirm-message-validation-in-error-cases.patch |  60 ++++
 ...server-Verify-received-scalar-and-element.patch |  61 ++++
 ...-EAP-pwd-server-Detect-reflection-attacks.patch |  48 +++
 ...client-Verify-received-scalar-and-element.patch |  61 ++++
 ...-Check-element-x-y-coordinates-explicitly.patch | 335 +++++++++++++++++++++
 .../wpa-supplicant/wpa-supplicant_2.7.bb           |  16 +
 meta/recipes-core/util-linux/util-linux.inc        |   4 +
 meta/recipes-core/util-linux/util-linux/run-ptest  |  14 +
 .../recipes-extended/diffutils/diffutils/run-ptest |   3 +-
 .../texinfo-dummy-native/texinfo-dummy/template.py |  86 ++----
 meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb   |   1 +
 meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb    |   1 +
 meta/recipes-kernel/linux/linux-yocto_4.19.bb      |   1 +
 meta/recipes-kernel/linux/linux-yocto_5.0.bb       |   1 +
 .../files/0001-Fix-security-framework-bypass.patch | 124 ++++++++
 meta/recipes-support/libxslt/libxslt_1.1.33.bb     |   4 +-
 ...-utils-ensure-child-can-be-session-leader.patch | 212 +++++++++++++
 .../ptest-runner/ptest-runner_2.3.1.bb             |   6 +-
 40 files changed, 2606 insertions(+), 130 deletions(-)
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-OpenSSL-Use-constant-time-operations-for-private-big.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Add-helper-functions-for-constant-time-operations.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-OpenSSL-Use-constant-time-selection-for-crypto_bignu.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0004-EAP-pwd-Use-constant-time-and-memory-access-for-find.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0005-SAE-Minimize-timing-differences-in-PWE-derivation.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0006-SAE-Avoid-branches-in-is_quadratic_residue_blind.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0007-SAE-Mask-timing-of-MODP-groups-22-23-24.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0008-SAE-Use-const_time-selection-for-PWE-in-FFC.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0009-SAE-Use-constant-time-operations-in-sae_test_pwd_see.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0010-SAE-Fix-confirm-message-validation-in-error-cases.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0013-EAP-pwd-client-Verify-received-scalar-and-element.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0014-EAP-pwd-Check-element-x-y-coordinates-explicitly.patch
 create mode 100644 meta/recipes-support/libxslt/files/0001-Fix-security-framework-bypass.patch
 create mode 100644 meta/recipes-support/ptest-runner/ptest-runner/0004-utils-ensure-child-can-be-session-leader.patch
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/19 util-linux: Stop udevd to run ptests

From: Mariano López <[email protected]>

The util-linux's ptest uses the SCSI_DEBUG kernel module to create virtual SCSI disks. The automount feature of udevd will try to mount these disks by default. Because udevd controls the mount of the disks, the eject/mount tests will fail or be skipped. This change will stop udevd before executing the util-linux's ptest and start the daemon again after all the tests.

This is for eudevd only, systemd-udevd doesn't present this problem because there are no automount rules.

[YOCTO #13301]

---
 meta/recipes-core/util-linux/util-linux.inc       |  4 ++++
 meta/recipes-core/util-linux/util-linux/run-ptest | 14 ++++++++++++++
 2 files changed, 18 insertions(+)
meta/recipes-core/util-linux/util-linux.inc +4 -0
index 7b9b4d2..a61bc78 100644
@@ -318,4 +318,8 @@ do_install_ptest() {
     sed -i -e \
          '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \
          ${D}${PTEST_PATH}/tests/commands.sh
+
+
+    sed -i 's|@base_sbindir@|${base_sbindir}|g'       ${D}${PTEST_PATH}/run-ptest
+
 }
meta/recipes-core/util-linux/util-linux/run-ptest +14 -0
index 0324832..e135ee5 100644
@@ -1,5 +1,14 @@
 #!/bin/sh
 
+
+# When udevd (from eudev) is running most eject/mount tests will fail because
+# of automount. We need to stop udevd before executing util-linux's tests.
+# The systemd-udevd daemon doesn't change the outcome of util-linux's tests.
+UDEV_PID="`pidof "@base_sbindir@/udevd"`"
+if [ "x$UDEV_PID" != "x" ]; then
+    /etc/init.d/udev stop
+fi
+
 current_path=$(readlink -f $0)
 export bindir=$(dirname $current_path)
 export PATH=$bindir/bin:$PATH
@@ -27,3 +36,8 @@ do
    }' 
 done
 
+
+if [ "x$UDEV_PID" != "x" ]; then
+    /etc/init.d/udev start
+fi
+
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/19 linux-yocto: Add scsi_debug module when ptest is in DISTRO_FEATURES

In reply to Armin Kuster

From: Mariano López <[email protected]>

util-linux ptest requires the scsi_debug module to perform eject/mount tests. This will conditionally add scsi_debug module when ptest is in DISTRO_FEATURES.

This doesn't include linux-yocto-tiny because the resulting image will be too big and do_image would complain about this.

[YOCTO #13301]

---
 meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb | 1 +
 meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb  | 1 +
 meta/recipes-kernel/linux/linux-yocto_4.19.bb    | 1 +
 meta/recipes-kernel/linux/linux-yocto_5.0.bb     | 1 +
 4 files changed, 4 insertions(+)
meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb +1 -0
index 6604bdf..0836dc7 100644
@@ -41,3 +41,4 @@ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
 KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb +1 -0
index 1fe28b1..b5e415f 100644
@@ -41,3 +41,4 @@ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
 KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
meta/recipes-kernel/linux/linux-yocto_4.19.bb +1 -0
index a5fdafe..cda4ecf 100644
@@ -47,3 +47,4 @@ KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
meta/recipes-kernel/linux/linux-yocto_5.0.bb +1 -0
index da795d9..8aec315 100644
@@ -50,3 +50,4 @@ KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
Signature · 1 line
2.7.4
#4 lore raw

PATCH 3/19 selftest/devtool: fix URI to MarkupSafe package

In reply to Armin Kuster

From: Oleksandr Kravchuk <[email protected]>

PyPi packages are now hosted at files.pythonhosted.org.

[YOCTO #13243]

---
 meta/lib/oeqa/selftest/cases/devtool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/devtool.py +1 -1
index 434a7b9..904ff69 100644
@@ -393,7 +393,7 @@ class DevtoolAddTests(DevtoolBase):
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         self.track_for_cleanup(tempdir)
         testver = '0.23'
-        url = 'https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%s.tar.gz' % testver
+        url = 'https://files.pythonhosted.org/packages/c0/41/bae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f/MarkupSafe-%s.tar.gz' % testver
         testrecipe = 'python-markupsafe'
         srcdir = os.path.join(tempdir, testrecipe)
         # Test devtool add
Signature · 1 line
2.7.4
#5 lore raw

PATCH 4/19 diffutils/run-ptest: support to run at arbitrary path

In reply to Armin Kuster

From: Hongxu Jia <[email protected]>

1. Run run-ptest at arbitrary path

2. Fix large-subopt.in1 not found
...
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in1:
No such file or directory
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in2:
No such file or directory
...

---
 meta/recipes-extended/diffutils/diffutils/run-ptest | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-extended/diffutils/diffutils/run-ptest +2 -1
index 695c5e8..ad467d9 100644
@@ -1,3 +1,4 @@
 #!/bin/sh
 
-make -C tests check-TESTS
+abs_ptestdir=`echo "$(cd "$(dirname "$0")"; pwd)"`
+make -C $abs_ptestdir/tests check-TESTS abs_top_srcdir="$abs_ptestdir"
Signature · 1 line
2.7.4
#6 lore raw

PATCH 5/19 devicetree.bbclass: Combine stderr into stdout to see actual dtc error

In reply to Armin Kuster

From: Jaewon Lee <[email protected]>

Previously the subprocess command to run dtc was not properly displaying the error on console. Combining stderr into stdout for the dtc subprocess so the actual error can be seen on console without having to open the do_compile log.

For example, previously on a dtc error, just the following stack trace and dtc command was being shown on console:

File: 'exec_python_func() autogenerated', lineno: 2, function: <module>

     0001:
 *** 0002:devicetree_do_compile(d)
     0003:

File:
function: devicetree_do_compile
0127: if not(os.path.isfile(dtspath)) or
not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)):
0128: continue # skip non-.dts files and non-overlay
files
0129: except:
0130: continue # skip if can't determine if overlay
*** 0131: devicetree_compile(dtspath, includes, d)

    ...

Exception: subprocess.CalledProcessError: Command '['dtc', '-R', '8', '-b', '0', '-p', '0x1000', '-i', '${INCLUDES}, '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 1

with this patch, the actual error from the dtc command will be appended like the following:

Subprocess output:
Error: Label or path not found
FATAL ERROR: Syntax error parsing input tree

---
 meta/classes/devicetree.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/devicetree.bbclass +1 -1
index 5c03e4b..d8779c7 100644
@@ -116,7 +116,7 @@ def devicetree_compile(dtspath, includes, d):
     dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")]
     dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)]
     bb.note("Running {0}".format(" ".join(dtcargs)))
-    subprocess.run(dtcargs, check = True)
+    subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 
 python devicetree_do_compile() {
     includes = expand_includes("DT_INCLUDE", d)
Signature · 1 line
2.7.4
#7 lore raw

PATCH 6/19 context.py: fix skipping function

In reply to Armin Kuster

From: Chen Qi <[email protected]>

The current codes to skip test cases are logically correct, but they do not work correctly in reality. It does skip the tests as the command line argument specifies, but the related information is wrong. e.g.

$ oe-selftest -R archiver bblayers runtime_test
2019-06-17 09:24:53,764 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it
2019-06-17 09:25:06,309 - oe-selftest - INFO - Adding layer libraries:
2019-06-17 09:25:06,310 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta/lib
2019-06-17 09:25:06,310 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta-yocto-bsp/lib
2019-06-17 09:25:06,310 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta-selftest/lib
2019-06-17 09:25:06,312 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable
2019-06-17 09:25:10,521 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/chenqi/SWAT/poky/build-selftest/conf/local.conf
2019-06-17 09:25:10,521 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2019-06-17 09:25:10,522 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
2019-06-17 09:25:10,522 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "runtime_test"'
2019-06-17 09:25:10,522 - oe-selftest - INFO - Skip by the command line argument "runtime_test"
2019-06-17 09:25:10,523 - oe-selftest - INFO - test_archiver_filters_by_type (archiver.Archiver)
2019-06-17 09:25:10,523 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "runtime_test"'
2019-06-17 09:25:10,523 - oe-selftest - INFO - Skip by the command line argument "runtime_test"

The archiver.Archiver.xxx tests should be skipped by 'archiver' command line argument, not 'runtime_test'.

Change to use a function generator to achieve the desired effect. After the change, the effect is as follows.

$ oe-selftest -R archiver bblayers runtime_test
2019-06-17 09:19:06,223 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it
2019-06-17 09:19:19,598 - oe-selftest - INFO - Adding layer libraries:
2019-06-17 09:19:19,599 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta/lib
2019-06-17 09:19:19,599 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta-yocto-bsp/lib
2019-06-17 09:19:19,599 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta-selftest/lib
2019-06-17 09:19:19,602 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable
2019-06-17 09:19:24,368 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/chenqi/SWAT/poky/build-selftest/conf/local.conf
2019-06-17 09:19:24,368 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2019-06-17 09:19:24,369 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
2019-06-17 09:19:24,369 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,369 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,369 - oe-selftest - INFO - test_archiver_filters_by_type (archiver.Archiver)
2019-06-17 09:19:24,370 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,370 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,370 - oe-selftest - INFO - test_archiver_filters_by_type_and_name (archiver.Archiver)
2019-06-17 09:19:24,370 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,371 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,371 - oe-selftest - INFO - test_archiver_srpm_mode (archiver.Archiver)
2019-06-17 09:19:24,371 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,372 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,372 - oe-selftest - INFO - test_bitbakelayers_add_remove (bblayers.BitbakeLayers)
2019-06-17 09:19:24,373 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "bblayers"'
2019-06-17 09:19:24,373 - oe-selftest - INFO - Skip by the command line argument "bblayers"
2019-06-17 09:19:24,373 - oe-selftest - INFO - test_bitbakelayers_createlayer (bblayers.BitbakeLayers)
2019-06-17 09:19:24,373 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "bblayers"'
2019-06-17 09:19:24,374 - oe-selftest - INFO - Skip by the command line argument "bblayers"
[snip]
---
 meta/lib/oeqa/core/context.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/lib/oeqa/core/context.py +6 -1
index 0962704..5824489 100644
@@ -9,6 +9,7 @@ import json
 import time
 import logging
 import collections
+import unittest
 
 from oeqa.core.loader import OETestLoader
 from oeqa.core.runner import OETestRunner
@@ -45,10 +46,14 @@ class OETestContext(object):
     def skipTests(self, skips):
         if not skips:
             return
+        def skipfuncgen(skipmsg):
+            def func():
+                raise unittest.SkipTest(skipmsg)
+            return func
         for test in self.suites:
             for skip in skips:
                 if test.id().startswith(skip):
-                    setattr(test, 'setUp', lambda: test.skipTest('Skip by the command line argument "%s"' % skip))
+                    setattr(test, 'setUp', skipfuncgen('Skip by the command line argument "%s"' % skip))
 
     def loadTests(self, module_paths, modules=[], tests=[],
             modules_manifest="", modules_required=[], filters={}):
Signature · 1 line
2.7.4
#8 lore raw

PATCH 7/19 ptest-runner: update SRCREV to latest HEAD on ptest-runner2 repo

In reply to Armin Kuster

From: Sakib Sajal <[email protected]>

63d097c Add SPDX-License-Identifier: GPL-2.0-or-later in source files (HEAD) fb93c99 utils.c: close all file descriptors after completing a ptest

---
 meta/recipes-support/ptest-runner/ptest-runner_2.3.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/ptest-runner/ptest-runner_2.3.1.bb +1 -1
index e2eb258..0450e18 100644
@@ -7,7 +7,7 @@ HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
 
-SRCREV = "05b112bda7ac2adba8e9b0f088d6e5843b148a38"
+SRCREV = "63d097cc46142157931682fed076b5407757a0bd"
 PV = "2.3.1+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/ptest-runner2 \
Signature · 1 line
2.7.4
#9 lore raw

PATCH 8/19 ptest-runner: enable child procs as session leader

In reply to Armin Kuster

From: Randy MacLeod <[email protected]>

When running the run-execscript bash ptest as a user rather than root, a warning:
bash: cannot set terminal process group (16036): Inappropriate ioctl for device
bash: no job control in this shell
contaminates the bash log files causing the test to fail. This happens only when run under ptest-runner and not when interactively testing!

The changes made to fix this include:
1. Get the process group id (pgid) before forking,
2. Set the pgid in both the parent and child to avoid a race,
3. Find, open and set permission on the child tty, and
4. Allow the child to attach to controlling tty.

---
 ...-utils-ensure-child-can-be-session-leader.patch | 212 +++++++++++++++++++++
 .../ptest-runner/ptest-runner_2.3.1.bb             |   4 +-
 2 files changed, 215 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/ptest-runner/ptest-runner/0004-utils-ensure-child-can-be-session-leader.patch
meta/recipes-support/ptest-runner/ptest-runner/0004-utils-ensure-child-can-be-session-leader.patch new file +212 -0
new file mode 100644
index 0000000..13b4cbc
@@ -0,0 +1,212 @@
+From 79698d3205dedba887e0d2492de945d3079de029 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <[email protected]>
+Date: Thu, 6 Jun 2019 17:03:50 -0400
+Subject: [PATCH] utils: ensure child can be session leader
+
+When running the run-execscript bash ptest as a user rather than root, a warning:
+  bash: cannot set terminal process group (16036): Inappropriate ioctl for device
+  bash: no job control in this shell
+contaminates the bash log files causing the test to fail. This happens only
+when run under ptest-runner and not when interactively testing!
+
+The changes made to fix this include:
+1. Get the process group id (pgid) before forking,
+2. Set the pgid in both the parent and child to avoid a race,
+3. Find, open and set permission on the child tty, and
+4. Allow the child to attach to controlling tty.
+
+Also add '-lutil' to Makefile. This lib is from libc and provides openpty.
+
+Upstream-Status: Submitted [[email protected]]
+
+Signed-off-by: Sakib Sajal <[email protected]>
+Signed-off-by: Randy MacLeod <[email protected]>
+---
+ Makefile |   2 +-
+ utils.c  | 102 +++++++++++++++++++++++++++++++++++++++++++++++++------
+ 2 files changed, 92 insertions(+), 12 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1bde7be..439eb79 100644
+--- a/Makefile
++++ b/Makefile
+@@ -29,7 +29,7 @@ TEST_DATA=$(shell echo `pwd`/tests/data)
+ all: $(SOURCES) $(EXECUTABLE)
+ 
+ $(EXECUTABLE): $(OBJECTS)
+-	$(CC) $(LDFLAGS) $(OBJECTS) -o $@
++	$(CC) $(LDFLAGS) $(OBJECTS) -lutil -o $@
+ 
+ tests: $(TEST_SOURCES) $(TEST_EXECUTABLE)
+ 
+diff --git a/utils.c b/utils.c
+index ad737c2..f11ce39 100644
+--- a/utils.c
++++ b/utils.c
+@@ -1,5 +1,6 @@
+ /**
+  * Copyright (c) 2016 Intel Corporation
++ * Copyright (C) 2019 Wind River Systems, Inc.
+  *
+  * This program is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU General Public License
+@@ -22,23 +23,27 @@
+  */
+ 
+ #define _GNU_SOURCE 
++
+ #include <stdio.h>
+ 
++#include <dirent.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <grp.h>
+ #include <libgen.h>
+-#include <signal.h>
+ #include <poll.h>
+-#include <fcntl.h>
++#include <pty.h>
++#include <signal.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <time.h>
+-#include <dirent.h>
++#include <unistd.h>
++
++#include <sys/ioctl.h>
+ #include <sys/resource.h>
++#include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+-#include <sys/stat.h>
+-#include <unistd.h>
+-#include <string.h>
+-#include <stdlib.h>
+-
+-#include <errno.h>
+ 
+ #include "ptest_list.h"
+ #include "utils.h"
+@@ -346,6 +351,53 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid,
+ 	return status;
+ }
+ 
++/* Returns an integer file descriptor.
++ * If it returns < 0, an error has occurred.
++ * Otherwise, it has returned the slave pty file descriptor.
++ * fp should be writable, likely stdout/err.
++ */
++static int
++setup_slave_pty(FILE *fp) { 
++	int pty_master = -1;
++	int pty_slave = -1;
++	char pty_name[256];
++	struct group *gptr;
++	gid_t gid;
++	int slave = -1;
++
++	if (openpty(&pty_master, &pty_slave, pty_name, NULL, NULL) < 0) {
++		fprintf(fp, "ERROR: openpty() failed with: %s.\n", strerror(errno));
++		return -1;
++	}
++
++	if ((gptr = getgrnam(pty_name)) != 0) {
++		gid = gptr->gr_gid;
++	} else {
++		/* If the tty group does not exist, don't change the
++		 * group on the slave pty, only the owner
++		 */
++		gid = -1;
++	}
++
++	/* chown/chmod the corresponding pty, if possible.
++	 * This will only work if the process has root permissions.
++	 */
++	if (chown(pty_name, getuid(), gid) != 0) {
++		fprintf(fp, "ERROR; chown() failed with: %s.\n", strerror(errno));
++	}
++
++	/* Makes the slave read/writeable for the user. */
++	if (chmod(pty_name, S_IRUSR|S_IWUSR) != 0) {
++		fprintf(fp, "ERROR: chmod() failed with: %s.\n", strerror(errno));
++	}
++
++	if ((slave = open(pty_name, O_RDWR)) == -1) {
++		fprintf(fp, "ERROR: open() failed with: %s.\n", strerror(errno));
++	}
++	return (slave);
++}
++
++
+ int
+ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+ 		const char *progname, FILE *fp, FILE *fp_stderr)
+@@ -362,6 +414,8 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+ 	int timeouted;
+ 	time_t sttime, entime;
+ 	int duration;
++	int slave;
++	int pgid = -1;
+ 
+ 	if (opts.xml_filename) {
+ 		xh = xml_create(ptest_list_length(head), opts.xml_filename);
+@@ -379,7 +433,6 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+ 			close(pipefd_stdout[1]);
+ 			break;
+ 		}
+-
+ 		fprintf(fp, "START: %s\n", progname);
+ 		PTEST_LIST_ITERATE_START(head, p);
+ 			char *ptest_dir = strdup(p->run_ptest);
+@@ -388,6 +441,13 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+ 				break;
+ 			}
+ 			dirname(ptest_dir);
++			if (ioctl(0, TIOCNOTTY) == -1) {
++				fprintf(fp, "ERROR: Unable to detach from controlling tty, %s\n", strerror(errno));
++			}
++
++			if ((pgid = getpgid(0)) == -1) {
++				fprintf(fp, "ERROR: getpgid() failed, %s\n", strerror(errno));
++			}
+ 
+ 			child = fork();
+ 			if (child == -1) {
+@@ -395,13 +455,33 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+ 				rc = -1;
+ 				break;
+ 			} else if (child == 0) {
+-				setsid();
++				close(0);
++				if ((slave = setup_slave_pty(fp)) < 0) {
++					fprintf(fp, "ERROR: could not setup pty (%d).", slave);
++				}
++				if (setpgid(0,pgid) == -1) {
++					fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno));
++				}
++
++				if (setsid() ==  -1) {
++					fprintf(fp, "ERROR: setsid() failed, %s\n", strerror(errno));
++				}
++
++				if (ioctl(0, TIOCSCTTY, NULL) == -1) {
++					fprintf(fp, "ERROR: Unable to attach to controlling tty, %s\n", strerror(errno));
++				}
++
+ 				run_child(p->run_ptest, pipefd_stdout[1], pipefd_stderr[1]);
++
+ 			} else {
+ 				int status;
+ 				int fds[2]; fds[0] = pipefd_stdout[0]; fds[1] = pipefd_stderr[0];
+ 				FILE *fps[2]; fps[0] = fp; fps[1] = fp_stderr;
+ 
++				if (setpgid(child, pgid) == -1) {
++					fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno));
++				}
++
+ 				sttime = time(NULL);
+ 				fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, sttime));
+ 				fprintf(fp, "BEGIN: %s\n", ptest_dir);
+-- 
+2.17.0
+
meta/recipes-support/ptest-runner/ptest-runner_2.3.1.bb +3 -1
index 0450e18..dec60fc 100644
@@ -13,7 +13,9 @@ PV = "2.3.1+git${SRCPV}"
 SRC_URI = "git://git.yoctoproject.org/ptest-runner2 \
  file://0001-utils-Ensure-stdout-stderr-are-flushed.patch \
  file://0002-use-process-groups-when-spawning.patch \
- file://0003-utils-Ensure-pipes-are-read-after-exit.patch"
+ file://0003-utils-Ensure-pipes-are-read-after-exit.patch \
+ file://0004-utils-ensure-child-can-be-session-leader.patch \
+"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.7.4
#10 lore raw

PATCH 9/19 openssl: fix failure of ptest test_shlibload

In reply to Armin Kuster

From: Kai Kang <[email protected]>

It fails to run ptest case test_shlibload which requires libcrypto.so and libssl.so with version numbers now.

---
 meta/recipes-connectivity/openssl/openssl_1.1.1b.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl_1.1.1b.bb +2 -2
index d3404d2..df2698f 100644
@@ -167,8 +167,8 @@ do_install_ptest () {
 	cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH}
 
 	# For test_shlibload
-	ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/libcrypto.so
-	ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/libssl.so
+	ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/
+	ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/
 
 	install -d ${D}${PTEST_PATH}/apps
 	ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps
Signature · 1 line
2.7.4
#11 lore raw

PATCH 10/19 manifest.py: fix test_SDK_manifest_entries

In reply to Armin Kuster

From: Chen Qi <[email protected]>

TOOLCHAIN_OUTPUTNAME could be overridden. So use this variable directly instead of its default value ${SDK_NAME}-toolchain-${SDK_VERSION}.

---
 meta/lib/oeqa/selftest/cases/manifest.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
meta/lib/oeqa/selftest/cases/manifest.py +2 -5
index c0b25ab..5d13f35 100644
@@ -86,11 +86,8 @@ class VerifyManifest(OESelftestTestCase):
         try:
             mdir = self.get_dir_from_bb_var('SDK_DEPLOY', self.buildtarget)
             for k in d_target.keys():
-                bb_vars = get_bb_vars(['SDK_NAME', 'SDK_VERSION'], self.buildtarget)
-                mfilename[k] = "{}-toolchain-{}.{}.manifest".format(
-                        bb_vars['SDK_NAME'],
-                        bb_vars['SDK_VERSION'],
-                        k)
+                toolchain_outputname = get_bb_var('TOOLCHAIN_OUTPUTNAME', self.buildtarget)
+                mfilename[k] = "{}.{}.manifest".format(toolchain_outputname, k)
                 mpath[k] = os.path.join(mdir, mfilename[k])
                 if not os.path.isfile(mpath[k]):
                     self.logger.debug("{}: {} does not exist".format(
Signature · 1 line
2.7.4
#12 lore raw

PATCH 11/19 rootfs: Fix dependency for every dpkg run

In reply to Armin Kuster

From: Ricardo Ribalda Delgado <[email protected]>

Avoid getting a warning on do_rootfs.

Fixes:

NOTE: Installing the following packages: libgdk-pixbuf-2.0-locale-en-gb glibc-locale-en-gb libatspi-locale-en-gb gstreamer1.0-locale-en-gb gtk+3-locale-en libatk-1.0-locale-en-gb gtk+3-locale-en-gb gstreamer1.0-plugins-good-locale-en-gb gstreamer1.0-plugins-base-locale-en-gb gstreamer1.0-plugins-bad-locale-en-gb libglib-2.0-locale-en-gb avahi-locale-en-gb vte-locale-en-gb xkeyboard-config-locale-en-gb
WARNING: Unable to install packages. Command '/workdir/build/tmp/work/qt5122-poky-linux/bottlecam-image/1.0-r0/recipe-sysroot-native/usr/bin/apt-get install --force-yes --allow-unauthenticated libgdk-pixbuf-2.0-locale-en-gb glibc-locale-en-gb libatspi-locale-en-gb gstreamer1.0-locale-en-gb gtk+3-locale-en libatk-1.0-locale-en-gb gtk+3-locale-en-gb gstreamer1.0-plugins-good-locale-en-gb gstreamer1.0-plugins-base-locale-en-gb gstreamer1.0-plugins-bad-locale-en-gb libglib-2.0-locale-en-gb avahi-locale-en-gb vte-locale-en-gb xkeyboard-config-locale-en-gb' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...

---
 meta/lib/oe/rootfs.py | 1 +
 1 file changed, 1 insertion(+)
meta/lib/oe/rootfs.py +1 -0
index 9358f56..c62fa5f 100644
@@ -647,6 +647,7 @@ class DpkgRootfs(DpkgOpkgRootfs):
             if pkg_type in pkgs_to_install:
                 self.pm.install(pkgs_to_install[pkg_type],
                                 [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
+                self.pm.fix_broken_dependencies()
 
         if self.progress_reporter:
             # Don't support attemptonly, so skip that
Signature · 1 line
2.7.4
#13 lore raw

PATCH 12/19 oeqa/logparser: ignore test failure commentary

In reply to Armin Kuster

From: Ross Burton <[email protected]>

The output format for Python and GLib both can be of this form:

FAIL: foobar (Segmentation fault)

In this case the test is called foobar not foobar_segmentation_fault.

---
 meta/lib/oeqa/utils/logparser.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/utils/logparser.py +2 -2
index cc6d18d..b31214b 100644
@@ -16,7 +16,7 @@ class PtestParser(object):
     def parse(self, logfile):
         test_regex = {}
         test_regex['PASSED'] = re.compile(r"^PASS:(.+)")
-        test_regex['FAILED'] = re.compile(r"^FAIL:(.+)")
+        test_regex['FAILED'] = re.compile(r"^FAIL:([^(]+)")
         test_regex['SKIPPED'] = re.compile(r"^SKIP:(.+)")
 
         section_regex = {}
@@ -69,7 +69,7 @@ class PtestParser(object):
                     if result:
                         if current_section['name'] not in self.results:
                             self.results[current_section['name']] = {}
-                        self.results[current_section['name']][result.group(1)] = t
+                        self.results[current_section['name']][result.group(1).strip()] = t
 
         return self.results, self.sections
 
Signature · 1 line
2.7.4
#14 lore raw

PATCH 13/19 uninative: Update to 2.6 release

In reply to Armin Kuster

From: Richard Purdie <[email protected]>

The 2.6 release contains both libcrypt.so.1 and libcrypt.so.2 which fixes compatibility with recent fedora/suse releases.

The difference is one is built with obsolete APIs enabled and one disabled. We now ship both in uninative for compatibility regardless of which distro a binary is built on.

---
 meta/conf/distro/include/yocto-uninative.inc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/conf/distro/include/yocto-uninative.inc +4 -4
index 0bb8f7a..df24346 100644
@@ -8,7 +8,7 @@
 
 UNINATIVE_MAXGLIBCVERSION = "2.29"
 
-UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/2.5/"
-UNINATIVE_CHECKSUM[aarch64] ?= "ca977ff95c77f983570141908d451ff7d78add2864471605af404302bb36a1fa"
-UNINATIVE_CHECKSUM[i686] ?= "7b5822891c293795faf8a4a80586b36f8cde405387524916a24f9055ea82f7ca"
-UNINATIVE_CHECKSUM[x86_64] ?= "ed0ac07c710b711925cb976685dd855fb1d442dd840d00194751c18bf480c4ed"
+UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/2.6/"
+UNINATIVE_CHECKSUM[aarch64] ?= "a37118fc8b423f48146120707b81dd15017512c3e8ef9e6ca2cb3a033f4f4046"
+UNINATIVE_CHECKSUM[i686] ?= "3234fc3ded810225071f23a0e9a99f4f8c2480059945a848eff076ce78122ade"
+UNINATIVE_CHECKSUM[x86_64] ?= "133387753a9acf3e1b788103c59fac91e968e2ee331d7a4b9498e926ada7be57"
Signature · 1 line
2.7.4
#15 lore raw

PATCH 14/19 libxslt: Fix CVE-2019-11068

In reply to Armin Kuster

From: Adrian Bunk <[email protected]>

---
 .../files/0001-Fix-security-framework-bypass.patch | 124 +++++++++++++++++++++
 meta/recipes-support/libxslt/libxslt_1.1.33.bb     |   4 +-
 2 files changed, 127 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libxslt/files/0001-Fix-security-framework-bypass.patch
meta/recipes-support/libxslt/files/0001-Fix-security-framework-bypass.patch new file +124 -0
new file mode 100644
index 0000000..89b647d
@@ -0,0 +1,124 @@
+From e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <[email protected]>
+Date: Sun, 24 Mar 2019 09:51:39 +0100
+Subject: Fix security framework bypass
+
+xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
+don't check for this condition and allow access. With a specially
+crafted URL, xsltCheckRead could be tricked into returning an error
+because of a supposedly invalid URL that would still be loaded
+succesfully later on.
+
+Fixes #12.
+
+Thanks to Felix Wilhelm for the report.
+
+Signed-off-by: Adrian Bunk <[email protected]>
+Upstream-Status: Backport
+CVE: CVE-2019-11068
+---
+ libxslt/documents.c | 18 ++++++++++--------
+ libxslt/imports.c   |  9 +++++----
+ libxslt/transform.c |  9 +++++----
+ libxslt/xslt.c      |  9 +++++----
+ 4 files changed, 25 insertions(+), 20 deletions(-)
+
+diff --git a/libxslt/documents.c b/libxslt/documents.c
+index 3f3a7312..4aad11bb 100644
+--- a/libxslt/documents.c
++++ b/libxslt/documents.c
+@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
+ 	int res;
+ 
+ 	res = xsltCheckRead(ctxt->sec, ctxt, URI);
+-	if (res == 0) {
+-	    xsltTransformError(ctxt, NULL, NULL,
+-		 "xsltLoadDocument: read rights for %s denied\n",
+-			     URI);
++	if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(ctxt, NULL, NULL,
++                     "xsltLoadDocument: read rights for %s denied\n",
++                                 URI);
+ 	    return(NULL);
+ 	}
+     }
+@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const xmlChar *URI) {
+ 	int res;
+ 
+ 	res = xsltCheckRead(sec, NULL, URI);
+-	if (res == 0) {
+-	    xsltTransformError(NULL, NULL, NULL,
+-		 "xsltLoadStyleDocument: read rights for %s denied\n",
+-			     URI);
++	if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsltLoadStyleDocument: read rights for %s denied\n",
++                                 URI);
+ 	    return(NULL);
+ 	}
+     }
+diff --git a/libxslt/imports.c b/libxslt/imports.c
+index 874870cc..3783b247 100644
+--- a/libxslt/imports.c
++++ b/libxslt/imports.c
+@@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) {
+ 	int secres;
+ 
+ 	secres = xsltCheckRead(sec, NULL, URI);
+-	if (secres == 0) {
+-	    xsltTransformError(NULL, NULL, NULL,
+-		 "xsl:import: read rights for %s denied\n",
+-			     URI);
++	if (secres <= 0) {
++            if (secres == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsl:import: read rights for %s denied\n",
++                                 URI);
+ 	    goto error;
+ 	}
+     }
+diff --git a/libxslt/transform.c b/libxslt/transform.c
+index 13793914..0636dbd0 100644
+--- a/libxslt/transform.c
++++ b/libxslt/transform.c
+@@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
+      */
+     if (ctxt->sec != NULL) {
+ 	ret = xsltCheckWrite(ctxt->sec, ctxt, filename);
+-	if (ret == 0) {
+-	    xsltTransformError(ctxt, NULL, inst,
+-		 "xsltDocumentElem: write rights for %s denied\n",
+-			     filename);
++	if (ret <= 0) {
++            if (ret == 0)
++                xsltTransformError(ctxt, NULL, inst,
++                     "xsltDocumentElem: write rights for %s denied\n",
++                                 filename);
+ 	    xmlFree(URL);
+ 	    xmlFree(filename);
+ 	    return;
+diff --git a/libxslt/xslt.c b/libxslt/xslt.c
+index 780a5ad7..a234eb79 100644
+--- a/libxslt/xslt.c
++++ b/libxslt/xslt.c
+@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) {
+ 	int res;
+ 
+ 	res = xsltCheckRead(sec, NULL, filename);
+-	if (res == 0) {
+-	    xsltTransformError(NULL, NULL, NULL,
+-		 "xsltParseStylesheetFile: read rights for %s denied\n",
+-			     filename);
++	if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsltParseStylesheetFile: read rights for %s denied\n",
++                                 filename);
+ 	    return(NULL);
+ 	}
+     }
+-- 
+2.20.1
+
meta/recipes-support/libxslt/libxslt_1.1.33.bb +3 -1
index 28d404c..42b21c7 100644
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
 SECTION = "libs"
 DEPENDS = "libxml2"
 
-SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz"
+SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz \
+           file://0001-Fix-security-framework-bypass.patch \
+"
 
 SRC_URI[md5sum] = "b3bd254a03e46d58f8ad1e4559cd2c2f"
 SRC_URI[sha256sum] = "8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8"
Signature · 1 line
2.7.4
#16 lore raw

PATCH 15/19 texinfo-dummy-native: A little clean up of template.py

In reply to Armin Kuster

From: Peter Kjellerstedt <[email protected]>

This is mainly whitespace clean up, plus using the with statement when writing files.

---
 .../texinfo-dummy-native/texinfo-dummy/template.py | 63 +++++++++++-----------
 1 file changed, 30 insertions(+), 33 deletions(-)
meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py +30 -33
index e369f74..fcc2854 100644
@@ -33,21 +33,20 @@ import sys, os
 olong = "--output="
 Elong = "--macro-expand="
 
-
-this_binary = sys.argv[0].split ("/")[-1]
+this_binary = sys.argv[0].split("/")[-1]
 
 # To be outputted if functionality that hasn't been stubbed yet is invoked.
 stub_msg = """
-This stand-in version of %s is not yet fully capable of emulating the real
-version from the GNU texinfo suite. If you see this message, file a bug report
-with details on the recipe that failed.
+This stand-in version of %s is not yet fully capable of emulating
+the real version from the GNU texinfo suite. If you see this message, file a
+bug report with details on the recipe that failed.
 """ % this_binary
 
 # Autotools setups query the version, so this is actually necessary. Some of
 # them (lookin' at you, glibc) actually look for the substring "GNU texinfo,"
 # so we put that substring in there without actually telling a lie.
-version_str = """ %s (fake texinfo, emulating GNU texinfo) 5.2
- 
+version_str = """%s (fake texinfo, emulating GNU texinfo) 5.2
+
 Super amazing version which is totally not fake in any way whatsoever.
 Copyright (C) 2014 Intel Corp. Distributed under the terms of the MIT
 license.
@@ -55,62 +54,61 @@ license.
 
 simple_binaries = "pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \
                    txixml2texi install-info ginstall-info \
-                   update-info-dir".split ()
+                   update-info-dir".split()
 
 # These utilities use a slightly different set of options and flags.
-complex_binaries = "makeinfo texi2any".split ()
+complex_binaries = "makeinfo texi2any".split()
 
 valid_binaries = simple_binaries + complex_binaries
 
 # For generating blank output files.
-def touch_file (path):
-    f = open (path, "w")
-    f.close ()
+def touch_file(path):
+    with open(path, "w"):
+        pass
 
 assert this_binary in valid_binaries, \
-       this_binary + " is not one of " + ', '.join (valid_binaries)
+       this_binary + " is not one of " + ', '.join(valid_binaries)
 
 if "--version" in sys.argv:
     print(version_str)
-    sys.exit (0)
+    sys.exit(0)
 
 # For debugging
 log_interceptions = False
 if log_interceptions:
-    f = open ("/tmp/intercepted_" + this_binary, "a")
-    f.write (' '.join ([this_binary] + sys.argv[1:]) + '\n')
-    f.close ()
+    with open("/tmp/intercepted_" + this_binary, "a") as f:
+        f.write(' '.join([this_binary] + sys.argv[1:]) + '\n')
 
 # Look through the options and flags, and if necessary, touch any output
 # files.
 arg_idx = 1
-while arg_idx < len (sys.argv):
+while arg_idx < len(sys.argv):
     arg = sys.argv [arg_idx]
-    
+
     if arg == "--":
         break
-    
+
     # Something like -I . can result in a need for this (specifically the .)
-    elif len (arg) < 2:
+    elif len(arg) < 2:
         pass
-    
+
     # Check if -o or --output is specified. These can be used at most once.
-    elif arg[0] == '-' and arg[1] != '-' and arg[len (arg) - 1] == 'o':
-        touch_file (sys.argv[arg_idx + 1])
-        sys.exit (0)
-    elif arg.startswith (olong):
-        touch_file (arg.split ("=")[1])
-        sys.exit (0)
-    
+    elif arg[0] == '-' and arg[1] != '-' and arg[len(arg) - 1] == 'o':
+        touch_file(sys.argv[arg_idx + 1])
+        sys.exit(0)
+    elif arg.startswith(olong):
+        touch_file(arg.split("=")[1])
+        sys.exit(0)
+
     # Check for functionality that isn't implemented yet.
     else:
         assert arg[0] != '-' or arg[1] == '-' or 'E' not in arg or \
                this_binary in simple_binaries, \
                "-E option not yet supported" + stub_msg
-        
-        assert not arg.startswith (Elong), \
+
+        assert not arg.startswith(Elong), \
                Elong[:-1] + " option not yet supported" + stub_msg
-    
+
     arg_idx += 1
 
 # The -o/--output option overrides the default. For makeinfo and texi2any,
@@ -119,4 +117,3 @@ while arg_idx < len (sys.argv):
 assert this_binary in simple_binaries, \
        "Don't know how to get default output file name from input file!" + \
        stub_msg
-
Signature · 1 line
2.7.4
#20 lore raw

PATCH 16/19 texinfo-dummy-native: Rewrite template.py to use argparse

In reply to Armin Kuster

From: Peter Kjellerstedt <[email protected]>

The original version of template.py parses the arguments manually. This fails when looking for the -E option if, e.g., an -I option is specified without any space before its argument, and that argument contains the letter 'E'.

A minor difference to the original version is that it parsed the arguments in the order they were specified on the command line whereas this version will always handle -E before -o.

---
 .../texinfo-dummy-native/texinfo-dummy/template.py | 55 +++++++---------------
 1 file changed, 18 insertions(+), 37 deletions(-)
meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py +18 -37
index fcc2854..86c7c18 100644
@@ -28,10 +28,8 @@
 # of the executable from argv[0] and emulate the corresponding program, so
 # multiple copies of this script will exist under different names.
 
-import sys, os
+import sys, os, argparse
 
-olong = "--output="
-Elong = "--macro-expand="
 
 this_binary = sys.argv[0].split("/")[-1]
 
@@ -61,18 +59,9 @@ complex_binaries = "makeinfo texi2any".split()
 
 valid_binaries = simple_binaries + complex_binaries
 
-# For generating blank output files.
-def touch_file(path):
-    with open(path, "w"):
-        pass
-
 assert this_binary in valid_binaries, \
        this_binary + " is not one of " + ', '.join(valid_binaries)
 
-if "--version" in sys.argv:
-    print(version_str)
-    sys.exit(0)
-
 # For debugging
 log_interceptions = False
 if log_interceptions:
@@ -81,35 +70,27 @@ if log_interceptions:
 
 # Look through the options and flags, and if necessary, touch any output
 # files.
-arg_idx = 1
-while arg_idx < len(sys.argv):
-    arg = sys.argv [arg_idx]
-
-    if arg == "--":
-        break
+p = argparse.ArgumentParser()
+if this_binary in complex_binaries:
+    p.add_argument('-E', '--macro-expand', metavar='FILE')
+p.add_argument('-o', '--output', metavar='DEST')
+p.add_argument('--version', action='store_true')
 
-    # Something like -I . can result in a need for this (specifically the .)
-    elif len(arg) < 2:
-        pass
-
-    # Check if -o or --output is specified. These can be used at most once.
-    elif arg[0] == '-' and arg[1] != '-' and arg[len(arg) - 1] == 'o':
-        touch_file(sys.argv[arg_idx + 1])
-        sys.exit(0)
-    elif arg.startswith(olong):
-        touch_file(arg.split("=")[1])
-        sys.exit(0)
+args, unknown = p.parse_known_args()
 
-    # Check for functionality that isn't implemented yet.
-    else:
-        assert arg[0] != '-' or arg[1] == '-' or 'E' not in arg or \
-               this_binary in simple_binaries, \
-               "-E option not yet supported" + stub_msg
+if args.version:
+    print(version_str)
+    sys.exit(0)
 
-        assert not arg.startswith(Elong), \
-               Elong[:-1] + " option not yet supported" + stub_msg
+# Check for functionality that isn't implemented yet.
+assert not getattr(args, 'macro_expand', None), \
+    "-E/--macro-expand option not yet supported" + stub_msg
 
-    arg_idx += 1
+# Check if -o or --output is specified.
+if args.output:
+    with open(args.output, 'w'):
+        pass
+    sys.exit(0)
 
 # The -o/--output option overrides the default. For makeinfo and texi2any,
 # that default is to look for a @setfilename command in the input file.
Signature · 1 line
2.7.4
#21 lore raw

PATCH 17/19 package.bbclass: Clean up writing of runtime pkgdata files

In reply to Armin Kuster

From: Peter Kjellerstedt <[email protected]>

This introduces a variable, PKGDATA_VARS, that contains the names of the variables that are to be output in the runtime pkgdata files.

---
 meta/classes/package.bbclass | 56 ++++++++++++++------------------------------
 1 file changed, 18 insertions(+), 38 deletions(-)
meta/classes/package.bbclass +18 -38
index 4c0a859..eef1f7b 100644
@@ -1343,6 +1343,8 @@ EXPORT_FUNCTIONS package_name_hook
 
 PKGDESTWORK = "${WORKDIR}/pkgdata"
 
+PKGDATA_VARS = "PN PE PV PR PKGE PKGV PKGR LICENSE DESCRIPTION SUMMARY RDEPENDS RPROVIDES RRECOMMENDS RSUGGESTS RREPLACES RCONFLICTS SECTION PKG ALLOW_EMPTY FILES CONFFILES FILES_INFO pkg_postinst pkg_postrm pkg_preinst pkg_prerm"
+
 python emit_pkgdata() {
     from glob import glob
     import json
@@ -1447,48 +1449,26 @@ fi
                 total_size += fstat.st_size
         d.setVar('FILES_INFO', json.dumps(files, sort_keys=True))
 
-        subdata_file = pkgdatadir + "/runtime/%s" % pkg
-        sf = open(subdata_file, 'w')
-        write_if_exists(sf, pkg, 'PN')
-        write_if_exists(sf, pkg, 'PE')
-        write_if_exists(sf, pkg, 'PV')
-        write_if_exists(sf, pkg, 'PR')
-        write_if_exists(sf, pkg, 'PKGE')
-        write_if_exists(sf, pkg, 'PKGV')
-        write_if_exists(sf, pkg, 'PKGR')
-        write_if_exists(sf, pkg, 'LICENSE')
-        write_if_exists(sf, pkg, 'DESCRIPTION')
-        write_if_exists(sf, pkg, 'SUMMARY')
-        write_if_exists(sf, pkg, 'RDEPENDS')
-        rprov = write_if_exists(sf, pkg, 'RPROVIDES')
-        write_if_exists(sf, pkg, 'RRECOMMENDS')
-        write_if_exists(sf, pkg, 'RSUGGESTS')
-        write_if_exists(sf, pkg, 'RREPLACES')
-        write_if_exists(sf, pkg, 'RCONFLICTS')
-        write_if_exists(sf, pkg, 'SECTION')
-        write_if_exists(sf, pkg, 'PKG')
-        write_if_exists(sf, pkg, 'ALLOW_EMPTY')
-        write_if_exists(sf, pkg, 'FILES')
-        write_if_exists(sf, pkg, 'CONFFILES')
         process_postinst_on_target(pkg, d.getVar("MLPREFIX"))
         add_set_e_to_scriptlets(pkg)
-        write_if_exists(sf, pkg, 'pkg_postinst')
-        write_if_exists(sf, pkg, 'pkg_postrm')
-        write_if_exists(sf, pkg, 'pkg_preinst')
-        write_if_exists(sf, pkg, 'pkg_prerm')
-        write_if_exists(sf, pkg, 'FILERPROVIDESFLIST')
-        write_if_exists(sf, pkg, 'FILES_INFO')
-        for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg) or "").split():
-            write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile)
-
-        write_if_exists(sf, pkg, 'FILERDEPENDSFLIST')
-        for dfile in (d.getVar('FILERDEPENDSFLIST_' + pkg) or "").split():
-            write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile)
-
-        sf.write('%s_%s: %d\n' % ('PKGSIZE', pkg, total_size))
-        sf.close()
+
+        subdata_file = pkgdatadir + "/runtime/%s" % pkg
+        with open(subdata_file, 'w') as sf:
+            for var in (d.getVar('PKGDATA_VARS') or "").split():
+                val = write_if_exists(sf, pkg, var)
+
+            write_if_exists(sf, pkg, 'FILERPROVIDESFLIST')
+            for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg) or "").split():
+                write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile)
+
+            write_if_exists(sf, pkg, 'FILERDEPENDSFLIST')
+            for dfile in (d.getVar('FILERDEPENDSFLIST_' + pkg) or "").split():
+                write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile)
+
+            sf.write('%s_%s: %d\n' % ('PKGSIZE', pkg, total_size))
 
         # Symlinks needed for rprovides lookup
+        rprov = d.getVar('RPROVIDES_%s' % pkg) or d.getVar('RPROVIDES')
         if rprov:
             for p in rprov.strip().split():
                 subdata_sym = pkgdatadir + "/runtime-rprovides/%s/%s" % (p, pkg)
Signature · 1 line
2.7.4
#22 lore raw

PATCH 18/19 wpa-supplicant: Fix CVE-2019-9494 CVE-2019-9495 CVE-2019-9496 CVE-2019-9497 CVE-2019-9498 CVE-2019-9499 CVE-2019-11555

In reply to Armin Kuster

From: Adrian Bunk <[email protected]>

---
 ...pwd-server-Fix-reassembly-buffer-handling.patch |  48 +++
 ...-constant-time-operations-for-private-big.patch |  97 ++++++
 ...er-functions-for-constant-time-operations.patch | 222 ++++++++++++++
 ...P-pwd-peer-Fix-reassembly-buffer-handling.patch |  48 +++
 ...-constant-time-selection-for-crypto_bignu.patch |  64 ++++
 ...-constant-time-and-memory-access-for-find.patch | 327 ++++++++++++++++++++
 ...mize-timing-differences-in-PWE-derivation.patch | 244 +++++++++++++++
 ...id-branches-in-is_quadratic_residue_blind.patch | 147 +++++++++
 ...7-SAE-Mask-timing-of-MODP-groups-22-23-24.patch | 121 ++++++++
 ...E-Use-const_time-selection-for-PWE-in-FFC.patch | 108 +++++++
 ...stant-time-operations-in-sae_test_pwd_see.patch | 139 +++++++++
 ...confirm-message-validation-in-error-cases.patch |  60 ++++
 ...server-Verify-received-scalar-and-element.patch |  61 ++++
 ...-EAP-pwd-server-Detect-reflection-attacks.patch |  48 +++
 ...client-Verify-received-scalar-and-element.patch |  61 ++++
 ...-Check-element-x-y-coordinates-explicitly.patch | 335 +++++++++++++++++++++
 .../wpa-supplicant/wpa-supplicant_2.7.bb           |  16 +
 17 files changed, 2146 insertions(+)
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-OpenSSL-Use-constant-time-operations-for-private-big.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Add-helper-functions-for-constant-time-operations.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-OpenSSL-Use-constant-time-selection-for-crypto_bignu.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0004-EAP-pwd-Use-constant-time-and-memory-access-for-find.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0005-SAE-Minimize-timing-differences-in-PWE-derivation.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0006-SAE-Avoid-branches-in-is_quadratic_residue_blind.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0007-SAE-Mask-timing-of-MODP-groups-22-23-24.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0008-SAE-Use-const_time-selection-for-PWE-in-FFC.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0009-SAE-Use-constant-time-operations-in-sae_test_pwd_see.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0010-SAE-Fix-confirm-message-validation-in-error-cases.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0013-EAP-pwd-client-Verify-received-scalar-and-element.patch
 create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0014-EAP-pwd-Check-element-x-y-coordinates-explicitly.patch
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch new file +48 -0
new file mode 100644
index 0000000..45e6e87
@@ -0,0 +1,48 @@
+From fe76f487e28bdc61940f304f153a954cf36935ea Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <[email protected]>
+Date: Wed, 17 Apr 2019 01:55:32 +0300
+Subject: [PATCH 1/3] EAP-pwd server: Fix reassembly buffer handling
+
+data->inbuf allocation might fail and if that were to happen, the next
+fragment in the exchange could have resulted in NULL pointer
+dereference. Unexpected fragment with more bit might also be able to
+trigger this. Fix that by explicitly checking for data->inbuf to be
+available before using it.
+
+Signed-off-by: Jouni Malinen <[email protected]>
+Signed-off-by: Adrian Bunk <[email protected]>
+Upstream-Status: Backport
+CVE: CVE-2019-11555
+---
+ src/eap_server/eap_server_pwd.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c
+index 11bef55..38e2af8 100644
+--- a/src/eap_server/eap_server_pwd.c
++++ b/src/eap_server/eap_server_pwd.c
+@@ -912,6 +912,12 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv,
+ 	 * the first and all intermediate fragments have the M bit set
+ 	 */
+ 	if (EAP_PWD_GET_MORE_BIT(lm_exch) || data->in_frag_pos) {
++		if (!data->inbuf) {
++			wpa_printf(MSG_DEBUG,
++				   "EAP-pwd: No buffer for reassembly");
++			eap_pwd_state(data, FAILURE);
++			return;
++		}
+ 		if ((data->in_frag_pos + len) > wpabuf_size(data->inbuf)) {
+ 			wpa_printf(MSG_DEBUG, "EAP-pwd: Buffer overflow "
+ 				   "attack detected! (%d+%d > %d)",
+@@ -932,7 +938,7 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv,
+ 	 * last fragment won't have the M bit set (but we're obviously
+ 	 * buffering fragments so that's how we know it's the last)
+ 	 */
+-	if (data->in_frag_pos) {
++	if (data->in_frag_pos && data->inbuf) {
+ 		pos = wpabuf_head_u8(data->inbuf);
+ 		len = data->in_frag_pos;
+ 		wpa_printf(MSG_DEBUG, "EAP-pwd: Last fragment, %d bytes",
+-- 
+2.7.4
+
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-OpenSSL-Use-constant-time-operations-for-private-big.patch new file +97 -0

97 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Add-helper-functions-for-constant-time-operations.patch new file +222 -0

222 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch new file +48 -0

48 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-OpenSSL-Use-constant-time-selection-for-crypto_bignu.patch new file +64 -0

64 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0004-EAP-pwd-Use-constant-time-and-memory-access-for-find.patch new file +327 -0

327 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0005-SAE-Minimize-timing-differences-in-PWE-derivation.patch new file +244 -0

244 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0006-SAE-Avoid-branches-in-is_quadratic_residue_blind.patch new file +147 -0

147 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0007-SAE-Mask-timing-of-MODP-groups-22-23-24.patch new file +121 -0

121 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0008-SAE-Use-const_time-selection-for-PWE-in-FFC.patch new file +108 -0

108 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0009-SAE-Use-constant-time-operations-in-sae_test_pwd_see.patch new file +139 -0

139 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0010-SAE-Fix-confirm-message-validation-in-error-cases.patch new file +60 -0

60 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch new file +61 -0

61 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch new file +48 -0

48 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0013-EAP-pwd-client-Verify-received-scalar-and-element.patch new file +61 -0

61 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0014-EAP-pwd-Check-element-x-y-coordinates-explicitly.patch new file +335 -0

335 lines not on this page · raw message

meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.7.bb +16 -0
index fe5fa2b..277bbae 100644
@@ -25,6 +25,22 @@ 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-OpenSSL-Use-constant-time-operations-for-private-big.patch \
+           file://0002-Add-helper-functions-for-constant-time-operations.patch \
+           file://0003-OpenSSL-Use-constant-time-selection-for-crypto_bignu.patch \
+           file://0004-EAP-pwd-Use-constant-time-and-memory-access-for-find.patch \
+           file://0005-SAE-Minimize-timing-differences-in-PWE-derivation.patch \
+           file://0006-SAE-Avoid-branches-in-is_quadratic_residue_blind.patch \
+           file://0007-SAE-Mask-timing-of-MODP-groups-22-23-24.patch \
+           file://0008-SAE-Use-const_time-selection-for-PWE-in-FFC.patch \
+           file://0009-SAE-Use-constant-time-operations-in-sae_test_pwd_see.patch \
+           file://0010-SAE-Fix-confirm-message-validation-in-error-cases.patch \
+           file://0011-EAP-pwd-server-Verify-received-scalar-and-element.patch \
+           file://0012-EAP-pwd-server-Detect-reflection-attacks.patch \
+           file://0013-EAP-pwd-client-Verify-received-scalar-and-element.patch \
+           file://0014-EAP-pwd-Check-element-x-y-coordinates-explicitly.patch \
+           file://0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch \
+           file://0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch \
           "
 SRC_URI[md5sum] = "a68538fb62766f40f890125026c42c10"
 SRC_URI[sha256sum] = "76ea6b06b7a2ea8e6d9eb1a9166166f1656e6d48c7508914f592100c95c73074"
Signature · 1 line
2.7.4
#23 lore raw

PATCH 19/19 gpg_sign/selftest: Fix secmem parameter handling

In reply to Armin Kuster

From: Richard Purdie <[email protected]>

We keep seeing "cannot allocate memory" errors from rpm when signing packages on the autobuilder. The following were tried:

* checking locked memory use (isn't hitting limits)
* Restricting RPM_GPG_SIGN_CHUNK to 1
* Limiting to 10 parallel do_package_write_rpm tasks
* Allowing unlimied memory overcommit
* Disabling rpm parallel compression

and the test still failed. Further invetigation showed that the --auto-expand-secmem wasn't being passed to gpg-agent which meant the secmem couldn't be expanded hence the errors when there was pressure on the agent.

The reason this happens is that some of the early gpg commands can start the agent without the option and it sticks around in memory so a version with the correct option may or may not get started.

We therefore add the option to all the key gpg calls.

---
 meta/lib/oe/gpg_sign.py                 | 39 +++++++++++++++++++--------------
 meta/lib/oeqa/selftest/cases/signing.py |  3 ++-
 2 files changed, 24 insertions(+), 18 deletions(-)
meta/lib/oe/gpg_sign.py +22 -17
index a95d2ba..2fd8c3b 100644
@@ -15,21 +15,27 @@ class LocalSigner(object):
     def __init__(self, d):
         self.gpg_bin = d.getVar('GPG_BIN') or \
                   bb.utils.which(os.getenv('PATH'), 'gpg')
+        self.gpg_cmd = [self.gpg_bin]
+        self.gpg_agent_bin = bb.utils.which(os.getenv('PATH'), "gpg-agent")
+        # Without this we see "Cannot allocate memory" errors when running processes in parallel
+        # It needs to be set for any gpg command since any agent launched can stick around in memory
+        # and this parameter must be set.
+        if self.gpg_agent_bin:
+            self.gpg_cmd += ["--agent-program=%s|--auto-expand-secmem" % (self.gpg_agent_bin)]
         self.gpg_path = d.getVar('GPG_PATH')
-        self.gpg_version = self.get_gpg_version()
         self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
-        self.gpg_agent_bin = bb.utils.which(os.getenv('PATH'), "gpg-agent")
+        self.gpg_version = self.get_gpg_version()
+
 
     def export_pubkey(self, output_file, keyid, armor=True):
         """Export GPG public key to a file"""
-        cmd = '%s --no-permission-warning --batch --yes --export -o %s ' % \
-                (self.gpg_bin, output_file)
+        cmd = self.gpg_cmd + ["--no-permission-warning", "--batch", "--yes", "--export", "-o", output_file]
         if self.gpg_path:
-            cmd += "--homedir %s " % self.gpg_path
+            cmd += ["--homedir", self.gpg_path]
         if armor:
-            cmd += "--armor "
-        cmd += keyid
-        subprocess.check_output(shlex.split(cmd), stderr=subprocess.STDOUT)
+            cmd += ["--armor"]
+        cmd += [keyid]
+        subprocess.check_output(cmd, stderr=subprocess.STDOUT)
 
     def sign_rpms(self, files, keyid, passphrase, digest, sign_chunk, fsk=None, fsk_password=None):
         """Sign RPM files"""
@@ -59,7 +65,7 @@ class LocalSigner(object):
         if passphrase_file and passphrase:
             raise Exception("You should use either passphrase_file of passphrase, not both")
 
-        cmd = [self.gpg_bin, '--detach-sign', '--no-permission-warning', '--batch',
+        cmd = self.gpg_cmd + ['--detach-sign', '--no-permission-warning', '--batch',
                '--no-tty', '--yes', '--passphrase-fd', '0', '-u', keyid]
 
         if self.gpg_path:
@@ -72,9 +78,6 @@ class LocalSigner(object):
         if self.gpg_version > (2,1,):
             cmd += ['--pinentry-mode', 'loopback']
 
-        if self.gpg_agent_bin:
-            cmd += ["--agent-program=%s|--auto-expand-secmem" % (self.gpg_agent_bin)]
-
         cmd += [input_file]
 
         try:
@@ -101,7 +104,8 @@ class LocalSigner(object):
     def get_gpg_version(self):
         """Return the gpg version as a tuple of ints"""
         try:
-            ver_str = subprocess.check_output((self.gpg_bin, "--version", "--no-permission-warning")).split()[2].decode("utf-8")
+            cmd = self.gpg_cmd + ["--version", "--no-permission-warning"]
+            ver_str = subprocess.check_output(cmd).split()[2].decode("utf-8")
             return tuple([int(i) for i in ver_str.split("-")[0].split('.')])
         except subprocess.CalledProcessError as e:
             raise bb.build.FuncFailed("Could not get gpg version: %s" % e)
@@ -109,11 +113,12 @@ class LocalSigner(object):
 
     def verify(self, sig_file):
         """Verify signature"""
-        cmd = self.gpg_bin + " --verify --no-permission-warning "
+        cmd = self.gpg_cmd + [" --verify", "--no-permission-warning"]
         if self.gpg_path:
-            cmd += "--homedir %s " % self.gpg_path
-        cmd += sig_file
-        status = subprocess.call(shlex.split(cmd))
+            cmd += ["--homedir", self.gpg_path]
+
+        cmd += [sig_file]
+        status = subprocess.call(cmd)
         ret = False if status else True
         return ret
 
meta/lib/oeqa/selftest/cases/signing.py +2 -1
index 9c710bd..b390f37 100644
@@ -30,7 +30,8 @@ class Signing(OESelftestTestCase):
         self.secret_key_path = os.path.join(self.testlayer_path, 'files', 'signing', "key.secret")
 
         nsysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native")
-        runCmd('gpg --batch --homedir %s --import %s %s' % (self.gpg_dir, self.pub_key_path, self.secret_key_path), native_sysroot=nsysroot)
+
+        runCmd('gpg --agent-program=`which gpg-agent`\|--auto-expand-secmem --batch --homedir %s --import %s %s' % (self.gpg_dir, self.pub_key_path, self.secret_key_path), native_sysroot=nsysroot)
         return nsysroot + get_bb_var("bindir_native")
 
 
Signature · 1 line
2.7.4
#17 lore raw

Re: [Warrior][ 15/19] texinfo-dummy-native: A little clean up of template.py

In reply to Armin Kuster
Quoted 5 lines · Armin Kuster

From: Peter Kjellerstedt <[email protected]>

This is mainly whitespace clean up, plus using the with statement when writing files.
...

This patch and the next two look more like cleanup patches to me, not changes that should go into a stable series.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#18 lore raw

Re: [Warrior][ 15/19] texinfo-dummy-native: A little clean up of template.py

Quoted 10 lines · Adrian Bunk
Quoted 6 lines · Armin Kuster

From: Peter Kjellerstedt <[email protected]>

This is mainly whitespace clean up, plus using the with statement when
writing files.
...

This patch and the next two look more like cleanup patches to me, not changes that should go into a stable series.

FWIW the package.bbclass change is being requested to allow people to stop patching the class...

Cheers,

Richard

#3 lore raw

Re: [Warrior][ 02/19] linux-yocto: Add scsi_debug module when ptest is in DISTRO_FEATURES

In reply to Armin Kuster

Hi,

I think this will backport also this warning:
http://lists.openembedded.org/pipermail/openembedded-core/2019-June/283912.html

can it be backported together with the fix for it from Bruce:
http://lists.openembedded.org/pipermail/openembedded-core/2019-June/283913.html
I haven't noticed the fix itself on ML yet.

Quoted 76 lines · Armin Kuster

From: Mariano López <[email protected]>

util-linux ptest requires the scsi_debug module to perform eject/mount tests. This will conditionally add scsi_debug module when ptest is in DISTRO_FEATURES.

This doesn't include linux-yocto-tiny because the resulting image will be too big and do_image would complain about this.

[YOCTO #13301]

---
 meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb | 1 +
 meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb  | 1 +
 meta/recipes-kernel/linux/linux-yocto_4.19.bb    | 1 +
 meta/recipes-kernel/linux/linux-yocto_5.0.bb     | 1 +
 4 files changed, 4 insertions(+)
meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb +1 -0
index 6604bdf..0836dc7 100644
@@ -41,3 +41,4 @@ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
 KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES",

"ptest", " features/scsi/scsi-debug.scc", "" ,d)}"

meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb +1 -0
index 1fe28b1..b5e415f 100644
@@ -41,3 +41,4 @@ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
 KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES",

"ptest", " features/scsi/scsi-debug.scc", "" ,d)}"

meta/recipes-kernel/linux/linux-yocto_4.19.bb +0 -0
index a5fdafe..cda4ecf 100644
@@ -47,3 +47,4 @@ KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32",

" cfg/x32.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"

meta/recipes-kernel/linux/linux-yocto_5.0.bb +0 -0
index da795d9..8aec315 100644
@@ -50,3 +50,4 @@ KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32",

" cfg/x32.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
--
2.7.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#19 lore raw

Re: [Warrior][ 15/19] texinfo-dummy-native: A little clean up of template.py

In reply to Richard Purdie
Quoted 9 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Richard Purdie
Sent: den 24 juni 2019 12:23
To: Adrian Bunk <[email protected]>; Armin Kuster <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core] [Warrior][ 15/19] texinfo-dummy-native: A little clean up of template.py

Quoted 11 lines
Quoted 10 lines · Adrian Bunk
Quoted 6 lines · Armin Kuster

From: Peter Kjellerstedt <[email protected]>

This is mainly whitespace clean up, plus using the with statement when
writing files.
...

This patch and the next two look more like cleanup patches to me, not changes that should go into a stable series.

Yes, this patch is pure cleanup, however, it is preparation for the next patch, which is not cleanup. The next patch fixes a problem with one of our recipes that uses the texinfo bbclass if the build path happens to contain the letter "E"...

Quoted 2 lines

FWIW the package.bbclass change is being requested to allow people to stop patching the class...

Exactly.

Quoted 3 lines

Cheers,

Richard

//Peter

#24 lore raw
In reply to Armin Kuster
Quoted 10 lines · Armin Kuster

Please review by Wednesday

The following changes since commit 712c78984c891e6357e1b1dc414431fb6c226c49:

gnutls: Use ca-certificates as default trust store file (2019-06-14 07:05:34 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib stable/warrior-nmut
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/warrior-nmut

My concern is that the vim CVE fix isn't here. As I replied to myself when posting, it's a viable option for Warrior to take just the CVE fix as due to the "every change is a new version" the fix itself is a single patch. Would you rather go that route, or just pull in latest in master vim? Thanks!

Signature · 1 line
Tom