Skip to contentSkip to conversation

Pull request (cover letter only)

PATCH In review Steve Sakoman 2 participants 4 messages May 12, 2021 – May 14, 2021

lore
Share & tools
lore
#0 lore raw

cover Pull request (cover letter only)

The following changes since commit 834a8e357bc999a0163e7c5bafbcc1a8816448d4:

license_image.bbclass: Fix symlink to generic license files (2021-05-03 04:56:23 -1000)

are available in the Git repository at:

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

Alexander Kanavin (5):
diffoscope: add native libraries to LD_LIBRARY_PATH Revert "oeqa: Set LD_LIBRARY_PATH when executing native commands"
ovmf: update to 202002
ovmf: update to 202005
ovmf: update edk2-stable202005 -> edk2-stable202008

Anatol Belski (1):
tar: Fix CVE-2021-20193

Bruce Ashfield (4):
linux-yocto/5.4: update to v5.4.114
linux-yocto/5.4: update to v5.4.116
perf: fix python-audit RDEPENDS
make-mod-scripts: add HOSTCXX definitions and gmp-native dependency

Christophe Chapuis (1):
rootfs.py: find .ko.gz and .ko.xz kernel modules as well

Jose Quaresma (1):
ptest-runner: libgcc must be installed for pthread_cancel to work

Joshua Watt (1):
classes/image: Use xargs to set file timestamps

Kai Uwe Broulik (1):
gstreamer1.0-plugins-good: on wayland qt5 needs qtwayland

Khem Raj (1):
cml1.bbclass: Return sorted list of cfg files

Lee Chee Yang (1):
binutils: fix CVE-2021-3487

Mark Hatle (1):
kernel.bbclass: Remove do_install[prefunc] no longer needed

Michael Opdenacker (1):
sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure
message

Richard Purdie (3):
yocto-uninative: Update to 3.1 which includes a patchelf fix pybootchart/draw: Avoid divide by zero error oeqa/qemurunner: Improve logging thread exit handling for qemu
shutdown test

Steve Sakoman (2):
lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for
intercepts
reproducible.py: add quilt-ptest and valgrind-ptest

Yi Fan Yu (1):
libevent: Increase ptest timing tolerance 50 ms -> 100 ms

zhengruoqin (1):
wireless-regdb: upgrade 2020.11.20 -> 2021.04.21

 meta/classes/cml1.bbclass                     |   2 +-
 meta/classes/image.bbclass                    |   2 +-
 meta/classes/kernel.bbclass                   |   1 -
 meta/classes/sanity.bbclass                   |   9 +-
 meta/conf/distro/include/yocto-uninative.inc  |   8 +-
 meta/lib/oe/package_manager.py                |   2 +-
 meta/lib/oe/rootfs.py                         |   2 +-
 meta/lib/oeqa/selftest/cases/reproducible.py  |   2 +
 meta/lib/oeqa/selftest/cases/runqemu.py       |   9 +-
 meta/lib/oeqa/utils/commands.py               |   3 -
 meta/lib/oeqa/utils/qemurunner.py             |  12 +-
 ...ovmf-update-path-to-native-BaseTools.patch |   6 +-
 ...ile-adjust-to-build-in-under-bitbake.patch |  32 +++--
 .../0003-ovmf-enable-long-path-file.patch     |   6 +-
 .../ovmf/0004-ovmf-Update-to-latest.patch     |  20 +--
 meta/recipes-core/ovmf/ovmf_git.bb            |   6 +-
 .../binutils/binutils-2.34.inc                |   1 +
 .../binutils/binutils/CVE-2021-3487.patch     |  83 +++++++++++
 .../tar/tar/CVE-2021-20193.patch              | 133 ++++++++++++++++++
 meta/recipes-extended/tar/tar_1.32.bb         |   1 +
 .../linux/linux-yocto-rt_5.4.bb               |   6 +-
 .../linux/linux-yocto-tiny_5.4.bb             |   8 +-
 meta/recipes-kernel/linux/linux-yocto_5.4.bb  |  22 +--
 .../make-mod-scripts/make-mod-scripts_1.0.bb  |   2 +
 meta/recipes-kernel/perf/perf.bb              |   2 +-
 ....11.20.bb => wireless-regdb_2021.04.21.bb} |   2 +-
 .../gstreamer1.0-plugins-good_1.16.3.bb       |   4 +-
 .../diffoscope/diffoscope_172.bb              |   1 +
 ...ncrease-default-timeval-tolerance-50.patch |  33 +++++
 .../libevent/libevent_2.1.11.bb               |   1 +
 .../ptest-runner/ptest-runner_2.4.0.bb        |   2 +
 scripts/pybootchartgui/pybootchartgui/draw.py |   2 +-
 32 files changed, 355 insertions(+), 70 deletions(-)
 create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2021-3487.patch
 create mode 100644 meta/recipes-extended/tar/tar/CVE-2021-20193.patch
 rename meta/recipes-kernel/wireless-regdb/{wireless-regdb_2020.11.20.bb => wireless-regdb_2021.04.21.bb} (94%)
 create mode 100644 meta/recipes-support/libevent/libevent/0002-test-regress.h-Increase-default-timeval-tolerance-50.patch
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/25 tar: Fix CVE-2021-20193

From: Anatol Belski <[email protected]>

---
 .../tar/tar/CVE-2021-20193.patch              | 133 ++++++++++++++++++
 meta/recipes-extended/tar/tar_1.32.bb         |   1 +
 2 files changed, 134 insertions(+)
 create mode 100644 meta/recipes-extended/tar/tar/CVE-2021-20193.patch
meta/recipes-extended/tar/tar/CVE-2021-20193.patch new file +133 -0
new file mode 100644
index 0000000000..89e8e20844
@@ -0,0 +1,133 @@
+From d9d4435692150fa8ff68e1b1a473d187cc3fd777 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <[email protected]>
+Date: Sun, 17 Jan 2021 20:41:11 +0200
+Subject: Fix memory leak in read_header
+
+Bug reported in https://savannah.gnu.org/bugs/?59897
+
+* src/list.c (read_header): Don't return directly from the loop.
+Instead set the status and break.  Return the status.  Free
+next_long_name and next_long_link before returning.
+
+CVE: CVE-2021-20193
+Upstream-Status: Backport
+[https://git.savannah.gnu.org/cgit/tar.git/patch/?id=d9d4435692150fa8ff68e1b1a473d187cc3fd777]
+Signed-off-by: Anatol Belski <[email protected]>
+
+---
+ src/list.c | 40 ++++++++++++++++++++++++++++------------
+ 1 file changed, 28 insertions(+), 12 deletions(-)
+
+diff --git a/src/list.c b/src/list.c
+index e40a5c8..d7ef441 100644
+--- a/src/list.c
++++ b/src/list.c
+@@ -408,26 +408,27 @@ read_header (union block **return_block, struct tar_stat_info *info,
+ 	     enum read_header_mode mode)
+ {
+   union block *header;
+-  union block *header_copy;
+   char *bp;
+   union block *data_block;
+   size_t size, written;
+-  union block *next_long_name = 0;
+-  union block *next_long_link = 0;
++  union block *next_long_name = NULL;
++  union block *next_long_link = NULL;
+   size_t next_long_name_blocks = 0;
+   size_t next_long_link_blocks = 0;
+-
++  enum read_header status = HEADER_SUCCESS;
++  
+   while (1)
+     {
+-      enum read_header status;
+-
+       header = find_next_block ();
+       *return_block = header;
+       if (!header)
+-	return HEADER_END_OF_FILE;
++	{
++	  status = HEADER_END_OF_FILE;
++	  break;
++	}
+ 
+       if ((status = tar_checksum (header, false)) != HEADER_SUCCESS)
+-	return status;
++	break;
+ 
+       /* Good block.  Decode file size and return.  */
+ 
+@@ -437,7 +438,10 @@ read_header (union block **return_block, struct tar_stat_info *info,
+ 	{
+ 	  info->stat.st_size = OFF_FROM_HEADER (header->header.size);
+ 	  if (info->stat.st_size < 0)
+-	    return HEADER_FAILURE;
++	    {
++	      status = HEADER_FAILURE;
++	      break;
++	    }
+ 	}
+ 
+       if (header->header.typeflag == GNUTYPE_LONGNAME
+@@ -447,10 +451,14 @@ read_header (union block **return_block, struct tar_stat_info *info,
+ 	  || header->header.typeflag == SOLARIS_XHDTYPE)
+ 	{
+ 	  if (mode == read_header_x_raw)
+-	    return HEADER_SUCCESS_EXTENDED;
++	    {
++	      status = HEADER_SUCCESS_EXTENDED;
++	      break;
++	    }
+ 	  else if (header->header.typeflag == GNUTYPE_LONGNAME
+ 		   || header->header.typeflag == GNUTYPE_LONGLINK)
+ 	    {
++	      union block *header_copy;
+ 	      size_t name_size = info->stat.st_size;
+ 	      size_t n = name_size % BLOCKSIZE;
+ 	      size = name_size + BLOCKSIZE;
+@@ -517,7 +525,10 @@ read_header (union block **return_block, struct tar_stat_info *info,
+ 	      xheader_decode_global (&xhdr);
+ 	      xheader_destroy (&xhdr);
+ 	      if (mode == read_header_x_global)
+-		return HEADER_SUCCESS_EXTENDED;
++		{
++		  status = HEADER_SUCCESS_EXTENDED;
++		  break;
++		}
+ 	    }
+ 
+ 	  /* Loop!  */
+@@ -536,6 +547,7 @@ read_header (union block **return_block, struct tar_stat_info *info,
+ 	      name = next_long_name->buffer + BLOCKSIZE;
+ 	      recent_long_name = next_long_name;
+ 	      recent_long_name_blocks = next_long_name_blocks;
++	      next_long_name = NULL;
+ 	    }
+ 	  else
+ 	    {
+@@ -567,6 +579,7 @@ read_header (union block **return_block, struct tar_stat_info *info,
+ 	      name = next_long_link->buffer + BLOCKSIZE;
+ 	      recent_long_link = next_long_link;
+ 	      recent_long_link_blocks = next_long_link_blocks;
++	      next_long_link = NULL;
+ 	    }
+ 	  else
+ 	    {
+@@ -578,9 +591,12 @@ read_header (union block **return_block, struct tar_stat_info *info,
+ 	    }
+ 	  assign_string (&info->link_name, name);
+ 
+-	  return HEADER_SUCCESS;
++	  break;
+ 	}
+     }
++  free (next_long_name);
++  free (next_long_link);
++  return status;
+ }
+ 
+ #define ISOCTAL(c) ((c)>='0'&&(c)<='7')
+-- 
+cgit v1.2.1
+
meta/recipes-extended/tar/tar_1.32.bb +1 -0
index ebe6cb0dbd..3ae6d674a5 100644
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
            file://musl_dirent.patch \
+           file://CVE-2021-20193.patch \
 "
 
 SRC_URI[md5sum] = "17917356fff5cb4bd3cd5a6c3e727b05"
Signature · 1 line
2.25.1
#2 lore raw
In reply to Steve Sakoman
Quoted 50 lines · Steve Sakoman

The following changes since commit 834a8e357bc999a0163e7c5bafbcc1a8816448d4:

  license_image.bbclass: Fix symlink to generic license files (2021-05-03 04:56:23 -1000)

are available in the Git repository at:

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

Alexander Kanavin (5):
  diffoscope: add native libraries to LD_LIBRARY_PATH Revert "oeqa: Set LD_LIBRARY_PATH when executing native commands"
  ovmf: update to 202002
  ovmf: update to 202005
  ovmf: update edk2-stable202005 -> edk2-stable202008

Anatol Belski (1):
  tar: Fix CVE-2021-20193

Bruce Ashfield (4):
  linux-yocto/5.4: update to v5.4.114
  linux-yocto/5.4: update to v5.4.116
  perf: fix python-audit RDEPENDS
  make-mod-scripts: add HOSTCXX definitions and gmp-native dependency

Christophe Chapuis (1):
  rootfs.py: find .ko.gz and .ko.xz kernel modules as well

Jose Quaresma (1):
  ptest-runner: libgcc must be installed for pthread_cancel to work

Joshua Watt (1):
  classes/image: Use xargs to set file timestamps

Kai Uwe Broulik (1):
  gstreamer1.0-plugins-good: on wayland qt5 needs qtwayland

Khem Raj (1):
  cml1.bbclass: Return sorted list of cfg files

Lee Chee Yang (1):
  binutils: fix CVE-2021-3487

Mark Hatle (1):
  kernel.bbclass: Remove do_install[prefunc] no longer needed

Michael Opdenacker (1):
  sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message

Quoted 5 lines

Richard Purdie (3):
  yocto-uninative: Update to 3.1 which includes a patchelf fix pybootchart/draw: Avoid divide by zero error oeqa/qemurunner: Improve logging thread exit handling for qemu shutdown test

I merged this branch apart from this last patch above as the author of the patch messed up and you'd need the subsequent fixes too ;-) It can come together, later.

Cheers,

Richard

#3 lore raw
Quoted 58 lines · Richard Purdie
Quoted 50 lines · Steve Sakoman

The following changes since commit 834a8e357bc999a0163e7c5bafbcc1a8816448d4:

license_image.bbclass: Fix symlink to generic license files (2021-05-03 04:56:23 -1000)

are available in the Git repository at:

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

Alexander Kanavin (5):
diffoscope: add native libraries to LD_LIBRARY_PATH Revert "oeqa: Set LD_LIBRARY_PATH when executing native commands"
ovmf: update to 202002
ovmf: update to 202005
ovmf: update edk2-stable202005 -> edk2-stable202008

Anatol Belski (1):
tar: Fix CVE-2021-20193

Bruce Ashfield (4):
linux-yocto/5.4: update to v5.4.114
linux-yocto/5.4: update to v5.4.116
perf: fix python-audit RDEPENDS
make-mod-scripts: add HOSTCXX definitions and gmp-native dependency

Christophe Chapuis (1):
rootfs.py: find .ko.gz and .ko.xz kernel modules as well

Jose Quaresma (1):
ptest-runner: libgcc must be installed for pthread_cancel to work

Joshua Watt (1):
classes/image: Use xargs to set file timestamps

Kai Uwe Broulik (1):
gstreamer1.0-plugins-good: on wayland qt5 needs qtwayland

Khem Raj (1):
cml1.bbclass: Return sorted list of cfg files

Lee Chee Yang (1):
binutils: fix CVE-2021-3487

Mark Hatle (1):
kernel.bbclass: Remove do_install[prefunc] no longer needed

Michael Opdenacker (1):
sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure
message

Quoted 5 lines

Richard Purdie (3):
yocto-uninative: Update to 3.1 which includes a patchelf fix pybootchart/draw: Avoid divide by zero error oeqa/qemurunner: Improve logging thread exit handling for qemu
shutdown test

Quoted 3 lines

I merged this branch apart from this last patch above as the author of the patch messed up and you'd need the subsequent fixes too ;-) It can come together, later.

No problem! I'll include that patch and the subsequent fixes in my next review set.

Steve