Skip to contentSkip to conversation

Review request

PATCH New Anuj Mittal 1 participant 17 messages Nov 22, 2021

lore
Share & tools
lore
#12 lore raw

PATCH 12/16 vim: fix CVE-2021-3872 and CVE-2021-3903

In reply to Anuj Mittal

From: Mingli Yu <[email protected]>

Backport 2 patches to fix below CVEs:
- CVE-2021-3872
- CVE-2021-3903

---
 .../vim/files/CVE-2021-3872.patch             | 57 +++++++++++++++++++
 .../vim/files/CVE-2021-3903.patch             | 38 +++++++++++++
 meta/recipes-support/vim/vim.inc              |  2 +
 3 files changed, 97 insertions(+)
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3872.patch
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3903.patch
meta/recipes-support/vim/files/CVE-2021-3872.patch new file +57 -0
new file mode 100644
index 0000000000..f0f30933fa
@@ -0,0 +1,57 @@
+From 132d060ffbb9651f0d79bd0b6d80cab460235a99 Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar <[email protected]>
+Date: Fri, 12 Nov 2021 02:56:51 +0000
+Subject: [PATCH] patch 8.2.3487: illegal memory access if buffer name is very
+ long
+
+Problem:    Illegal memory access if buffer name is very long.
+Solution:   Make sure not to go over the end of the buffer.
+
+CVE: CVE-2021-3872
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/826bfe4bbd7594188e3d74d2539d9707b1c6a14b]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ src/drawscreen.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/drawscreen.c b/src/drawscreen.c
+index 3a88ee979..9acb70552 100644
+--- a/src/drawscreen.c
++++ b/src/drawscreen.c
+@@ -446,13 +446,13 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
+ 	    *(p + len++) = ' ';
+ 	if (bt_help(wp->w_buffer))
+ 	{
+-	    STRCPY(p + len, _("[Help]"));
++	    vim_snprintf((char *)p + len, MAXPATHL - len, "%s", _("[Help]"));
+ 	    len += (int)STRLEN(p + len);
+ 	}
+ #ifdef FEAT_QUICKFIX
+ 	if (wp->w_p_pvw)
+ 	{
+-	    STRCPY(p + len, _("[Preview]"));
++	    vim_snprintf((char *)p + len, MAXPATHL - len, "%s", _("[Preview]"));
+ 	    len += (int)STRLEN(p + len);
+ 	}
+ #endif
+@@ -462,12 +462,12 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
+ #endif
+ 		)
+ 	{
+-	    STRCPY(p + len, "[+]");
+-	    len += 3;
++	    vim_snprintf((char *)p + len, MAXPATHL - len, "%s", "[+]");
++	    len += (int)STRLEN(p + len);
+ 	}
+ 	if (wp->w_buffer->b_p_ro)
+ 	{
+-	    STRCPY(p + len, _("[RO]"));
++	    vim_snprintf((char *)p + len, MAXPATHL - len, "%s", _("[RO]"));
+ 	    len += (int)STRLEN(p + len);
+ 	}
+ 
+-- 
+2.31.1
+
meta/recipes-support/vim/files/CVE-2021-3903.patch new file +38 -0
new file mode 100644
index 0000000000..fb45857de8
@@ -0,0 +1,38 @@
+From a366598006f4d7bf9b4fbcd334a2e5078dcb6ad8 Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar <[email protected]>
+Date: Fri, 12 Nov 2021 02:23:38 +0000
+Subject: [PATCH] =?UTF-8?q?patch=208.2.3564:=20invalid=20memory=20access?=
+ =?UTF-8?q?=20when=20scrolling=20without=20valid=20sc=E2=80=A6?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+…reen
+
+Problem:    Invalid memory access when scrolling without a valid screen.
+Solution:   Do not set VALID_BOTLINE in w_valid.
+
+CVE: CVE-2021-3903
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/777e7c21b7627be80961848ac560cb0a9978ff43]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ src/move.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/move.c b/src/move.c
+index 8e53d8bcb..10165ef4d 100644
+--- a/src/move.c
++++ b/src/move.c
+@@ -198,7 +198,6 @@ update_topline(void)
+     {
+ 	curwin->w_topline = curwin->w_cursor.lnum;
+ 	curwin->w_botline = curwin->w_topline;
+-	curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
+ 	curwin->w_scbind_pos = 1;
+ 	return;
+     }
+-- 
+2.31.1
+
meta/recipes-support/vim/vim.inc +2 -0
index db4741ba4f..1841498b74 100644
@@ -20,6 +20,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
            file://CVE-2021-3778.patch \
            file://CVE-2021-3796.patch \
            file://b7081e135a16091c93f6f5f7525a5c58fb7ca9f9.patch \
+           file://CVE-2021-3903.patch \
+           file://CVE-2021-3872.patch \
 "
 
 SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44"
Signature · 1 line
2.33.1
#0 lore raw

cover Review request

Please review these changes for hardknott. No issues seen while testing on autobuilder.

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/2933

Thanks,

Anuj

The following changes since commit 2fd327ae5b3da8841ebed00bfc60b7bb8d6a64c5:

llvm: bump HASHEQUIV_HASH_VERSION (2021-11-16 11:20:31 +0800)

are available in the Git repository at:

git://push.openembedded.org/openembedded-core-contrib anujm/hardknott

Andrej Valek (1):
mklibs-native: drop deprecated cpp17 exceptions

Bruce Ashfield (2):
linux-yocto/5.10: update to v5.10.77
linux-yocto/5.10: update to v5.10.78

Changqing Li (1):
rpm: fix CVE-2021-3521

Jon Mason (1):
scripts/lib/wic/help.py: Update Fedora Kickstart URLs

Kai Kang (2):
convert-srcuri.py: use regex to check space in SRC_URI
squashfs-tools: fix CVE-2021-41072

Mingli Yu (4):
vim: fix CVE-2021-3872 and CVE-2021-3903
vim: fix CVE-2021-3875
bind: fix CVE-2021-25219
vim: fix CVE-2021-3927 and CVE-2021-3928

Pgowda (1):
gcc: Fix CVE-2021-35465

Richard Purdie (3):
mirrors: Add uninative mirror on kernel.org scripts/oe-package-browser: Handle no packages being built
mirrors: Add kernel.org sources mirror for downloads.yoctoproject.org

Yi Zhao (1):
inetutils: fix CVE-2021-40491

 meta/classes/mirrors.bbclass                  |   2 +
 .../bind/bind-9.16.16/CVE-2021-25219-1.patch  |  76 +++
 .../bind/bind-9.16.16/CVE-2021-25219-2.patch  |  65 +++
 .../recipes-connectivity/bind/bind_9.16.16.bb |   2 +
 .../inetutils/inetutils/CVE-2021-40491.patch  |  67 +++
 .../inetutils/inetutils_2.0.bb                |   1 +
 meta/recipes-devtools/gcc/gcc-10.2.inc        |   4 +
 .../gcc/gcc/0001-CVE-2021-35465.patch         | 138 ++++++
 .../gcc/gcc/0002-CVE-2021-35465.patch         |  40 ++
 .../gcc/gcc/0003-CVE-2021-35465.patch         | 103 +++++
 .../gcc/gcc/0004-CVE-2021-35465.patch         | 304 ++++++++++++
 ...ecated-exception-specification-cpp17.patch | 431 ++++++++++++++++++
 .../mklibs/mklibs-native_0.1.44.bb            |   1 +
 .../rpm/files/0001-CVE-2021-3521.patch        |  57 +++
 .../rpm/files/0002-CVE-2021-3521.patch        |  62 +++
 .../rpm/files/0003-CVE-2021-3521.patch        | 332 ++++++++++++++
 meta/recipes-devtools/rpm/rpm_4.16.1.3.bb     |   3 +
 .../files/CVE-2021-41072-requisite-1.patch    | 135 ++++++
 .../files/CVE-2021-41072-requisite-2.patch    | 109 +++++
 .../files/CVE-2021-41072-requisite-3.patch    | 330 ++++++++++++++
 .../squashfs-tools/files/CVE-2021-41072.patch | 316 +++++++++++++
 .../squashfs-tools/squashfs-tools_git.bb      |   4 +
 .../linux/linux-yocto-rt_5.10.bb              |   6 +-
 .../linux/linux-yocto-tiny_5.10.bb            |   8 +-
 meta/recipes-kernel/linux/linux-yocto_5.10.bb |  24 +-
 .../vim/files/CVE-2021-3872.patch             |  57 +++
 .../vim/files/CVE-2021-3875.patch             |  37 ++
 .../vim/files/CVE-2021-3903.patch             |  38 ++
 .../vim/files/CVE-2021-3927.patch             |  32 ++
 .../vim/files/CVE-2021-3928.patch             |  34 ++
 meta/recipes-support/vim/vim.inc              |   5 +
 scripts/contrib/convert-srcuri.py             |   8 +-
 scripts/lib/wic/help.py                       |   4 +-
 scripts/oe-pkgdata-browser                    |   2 +
 34 files changed, 2812 insertions(+), 25 deletions(-)
 create mode 100644 meta/recipes-connectivity/bind/bind-9.16.16/CVE-2021-25219-1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind-9.16.16/CVE-2021-25219-2.patch
 create mode 100644 meta/recipes-connectivity/inetutils/inetutils/CVE-2021-40491.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc/0001-CVE-2021-35465.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc/0002-CVE-2021-35465.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc/0003-CVE-2021-35465.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc/0004-CVE-2021-35465.patch
 create mode 100644 meta/recipes-devtools/mklibs/files/remove-deprecated-exception-specification-cpp17.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch
 create mode 100644 meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-1.patch
 create mode 100644 meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-2.patch
 create mode 100644 meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-3.patch
 create mode 100644 meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072.patch
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3872.patch
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3875.patch
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3903.patch
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3927.patch
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3928.patch
Signature · 1 line
2.33.1
#1 lore raw

PATCH 1/16 mirrors: Add uninative mirror on kernel.org

From: Richard Purdie <[email protected]>

At the last nas outage, we realised that we don't have good mirrors of the uninative tarball if our main system can't be accessed. kernel.org mirrors some Yocto Project data so we've ensured uninative is there. Add the appropriate mirror url to make use of that.

(cherry picked from commit 1833cb0c5841afafb468b963b74b63366b09a134)
---
 meta/classes/mirrors.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/mirrors.bbclass +1 -0
index 87bba41472..9d0ae1dce4 100644
@@ -62,6 +62,7 @@ ftp://.*/.*     http://sources.openembedded.org/ \n \
 npm://.*/?.*    http://sources.openembedded.org/ \n \
 ${CPAN_MIRROR}  http://cpan.metacpan.org/ \n \
 ${CPAN_MIRROR}  http://search.cpan.org/CPAN/ \n \
+https?$://downloads.yoctoproject.org/releases/uninative/ https://mirrors.kernel.org/yocto/uninative/ \n \
 "
 
 # Use MIRRORS to provide git repo fallbacks using the https protocol, for cases
Signature · 1 line
2.33.1
#2 lore raw

PATCH 2/16 linux-yocto/5.10: update to v5.10.77

In reply to Anuj Mittal

From: Bruce Ashfield <[email protected]>

Updating linux-yocto/5.10 to the latest korg -stable release that comprises the following commits:

09df347cfd18 Linux 5.10.77
fbb91dadb512 perf script: Check session->header.env.arch before using it
6f416815c505 riscv: Fix asan-stack clang build
7a4cf25d8329 riscv: fix misalgned trap vector base address
acb8832f6a1c scsi: ufs: ufs-exynos: Correct timeout value setting registers
8ecddaca7942 KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu
e11a7355fb98 KVM: s390: clear kicked_mask before sleeping again
727e5deca802 lan743x: fix endianness when accessing descriptors
a7112b8eeb14 sctp: add vtag check in sctp_sf_ootb
c2442f721972 sctp: add vtag check in sctp_sf_do_8_5_1_E_sa
14c1e02b11c2 sctp: add vtag check in sctp_sf_violation
dad2486414b5 sctp: fix the processing for COOKIE_ECHO chunk
8c50693d25e4 sctp: fix the processing for INIT_ACK chunk
ad111d4435d8 sctp: use init_tag from inithdr for ABORT chunk
4509000a2515 phy: phy_ethtool_ksettings_set: Lock the PHY while changing settings 5b88bb9377ee phy: phy_start_aneg: Add an unlocked version
81780b624d1c phy: phy_ethtool_ksettings_set: Move after phy_start_aneg
258c5fea44cf phy: phy_ethtool_ksettings_get: Lock the phy for consistency
58722323d4bc net/tls: Fix flipped sign in async_wait.err assignment
44e8c93e1e49 net: nxp: lpc_eth.c: avoid hang when bringing interface down
c2af2092c9bb net: ethernet: microchip: lan743x: Fix dma allocation failure by using dma_set_mask_and_coherent bfa6fbdb4e39 net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails e81bed557fe7 mlxsw: pci: Recycle received packet upon allocation failure
be98be1a17e9 nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST
aead02927af3 gpio: xgs-iproc: fix parsing of ngpios property
863a423ee07b RDMA/sa_query: Use strscpy_pad instead of memcpy to copy a string
2b7c5eed19d3 net: Prevent infinite while loop in skb_tx_hash()
04121b10cdf0 cfg80211: correct bridge/4addr mode check
aed897e96b19 net-sysfs: initialize uid and gid before calling net_ns_get_ownership b0a2cd38553c net: batman-adv: fix error handling
36e911a16b37 regmap: Fix possible double-free in regcache_rbtree_exit()
e51371bd687e reset: brcmstb-rescal: fix incorrect polarity of status bit
2cf7d935d6ba arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node
10e40fb2f508 RDMA/mlx5: Set user priority for DCT
24fd8e2f027d octeontx2-af: Display all enabled PF VF rsrc_alloc entries.
c63d7f2ca99a nvme-tcp: fix possible req->offset corruption
32f3db20f126 nvme-tcp: fix data digest pointer calculation
4286c72c5321 nvmet-tcp: fix data digest pointer calculation
d98883f6c33e IB/hfi1: Fix abba locking issue with sc_disable()
c3e17e58f571 IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields ee4908f909b3 bpf: Fix error usage of map_fd and fdget() in generic_map_update_batch() dd2260ec643d bpf: Fix potential race in tail call compatibility check
15dec6d8f864 tcp_bpf: Fix one concurrency problem in the tcp_bpf_send_verdict function cac6b043cea3 riscv, bpf: Fix potential NULL dereference
01599bf7cc2b cgroup: Fix memory leak caused by missing cgroup_bpf_offline
eb3b6805e3e9 drm/amdgpu: fix out of bounds write
c21b4002214c drm/ttm: fix memleak in ttm_transfered_destroy
69a7fa5cb0de mm, thp: bail out early in collapse_file for writeback page
8fb858b74ac5 net: lan78xx: fix division by zero in send path
4c22227e39c7 cfg80211: fix management registrations locking
fa29cec42c2d cfg80211: scan: fix RCU in cfg80211_add_nontrans_list()
db1191a529e4 nvme-tcp: fix H2CData PDU send accounting (again)
5043fbd294f5 ocfs2: fix race between searching chunks and release journal_head from buffer_head 01169a43353d mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit ee3213b117ce mmc: sdhci: Map more voltage level to SDHCI_POWER_330
a95a76fc01a0 mmc: dw_mmc: exynos: fix the finding clock sample value
12a46f72f499 mmc: mediatek: Move cqhci init behind ungate clock
44c2bc2a6bbe mmc: cqhci: clear HALT state after CQE enable
efe934629fff mmc: vub300: fix control-message timeouts
f3dec7e7ace3 net/tls: Fix flipped sign in tls_err_abort() calls
c828115a14ea Revert "net: mdiobus: Fix memory leak in __mdiobus_register"
11c0406b4c33 nfc: port100: fix using -ERRNO as command type mask
0b1b3e086b0a tipc: fix size validations for the MSG_CRYPTO type
5aa5bab57957 ata: sata_mv: Fix the error handling of mv_chip_id()
9a52798dce73 pinctrl: amd: disable and mask interrupts on probe
01c2881bb0e0 Revert "pinctrl: bcm: ns: support updated DT binding as syscon subnode" 017718dfbb6f usbnet: fix error return code in usbnet_probe()
693ecbe8f799 usbnet: sanity check for maxpacket
b663890d8544 ext4: fix possible UAF when remounting r/o a mmp-protected file system d4d9c065988c arm64: Avoid premature usercopy failure
e184a21b5ccc powerpc/bpf: Fix BPF_MOD when imm == 1
3f2c12ec8a3f io_uring: don't take uring_lock during iowq cancel
5a768b4d3e1a ARM: 9141/1: only warn about XIP address when not compile testing
15b278f94bbb ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype
c06d7d9bfcf6 ARM: 9138/1: fix link warning with XIP + frame-pointer
8a6af97c31be ARM: 9134/1: remove duplicate memcpy() definition
6ad8bbc9d301 ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned
3ceaa85c331d ARM: 9132/1: Fix __get_user_check failure with ARM KASAN images

(cherry picked from commit d57bc7281015d09e2ff7a8a028dbf31559ff7331)
---
 .../linux/linux-yocto-rt_5.10.bb              |  6 ++---
 .../linux/linux-yocto-tiny_5.10.bb            |  8 +++----
 meta/recipes-kernel/linux/linux-yocto_5.10.bb | 24 +++++++++----------
 3 files changed, 19 insertions(+), 19 deletions(-)
meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb +3 -3
index 6975bd16ae..3ebb5e979f 100644
@@ -11,13 +11,13 @@ python () {
         raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "f01089784fd6234111851aad756297e0f258276c"
-SRCREV_meta ?= "e1979ceb171bc91ef2cb71cfcde548a101dab687"
+SRCREV_machine ?= "3a416eeb4d0bdbba2a133744a465f2c9a46e3a96"
+SRCREV_meta ?= "257ed971bc7fd76ccb27f622df1ef6412f6b340d"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
 
-LINUX_VERSION ?= "5.10.76"
+LINUX_VERSION ?= "5.10.77"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb +4 -4
index 89c4329fc7..169185f685 100644
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
 
 require recipes-kernel/linux/linux-yocto.inc
 
-LINUX_VERSION ?= "5.10.76"
+LINUX_VERSION ?= "5.10.77"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine_qemuarm ?= "4575e0b8282d99c79dac96a77c03685d66fb0a08"
-SRCREV_machine ?= "da50565d028a2d87eabc7a53ee73a53f82f10f39"
-SRCREV_meta ?= "e1979ceb171bc91ef2cb71cfcde548a101dab687"
+SRCREV_machine_qemuarm ?= "c5c9d2c5c8ce7a84f6aebf02b3ae824a4c5f9d56"
+SRCREV_machine ?= "c3e3199c6359736c373aaecc8f447eaec7cf9432"
+SRCREV_meta ?= "257ed971bc7fd76ccb27f622df1ef6412f6b340d"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
meta/recipes-kernel/linux/linux-yocto_5.10.bb +12 -12
index 2c33a04df1..f994cfc2d4 100644
@@ -13,17 +13,17 @@ KBRANCH_qemux86  ?= "v5.10/standard/base"
 KBRANCH_qemux86-64 ?= "v5.10/standard/base"
 KBRANCH_qemumips64 ?= "v5.10/standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "da5f8508e569eb5d64a2efe5a5c4aa138c8f2738"
-SRCREV_machine_qemuarm64 ?= "a473fe3ad480df6565134d42a95826e71ae77a1a"
-SRCREV_machine_qemumips ?= "317762b8a9da49cd12eb51e879b6eba2b7c3a4a4"
-SRCREV_machine_qemuppc ?= "8a3eb888460464e612b79ab983c99cf868f82780"
-SRCREV_machine_qemuriscv64 ?= "be6faea8fdece878f8cebfda0969df78df07fbf8"
-SRCREV_machine_qemuriscv32 ?= "be6faea8fdece878f8cebfda0969df78df07fbf8"
-SRCREV_machine_qemux86 ?= "be6faea8fdece878f8cebfda0969df78df07fbf8"
-SRCREV_machine_qemux86-64 ?= "be6faea8fdece878f8cebfda0969df78df07fbf8"
-SRCREV_machine_qemumips64 ?= "efe59773d3289e7b34d99684547968849a2e6aa9"
-SRCREV_machine ?= "be6faea8fdece878f8cebfda0969df78df07fbf8"
-SRCREV_meta ?= "e1979ceb171bc91ef2cb71cfcde548a101dab687"
+SRCREV_machine_qemuarm ?= "51e48df3dbbc2b03579e95b296bf7b2625cf456b"
+SRCREV_machine_qemuarm64 ?= "c437750233de239844757e4c79bfd9e9c56e1b0d"
+SRCREV_machine_qemumips ?= "f2acb9e5f819ce240b530851f9e8ed45a8f7d878"
+SRCREV_machine_qemuppc ?= "b36a906729ef754c48d730f15a7f079eb4942356"
+SRCREV_machine_qemuriscv64 ?= "789500dfe326ab238562529175d99d33a3db1d0c"
+SRCREV_machine_qemuriscv32 ?= "789500dfe326ab238562529175d99d33a3db1d0c"
+SRCREV_machine_qemux86 ?= "789500dfe326ab238562529175d99d33a3db1d0c"
+SRCREV_machine_qemux86-64 ?= "789500dfe326ab238562529175d99d33a3db1d0c"
+SRCREV_machine_qemumips64 ?= "1b436658828965d7f96ff5e532ff0bb6b1099cff"
+SRCREV_machine ?= "789500dfe326ab238562529175d99d33a3db1d0c"
+SRCREV_meta ?= "257ed971bc7fd76ccb27f622df1ef6412f6b340d"
 
 # remap qemuarm to qemuarma15 for the 5.8 kernel
 # KMACHINE_qemuarm ?= "qemuarma15"
@@ -32,7 +32,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-LINUX_VERSION ?= "5.10.76"
+LINUX_VERSION ?= "5.10.77"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
 DEPENDS += "openssl-native util-linux-native"
Signature · 1 line
2.33.1
#3 lore raw

PATCH 3/16 linux-yocto/5.10: update to v5.10.78

In reply to Anuj Mittal

From: Bruce Ashfield <[email protected]>

Updating linux-yocto/5.10 to the latest korg -stable release that comprises the following commits:

5040520482a5 Linux 5.10.78
4c7c0243275b ALSA: usb-audio: Add Audient iD14 to mixer map quirk table f3eb44f496ef ALSA: usb-audio: Add Schiit Hel device to mixer map quirk table 68765fc97762 Revert "wcn36xx: Disable bmps when encryption is disabled" f84b791d4c3b ARM: 9120/1: Revert "amba: make use of -1 IRQs warn" bbc920fb320f Revert "drm/ttm: fix memleak in ttm_transfered_destroy" 6d67b2a73b8e mm: khugepaged: skip huge page collapse for special files 5a7957491e31 Revert "usb: core: hcd: Add support for deferring roothub registration" 50f46bd30949 Revert "xhci: Set HCD flag to defer primary roothub registration" d7fc85f61042 media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() b93a70bf2b57 net: ethernet: microchip: lan743x: Fix skb allocation failure b9c85a71e1b4 vrf: Revert "Reset skb conntrack connection..." 0382fdf9ae78 sfc: Fix reading non-legacy supported link modes 748786564a35 Revert "io_uring: reinforce cancel on flush during exit" 7b57c38d12ae scsi: core: Put LLD module refcnt after SCSI device is released

(cherry picked from commit 7a7d1eed8e3d550ac9bfa301b26095100eeba111)
---
 .../linux/linux-yocto-rt_5.10.bb              |  6 ++---
 .../linux/linux-yocto-tiny_5.10.bb            |  8 +++----
 meta/recipes-kernel/linux/linux-yocto_5.10.bb | 24 +++++++++----------
 3 files changed, 19 insertions(+), 19 deletions(-)
meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb +3 -3
index 3ebb5e979f..93ebccff3d 100644
@@ -11,13 +11,13 @@ python () {
         raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "3a416eeb4d0bdbba2a133744a465f2c9a46e3a96"
-SRCREV_meta ?= "257ed971bc7fd76ccb27f622df1ef6412f6b340d"
+SRCREV_machine ?= "12f6a7187b3c8abab5e139dbfdf7f58f265f4169"
+SRCREV_meta ?= "a0238f7f4f2222d08bb18147bb5e24cc877b0546"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
 
-LINUX_VERSION ?= "5.10.77"
+LINUX_VERSION ?= "5.10.78"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb +4 -4
index 169185f685..d3402f3a25 100644
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
 
 require recipes-kernel/linux/linux-yocto.inc
 
-LINUX_VERSION ?= "5.10.77"
+LINUX_VERSION ?= "5.10.78"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine_qemuarm ?= "c5c9d2c5c8ce7a84f6aebf02b3ae824a4c5f9d56"
-SRCREV_machine ?= "c3e3199c6359736c373aaecc8f447eaec7cf9432"
-SRCREV_meta ?= "257ed971bc7fd76ccb27f622df1ef6412f6b340d"
+SRCREV_machine_qemuarm ?= "cdec5045c5323846adaf2510e539843d0cfe74ae"
+SRCREV_machine ?= "344c0c38f5b892312b0a1db7f613d2704dd4942f"
+SRCREV_meta ?= "a0238f7f4f2222d08bb18147bb5e24cc877b0546"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
meta/recipes-kernel/linux/linux-yocto_5.10.bb +12 -12
index f994cfc2d4..2652d01c26 100644
@@ -13,17 +13,17 @@ KBRANCH_qemux86  ?= "v5.10/standard/base"
 KBRANCH_qemux86-64 ?= "v5.10/standard/base"
 KBRANCH_qemumips64 ?= "v5.10/standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "51e48df3dbbc2b03579e95b296bf7b2625cf456b"
-SRCREV_machine_qemuarm64 ?= "c437750233de239844757e4c79bfd9e9c56e1b0d"
-SRCREV_machine_qemumips ?= "f2acb9e5f819ce240b530851f9e8ed45a8f7d878"
-SRCREV_machine_qemuppc ?= "b36a906729ef754c48d730f15a7f079eb4942356"
-SRCREV_machine_qemuriscv64 ?= "789500dfe326ab238562529175d99d33a3db1d0c"
-SRCREV_machine_qemuriscv32 ?= "789500dfe326ab238562529175d99d33a3db1d0c"
-SRCREV_machine_qemux86 ?= "789500dfe326ab238562529175d99d33a3db1d0c"
-SRCREV_machine_qemux86-64 ?= "789500dfe326ab238562529175d99d33a3db1d0c"
-SRCREV_machine_qemumips64 ?= "1b436658828965d7f96ff5e532ff0bb6b1099cff"
-SRCREV_machine ?= "789500dfe326ab238562529175d99d33a3db1d0c"
-SRCREV_meta ?= "257ed971bc7fd76ccb27f622df1ef6412f6b340d"
+SRCREV_machine_qemuarm ?= "f98b917d7826304daeecf11cc52be2562a9304ff"
+SRCREV_machine_qemuarm64 ?= "13ff8a3ae368724e008e3bcd77833611de7962b2"
+SRCREV_machine_qemumips ?= "7b94dec2b0f5b582b97cdb3ac97fe153559869e4"
+SRCREV_machine_qemuppc ?= "652531fb0cc8eb3607109bb8d878253be2d3d534"
+SRCREV_machine_qemuriscv64 ?= "2daa192783edd4974da8e900c0dc93186e57a838"
+SRCREV_machine_qemuriscv32 ?= "2daa192783edd4974da8e900c0dc93186e57a838"
+SRCREV_machine_qemux86 ?= "2daa192783edd4974da8e900c0dc93186e57a838"
+SRCREV_machine_qemux86-64 ?= "2daa192783edd4974da8e900c0dc93186e57a838"
+SRCREV_machine_qemumips64 ?= "4c817df0fd06350e18693551699c33361e16a193"
+SRCREV_machine ?= "2daa192783edd4974da8e900c0dc93186e57a838"
+SRCREV_meta ?= "a0238f7f4f2222d08bb18147bb5e24cc877b0546"
 
 # remap qemuarm to qemuarma15 for the 5.8 kernel
 # KMACHINE_qemuarm ?= "qemuarma15"
@@ -32,7 +32,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-LINUX_VERSION ?= "5.10.77"
+LINUX_VERSION ?= "5.10.78"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
 DEPENDS += "openssl-native util-linux-native"
Signature · 1 line
2.33.1
#4 lore raw

PATCH 4/16 convert-srcuri.py: use regex to check space in SRC_URI

In reply to Anuj Mittal

From: Kai Kang <[email protected]>

There may be none, one or more spaces including tab before backslash in SRC_URI. Use regex to check and update. It helps to avoid malformed uri such as recipe open-iscsi-user in meta-openstack:

SRC_URI = "git://github.com/open-iscsi/open-iscsi.git;protocol=https ;branch=master \

And help to check more recipes such as concurrent-ruby in the same layer:

SRC_URI = "git://github.com/ruby-concurrency/concurrent-ruby.git;protocol=https;tag=v1.1.6\

(cherry picked from commit a69a53573b1987ee5834a6fc27763f9bbf5fe5a4)
---
 scripts/contrib/convert-srcuri.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/contrib/convert-srcuri.py +4 -4
index 5b362ea2e8..587392334f 100755
@@ -35,16 +35,16 @@ def processfile(fn):
                     if ("git://" in line or "gitsm://" in line) and "branch=" not in line and matchline(line):
                         if line.endswith('"\n'):
                             line = line.replace('"\n', ';branch=master"\n')
-                        elif line.endswith(" \\\n"):
-                            line = line.replace(' \\\n', ';branch=master \\\n')
+                        elif re.search('\s*\\\\$', line):
+                            line = re.sub('\s*\\\\$', ';branch=master \\\\', line)
                         modified = True
                     if ("git://" in line or "gitsm://" in line) and "github.com" in line and "protocol=https" not in line and matchline(line):
                         if "protocol=git" in line:
                             line = line.replace('protocol=git', 'protocol=https')
                         elif line.endswith('"\n'):
                             line = line.replace('"\n', ';protocol=https"\n')
-                        elif line.endswith(" \\\n"):
-                            line = line.replace(' \\\n', ';protocol=https \\\n')
+                        elif re.search('\s*\\\\$', line):
+                            line = re.sub('\s*\\\\$', ';protocol=https \\\\', line)
                         modified = True
                     new_file.write(line)
         if modified:
Signature · 1 line
2.33.1
#5 lore raw

PATCH 5/16 scripts/oe-package-browser: Handle no packages being built

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

Give the user a proper error message if there aren't packages built, rather than a less friendly traceback.

[YOCTO #14619]

(cherry picked from commit b14c176b7dd74b7d63ca0f72e6e00fbf209f5a0b)
---
 scripts/oe-pkgdata-browser | 2 ++
 1 file changed, 2 insertions(+)
scripts/oe-pkgdata-browser +2 -0
index 8d223185a4..65a6ee956e 100755
@@ -236,6 +236,8 @@ class PkgUi():
         update_deps("RPROVIDES", "Provides: ", self.provides_label, clickable=False)
 
     def load_recipes(self):
+        if not os.path.exists(pkgdata):
+            sys.exit("Error: Please ensure %s exists by generating packages before using this tool." % pkgdata)
         for recipe in sorted(os.listdir(pkgdata)):
             if os.path.isfile(os.path.join(pkgdata, recipe)):
                 self.recipe_iters[recipe] = self.recipe_store.append([recipe])
Signature · 1 line
2.33.1
#6 lore raw

PATCH 6/16 scripts/lib/wic/help.py: Update Fedora Kickstart URLs

In reply to Anuj Mittal

From: Jon Mason <[email protected]>

The URLs describing Kickstart are no longer valid and do not redirect to the correct location. Update them with the correct location.

(cherry picked from commit e5ac75f93c8128b0761af5fee99e8603ddd1657d)
---
 scripts/lib/wic/help.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/lib/wic/help.py +2 -2
index bd3a2b97df..9c2d6991a9 100644
@@ -840,8 +840,8 @@ DESCRIPTION
     meanings. The commands are based on the Fedora kickstart
     documentation but with modifications to reflect wic capabilities.
 
-      http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition
-      http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader
+      https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#part-or-partition
+      https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#bootloader
 
   Commands
 
Signature · 1 line
2.33.1
#7 lore raw

PATCH 7/16 mirrors: Add kernel.org sources mirror for downloads.yoctoproject.org

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

kernel.org now has a mirror of the downloads.yoctoproject.org sources archive so include this in our mirrors list.

(cherry picked from commit f602b6c2046bbc52a95dcc68a754f1cbb2db6761)
---
 meta/classes/mirrors.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/mirrors.bbclass +1 -0
index 9d0ae1dce4..8a2c153d9b 100644
@@ -63,6 +63,7 @@ npm://.*/?.*    http://sources.openembedded.org/ \n \
 ${CPAN_MIRROR}  http://cpan.metacpan.org/ \n \
 ${CPAN_MIRROR}  http://search.cpan.org/CPAN/ \n \
 https?$://downloads.yoctoproject.org/releases/uninative/ https://mirrors.kernel.org/yocto/uninative/ \n \
+https?://downloads.yoctoproject.org/mirror/sources/ https://mirrors.kernel.org/yocto-sources/ \
 "
 
 # Use MIRRORS to provide git repo fallbacks using the https protocol, for cases
Signature · 1 line
2.33.1
#8 lore raw

PATCH 8/16 inetutils: fix CVE-2021-40491

In reply to Anuj Mittal

From: Yi Zhao <[email protected]>

CVE-2021-40491:
The ftp client in GNU Inetutils before 2.2 does not validate addresses returned by PASV/LSPV responses to make sure they match the server address. This is similar to CVE-2020-8284 for curl.

References:
https://nvd.nist.gov/vuln/detail/CVE-2021-40491

Patch from:
https://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=58cb043b190fd04effdaea7c9403416b436e50dd

(From OE-Core rev: 1b857807f1cf8fee3175f8479a0c7cb1850bd9a9)

drop changes to NEWS

---
 .../inetutils/inetutils/CVE-2021-40491.patch  | 67 +++++++++++++++++++
 .../inetutils/inetutils_2.0.bb                |  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-connectivity/inetutils/inetutils/CVE-2021-40491.patch
meta/recipes-connectivity/inetutils/inetutils/CVE-2021-40491.patch new file +67 -0
new file mode 100644
index 0000000000..f05c696929
@@ -0,0 +1,67 @@
+From 98ccabf68e5b3f0a177bd1925581753d10041448 Mon Sep 17 00:00:00 2001
+From: Simon Josefsson <[email protected]>
+Date: Wed, 1 Sep 2021 09:09:50 +0200
+Subject: [PATCH] ftp: check that PASV/LSPV addresses match.
+
+* NEWS: Mention change.
+* ftp/ftp.c (initconn): Validate returned addresses.
+
+CVE: CVE-2021-40491
+
+Upstream-Status: Backport
+[https://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=58cb043b190fd04effdaea7c9403416b436e50dd]
+
+Signed-off-by: Yi Zhao <[email protected]>
+---
+ ftp/ftp.c | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+)
+
+diff --git a/ftp/ftp.c b/ftp/ftp.c
+index d21dbdd..7513539 100644
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
+@@ -1365,6 +1365,13 @@ initconn (void)
+ 		  uint32_t *pu32 = (uint32_t *) &data_addr_sa4->sin_addr.s_addr;
+ 		  pu32[0] = htonl ( (h[0] << 24) | (h[1] << 16) | (h[2] << 8) | h[3]);
+ 		}
++		if (data_addr_sa4->sin_addr.s_addr
++		    != ((struct sockaddr_in *) &hisctladdr)->sin_addr.s_addr)
++		  {
++		    printf ("Passive mode address mismatch.\n");
++		    (void) command ("ABOR");	/* Cancel any open connection.  */
++		    goto bad;
++		  }
+ 	    } /* LPSV IPv4 */
+ 	  else /* IPv6 */
+ 	    {
+@@ -1395,6 +1402,13 @@ initconn (void)
+ 		  pu32[2] = htonl ( (h[8] << 24) | (h[9] << 16) | (h[10] << 8) | h[11]);
+ 		  pu32[3] = htonl ( (h[12] << 24) | (h[13] << 16) | (h[14] << 8) | h[15]);
+ 		}
++		if (data_addr_sa6->sin6_addr.s6_addr
++		    != ((struct sockaddr_in6 *) &hisctladdr)->sin6_addr.s6_addr)
++		  {
++		    printf ("Passive mode address mismatch.\n");
++		    (void) command ("ABOR");	/* Cancel any open connection.  */
++		    goto bad;
++		  }
+ 	    } /* LPSV IPv6 */
+ 	}
+       else /* !EPSV && !LPSV */
+@@ -1415,6 +1429,13 @@ initconn (void)
+ 			 | ((a2 & 0xff) << 8) | (a3 & 0xff) );
+ 	      data_addr_sa4->sin_port =
+ 		  htons (((p0 & 0xff) << 8) | (p1 & 0xff));
++	      if (data_addr_sa4->sin_addr.s_addr
++		  != ((struct sockaddr_in *) &hisctladdr)->sin_addr.s_addr)
++		{
++		  printf ("Passive mode address mismatch.\n");
++		  (void) command ("ABOR");	/* Cancel any open connection.  */
++		  goto bad;
++		}
+ 	    } /* PASV */
+ 	  else
+ 	    {
+-- 
+2.17.1
+
meta/recipes-connectivity/inetutils/inetutils_2.0.bb +1 -0
index a4d05b0542..d299bc359e 100644
@@ -20,6 +20,7 @@ SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \
            file://tftpd.xinetd.inetutils \
            file://inetutils-1.9-PATH_PROCNET_DEV.patch \
            file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \
+           file://CVE-2021-40491.patch \
 "
 
 SRC_URI[md5sum] = "5e1018502cd131ed8e42339f6b5c98aa"
Signature · 1 line
2.33.1
#9 lore raw

PATCH 9/16 mklibs-native: drop deprecated cpp17 exceptions

In reply to Anuj Mittal

From: Andrej Valek <[email protected]>

gcc11 has -std=gnu++17 as default. Remove deprecated C++17 exceptions based on http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html.

(cherry picked from commit ef8b7946b4793db653ef7dd716e1d3f919a84725)
---
 ...ecated-exception-specification-cpp17.patch | 431 ++++++++++++++++++
 .../mklibs/mklibs-native_0.1.44.bb            |   1 +
 2 files changed, 432 insertions(+)
 create mode 100644 meta/recipes-devtools/mklibs/files/remove-deprecated-exception-specification-cpp17.patch
meta/recipes-devtools/mklibs/files/remove-deprecated-exception-specification-cpp17.patch new file +431 -0
new file mode 100644
index 0000000000..f96cc7d302
@@ -0,0 +1,431 @@
+From 597c7a8333df84a87cc48fb8477b603ffbf372a6 Mon Sep 17 00:00:00 2001
+From: Andrej Valek <[email protected]>
+Date: Mon, 23 Aug 2021 12:45:11 +0200
+Subject: [PATCH] feat(cpp17): remove deprecated exception specifications for
+ C++ 17
+
+Upstream-Status: Submitted [https://salsa.debian.org/installer-team/mklibs/-/merge_requests/2]
+
+based on: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
+
+Signed-off-by: Andrej Valek <[email protected]>
+---
+ src/mklibs-readelf/elf.cpp      | 48 ++++++++++++++++++++---------------------
+ src/mklibs-readelf/elf.hpp      | 18 ++++++++--------
+ src/mklibs-readelf/elf_data.hpp | 36 +++++++++++++++----------------
+ 3 files changed, 51 insertions(+), 51 deletions(-)
+
+diff --git a/src/mklibs-readelf/elf.cpp b/src/mklibs-readelf/elf.cpp
+index 0e4c0f3..2e6d0f6 100644
+--- a/src/mklibs-readelf/elf.cpp
++++ b/src/mklibs-readelf/elf.cpp
+@@ -36,7 +36,7 @@ file::~file () throw ()
+     delete *it;
+ }
+ 
+-file *file::open (const char *filename) throw (std::bad_alloc, std::runtime_error)
++file *file::open (const char *filename) throw ()
+ {
+   struct stat buf;
+   int fd;
+@@ -72,7 +72,7 @@ file *file::open (const char *filename) throw (std::bad_alloc, std::runtime_erro
+ }
+ 
+ template<typename _class>
+-file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, std::runtime_error)
++file *file::open_class(uint8_t *mem, size_t len) throw ()
+ {
+   switch (mem[EI_DATA])
+   {
+@@ -86,7 +86,7 @@ file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, std::run
+ }
+ 
+ template <typename _class, typename _data>
+-file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw (std::bad_alloc, std::runtime_error)
++file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw ()
+ : file(mem, len)
+ {
+   if (mem[EI_CLASS] != _class::id)
+@@ -190,7 +190,7 @@ section_data<_class, _data>::section_data(Shdr *shdr, uint8_t *mem) throw ()
+ }
+ 
+ template <typename _class, typename _data>
+-void section_data<_class, _data>::update(const file &file) throw (std::bad_alloc)
++void section_data<_class, _data>::update(const file &file) throw ()
+ {
+   const section_type<section_type_STRTAB> &section =
+     dynamic_cast<const section_type<section_type_STRTAB> &>(file.get_section(file.get_shstrndx()));
+@@ -204,7 +204,7 @@ section_type<section_type_DYNAMIC>::~section_type() throw ()
+ }
+ 
+ template <typename _class, typename _data>
+-section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, uint8_t *mem) throw ()
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_DYNAMIC)
+@@ -221,7 +221,7 @@ section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, ui
+ }
+ 
+ template <typename _class, typename _data>
+-void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw ()
+ {
+   section_data<_class, _data>::update(file);
+ 
+@@ -243,7 +243,7 @@ section_type<section_type_DYNSYM>::~section_type() throw ()
+ }
+ 
+ template <typename _class, typename _data>
+-section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, uint8_t *mem) throw ()
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_DYNSYM)
+@@ -260,7 +260,7 @@ section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, uin
+ }
+ 
+ template <typename _class, typename _data>
+-void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw ()
+ {
+   section_data<_class, _data>::update (file);
+ 
+@@ -285,7 +285,7 @@ const version_definition *section_type<section_type_GNU_VERDEF>::get_version_def
+ }
+ 
+ template <typename _class, typename _data>
+-section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr *header, uint8_t *mem) throw ()
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_GNU_verdef)
+@@ -307,7 +307,7 @@ section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr *header,
+ }
+ 
+ template <typename _class, typename _data>
+-void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw ()
+ {
+   section_data<_class, _data>::update(file);
+ 
+@@ -333,7 +333,7 @@ const version_requirement_entry *section_type<section_type_GNU_VERNEED>::get_ver
+ 
+ template <typename _class, typename _data>
+ section_real<_class, _data, section_type_GNU_VERNEED>::
+-section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
++section_real(Shdr *header, uint8_t *mem) throw ()
+ : section_data<_class, _data> (header, mem)
+ {
+   if (this->type != SHT_GNU_verneed)
+@@ -355,7 +355,7 @@ section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
+ }
+ 
+ template <typename _class, typename _data>
+-void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw ()
+ {
+   section_data<_class, _data>::update(file);
+ 
+@@ -372,7 +372,7 @@ void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &f
+ 
+ template <typename _class, typename _data>
+ section_real<_class, _data, section_type_GNU_VERSYM>::
+-section_real (Shdr *header, uint8_t *mem) throw (std::bad_alloc)
++section_real (Shdr *header, uint8_t *mem) throw ()
+ : section_data<_class, _data> (header, mem)
+ {
+   if (this->type != SHT_GNU_versym)
+@@ -399,7 +399,7 @@ segment_data<_class, _data>::segment_data (Phdr *phdr, uint8_t *mem) throw ()
+ }
+ 
+ template <typename _class, typename _data>
+-segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw (std::bad_alloc)
++segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw ()
+ : segment_data<_class, _data> (header, mem)
+ {
+   if (this->type != PT_INTERP)
+@@ -429,13 +429,13 @@ dynamic_data<_class, _data>::dynamic_data (Dyn *dyn) throw ()
+ }
+ 
+ template <typename _class, typename _data>
+-void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
++void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw ()
+ {
+   if (is_string)
+     val_string = section.get_string(val);
+ }
+ 
+-std::string symbol::get_version () const throw (std::bad_alloc)
++std::string symbol::get_version () const throw ()
+ {
+   if (verneed)
+     return verneed->get_name();
+@@ -445,7 +445,7 @@ std::string symbol::get_version () const throw (std::bad_alloc)
+   return "Base";
+ }
+ 
+-std::string symbol::get_version_file () const throw (std::bad_alloc)
++std::string symbol::get_version_file () const throw ()
+ {
+   if (verneed)
+     return verneed->get_file();
+@@ -453,7 +453,7 @@ std::string symbol::get_version_file () const throw (std::bad_alloc)
+   return "None";
+ }
+ 
+-std::string symbol::get_name_version () const throw (std::bad_alloc)
++std::string symbol::get_name_version () const throw ()
+ {
+   std::string ver;
+ 
+@@ -478,13 +478,13 @@ symbol_data<_class, _data>::symbol_data (Sym *sym) throw ()
+ }
+ 
+ template <typename _class, typename _data>
+-void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
++void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw ()
+ {
+   name_string = section.get_string(name);
+ }
+ 
+ template <typename _class, typename _data>
+-void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw (std::bad_alloc)
++void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw ()
+ {
+   if (!file.get_section_GNU_VERSYM())
+     return;
+@@ -531,13 +531,13 @@ version_definition_data<_class, _data>::version_definition_data (Verdef *verdef)
+ }
+ 
+ template <typename _class, typename _data>
+-void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
++void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw ()
+ {
+   for (std::vector<uint32_t>::iterator it = names.begin(); it != names.end(); ++it)
+     names_string.push_back(section.get_string(*it));
+ }
+ 
+-version_requirement::version_requirement() throw (std::bad_alloc)
++version_requirement::version_requirement() throw ()
+ : file_string("None")
+ { }
+ 
+@@ -561,7 +561,7 @@ version_requirement_data<_class, _data>::version_requirement_data (Verneed *vern
+ 
+ template <typename _class, typename _data>
+ void version_requirement_data<_class, _data>::
+-update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
++update_string(const section_type<section_type_STRTAB> &section) throw ()
+ {
+   file_string = section.get_string(file);
+ 
+@@ -596,7 +596,7 @@ version_requirement_entry_data(Vernaux *vna, const version_requirement &verneed)
+ 
+ template <typename _class, typename _data>
+ void version_requirement_entry_data<_class, _data>::
+-update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
++update_string(const section_type<section_type_STRTAB> &section) throw ()
+ {
+   name_string = section.get_string(name);
+ }
+diff --git a/src/mklibs-readelf/elf.hpp b/src/mklibs-readelf/elf.hpp
+index 70e61cd..afb0c9e 100644
+--- a/src/mklibs-readelf/elf.hpp
++++ b/src/mklibs-readelf/elf.hpp
+@@ -49,7 +49,7 @@ namespace Elf
+       const uint16_t get_shstrndx() const throw () { return shstrndx; }
+ 
+       const std::vector<section *> get_sections() const throw () { return sections; };
+-      const section &get_section(unsigned int i) const throw (std::out_of_range) { return *sections.at(i); };
++      const section &get_section(unsigned int i) const throw () { return *sections.at(i); };
+       const section_type<section_type_DYNAMIC> *get_section_DYNAMIC() const throw () { return section_DYNAMIC; };
+       const section_type<section_type_DYNSYM> *get_section_DYNSYM() const throw () { return section_DYNSYM; };
+       const section_type<section_type_GNU_VERDEF> *get_section_GNU_VERDEF() const throw () { return section_GNU_VERDEF; };
+@@ -59,13 +59,13 @@ namespace Elf
+       const std::vector<segment *> get_segments() const throw () { return segments; };
+       const segment_type<segment_type_INTERP> *get_segment_INTERP() const throw () { return segment_INTERP; };
+ 
+-      static file *open(const char *filename) throw (std::bad_alloc, std::runtime_error);
++      static file *open(const char *filename) throw ();
+ 
+     protected:
+-      file(uint8_t *mem, size_t len) throw (std::bad_alloc) : mem(mem), len(len) { }
++      file(uint8_t *mem, size_t len) throw () : mem(mem), len(len) { }
+ 
+       template<typename _class>
+-        static file *open_class(uint8_t *, size_t) throw (std::bad_alloc, std::runtime_error);
++        static file *open_class(uint8_t *, size_t) throw ();
+ 
+       uint16_t type;
+       uint16_t machine;
+@@ -128,7 +128,7 @@ namespace Elf
+     class section_type<section_type_STRTAB> : public virtual section
+     {
+       public:
+-        std::string get_string(uint32_t offset) const throw (std::bad_alloc)
++        std::string get_string(uint32_t offset) const throw ()
+         {
+           return std::string(reinterpret_cast<const char *> (mem + offset));
+         }
+@@ -263,10 +263,10 @@ namespace Elf
+       uint8_t get_bind () const throw () { return bind; }
+       uint8_t get_type () const throw () { return type; }
+       const std::string &get_name_string() const throw () { return name_string; }
+-      std::string get_version() const throw (std::bad_alloc);
+-      std::string get_version_file() const throw (std::bad_alloc);
++      std::string get_version() const throw ();
++      std::string get_version_file() const throw ();
+       uint16_t get_version_data() const throw () { return versym; }
+-      std::string get_name_version() const throw (std::bad_alloc);
++      std::string get_name_version() const throw ();
+ 
+     protected:
+       uint32_t name;
+@@ -305,7 +305,7 @@ namespace Elf
+   class version_requirement
+   {
+     public:
+-      version_requirement() throw (std::bad_alloc);
++      version_requirement() throw ();
+       virtual ~version_requirement () throw () { }
+ 
+       const std::string &get_file() const throw () { return file_string; }
+diff --git a/src/mklibs-readelf/elf_data.hpp b/src/mklibs-readelf/elf_data.hpp
+index 05effee..3871982 100644
+--- a/src/mklibs-readelf/elf_data.hpp
++++ b/src/mklibs-readelf/elf_data.hpp
+@@ -94,7 +94,7 @@ namespace Elf
+     class file_data : public file
+     {
+       public:
+-        file_data(uint8_t *, size_t len) throw (std::bad_alloc, std::runtime_error);
++        file_data(uint8_t *, size_t len) throw ();
+ 
+         const uint8_t get_class() const throw () { return _class::id; }
+         const uint8_t get_data() const throw () { return _data::id; }
+@@ -109,7 +109,7 @@ namespace Elf
+       public:
+         section_data(Shdr *, uint8_t *) throw ();
+ 
+-        virtual void update(const file &) throw (std::bad_alloc);
++        virtual void update(const file &) throw ();
+     };
+ 
+   template <typename _class, typename _data, typename _type>
+@@ -133,9 +133,9 @@ namespace Elf
+         typedef typename _elfdef<_class>::Shdr Shdr;
+ 
+       public:
+-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
++        section_real(Shdr *, uint8_t *) throw ();
+ 
+-        void update(const file &) throw (std::bad_alloc);
++        void update(const file &) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -147,9 +147,9 @@ namespace Elf
+         typedef typename _elfdef<_class>::Shdr Shdr;
+ 
+       public:
+-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
++        section_real(Shdr *, uint8_t *) throw ();
+ 
+-        void update(const file &) throw (std::bad_alloc);
++        void update(const file &) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -161,9 +161,9 @@ namespace Elf
+         typedef typename _elfdef<_class>::Shdr Shdr;
+ 
+       public:
+-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
++        section_real(Shdr *, uint8_t *) throw ();
+ 
+-        void update(const file &) throw (std::bad_alloc);
++        void update(const file &) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -175,9 +175,9 @@ namespace Elf
+         typedef typename _elfdef<_class>::Shdr Shdr;
+ 
+       public:
+-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
++        section_real(Shdr *, uint8_t *) throw ();
+ 
+-        void update(const file &) throw (std::bad_alloc);
++        void update(const file &) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -189,7 +189,7 @@ namespace Elf
+         typedef typename _elfdef<_class>::Shdr Shdr;
+ 
+       public:
+-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
++        section_real(Shdr *, uint8_t *) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -220,7 +220,7 @@ namespace Elf
+         typedef typename _elfdef<_class>::Phdr Phdr;
+ 
+       public:
+-        segment_real (Phdr *, uint8_t *) throw (std::bad_alloc);
++        segment_real (Phdr *, uint8_t *) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -232,7 +232,7 @@ namespace Elf
+       public:
+         dynamic_data (Dyn *) throw ();
+ 
+-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
++        void update_string(const section_type<section_type_STRTAB> &) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -244,8 +244,8 @@ namespace Elf
+       public:
+         symbol_data (Sym *) throw ();
+ 
+-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
+-        virtual void update_version (const file &, uint16_t) throw (std::bad_alloc);
++        void update_string(const section_type<section_type_STRTAB> &) throw ();
++        virtual void update_version (const file &, uint16_t) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -257,7 +257,7 @@ namespace Elf
+ 
+         version_definition_data (Verdef *) throw ();
+ 
+-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
++        void update_string(const section_type<section_type_STRTAB> &) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -269,7 +269,7 @@ namespace Elf
+ 
+         version_requirement_data (Verneed *) throw ();
+ 
+-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
++        void update_string(const section_type<section_type_STRTAB> &) throw ();
+     };
+ 
+   template <typename _class, typename _data>
+@@ -280,7 +280,7 @@ namespace Elf
+ 
+         version_requirement_entry_data (Vernaux *, const version_requirement &) throw ();
+ 
+-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
++        void update_string(const section_type<section_type_STRTAB> &) throw ();
+     };
+ }
+ 
+-- 
+2.11.0
+
meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb +1 -0
index 1784af1f4c..07142e57e0 100644
@@ -12,6 +12,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/
 	file://avoid-failure-on-symbol-provided-by-application.patch \
 	file://show-GNU-unique-symbols-as-provided-symbols.patch \
 	file://fix_cross_compile.patch \
+	file://remove-deprecated-exception-specification-cpp17.patch \
 "
 
 SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc"
Signature · 1 line
2.33.1
#10 lore raw

PATCH 10/16 gcc: Fix CVE-2021-35465

In reply to Anuj Mittal

From: Pgowda <[email protected]>

source : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102035

Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=3929bca9ca95de9d35e82ae8828b188029e3eb70]
Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=574e7950bd6b34e9e2cacce18c802b45505d1d0a]
Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=30461cf8dba3d3adb15a125e4da48800eb2b9b8f]
Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=809330ab8450261e05919b472783bf15e4b000f7]

---
 meta/recipes-devtools/gcc/gcc-10.2.inc        |   4 +
 .../gcc/gcc/0001-CVE-2021-35465.patch         | 138 ++++++++
 .../gcc/gcc/0002-CVE-2021-35465.patch         |  40 +++
 .../gcc/gcc/0003-CVE-2021-35465.patch         | 103 ++++++
 .../gcc/gcc/0004-CVE-2021-35465.patch         | 304 ++++++++++++++++++
 5 files changed, 589 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc/0001-CVE-2021-35465.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc/0002-CVE-2021-35465.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc/0003-CVE-2021-35465.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc/0004-CVE-2021-35465.patch
meta/recipes-devtools/gcc/gcc-10.2.inc +4 -0
index c0cd8b31d5..248e002106 100644
@@ -70,6 +70,10 @@ SRC_URI = "\
            file://0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch \
            file://0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch \
            file://0001-libatomic-libgomp-libitc-Fix-bootstrap-PR70454.patch \
+           file://0001-CVE-2021-35465.patch \
+           file://0002-CVE-2021-35465.patch \
+           file://0003-CVE-2021-35465.patch \
+           file://0004-CVE-2021-35465.patch \
 "
 SRC_URI[sha256sum] = "b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c"
 
meta/recipes-devtools/gcc/gcc/0001-CVE-2021-35465.patch new file +138 -0

138 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc/0002-CVE-2021-35465.patch new file +40 -0
new file mode 100644
index 0000000000..38d02dc770
@@ -0,0 +1,40 @@
+From 574e7950bd6b34e9e2cacce18c802b45505d1d0a Mon Sep 17 00:00:00 2001
+From: Richard Earnshaw <[email protected]>
+Date: Fri, 18 Jun 2021 17:16:25 +0100
+Subject: [PATCH] arm: add erratum mitigation to __gnu_cmse_nonsecure_call
+ [PR102035]
+
+Add the recommended erratum mitigation sequence to
+__gnu_cmse_nonsecure_call for use on Armv8-m.main devices. Since this
+is in the library code we cannot know in advance whether the core we
+are running on will be affected by this, so always enable it.
+
+libgcc:
+	PR target/102035
+	* config/arm/cmse_nonsecure_call.S (__gnu_cmse_nonsecure_call):
+	Add vlldm erratum work-around.
+
+CVE: CVE-2021-35465
+Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=574e7950bd6b34e9e2cacce18c802b45505d1d0a]
+Signed-off-by: Pgowda <[email protected]>
+
+---
+ libgcc/config/arm/cmse_nonsecure_call.S | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libgcc/config/arm/cmse_nonsecure_call.S b/libgcc/config/arm/cmse_nonsecure_call.S
+index 00830ade98e..c8e0fbbe665 100644
+--- a/libgcc/config/arm/cmse_nonsecure_call.S
++++ b/libgcc/config/arm/cmse_nonsecure_call.S
+@@ -102,6 +102,11 @@ blxns	    r4
+ #ifdef __ARM_PCS_VFP
+ vpop.f64    {d8-d15}
+ #else
++/* VLLDM erratum mitigation sequence. */
++mrs	    r5, control
++tst	    r5, #8	  /* CONTROL_S.SFPA */
++it	    ne
++.inst.w	    0xeeb00a40	  /* vmovne s0, s0 */
+ vlldm	    sp		  /* Lazy restore of d0-d16 and FPSCR.  */
+ add	    sp, sp, #0x88 /* Free space used to save floating point registers.  */
+ #endif /* __ARM_PCS_VFP */
meta/recipes-devtools/gcc/gcc/0003-CVE-2021-35465.patch new file +103 -0

103 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc/0004-CVE-2021-35465.patch new file +304 -0

304 lines not on this page · raw message

Signature · 1 line
2.33.1
#11 lore raw

PATCH 11/16 rpm: fix CVE-2021-3521

In reply to Anuj Mittal

From: Changqing Li <[email protected]>

---
 .../rpm/files/0001-CVE-2021-3521.patch        |  57 +++
 .../rpm/files/0002-CVE-2021-3521.patch        |  62 ++++
 .../rpm/files/0003-CVE-2021-3521.patch        | 332 ++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_4.16.1.3.bb     |   3 +
 4 files changed, 454 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch
meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch new file +57 -0
new file mode 100644
index 0000000000..b374583017
@@ -0,0 +1,57 @@
+From 9a6871126f472feea057d5f803505ec8cc78f083 Mon Sep 17 00:00:00 2001
+From: Panu Matilainen <[email protected]>
+Date: Thu, 30 Sep 2021 09:56:20 +0300
+Subject: [PATCH 1/3] Refactor pgpDigParams construction to helper function
+
+No functional changes, just to reduce code duplication and needed by
+the following commits.
+
+CVE: CVE-2021-3521
+Upstream-Staus: Backport[https://github.com/rpm-software-management/rpm/commit/9f03f42e2]
+
+Signed-off-by: Changqing Li <[email protected]>
+---
+ rpmio/rpmpgp.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
+index d0688ebe9a..e472b5320f 100644
+--- a/rpmio/rpmpgp.c
++++ b/rpmio/rpmpgp.c
+@@ -1041,6 +1041,13 @@ unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype)
+     return algo;
+ }
+ 
++static pgpDigParams pgpDigParamsNew(uint8_t tag)
++{
++    pgpDigParams digp = xcalloc(1, sizeof(*digp));
++    digp->tag = tag;
++    return digp;
++}
++
+ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype,
+ 		 pgpDigParams * ret)
+ {
+@@ -1058,8 +1065,7 @@ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype,
+ 	    if (pkttype && pkt.tag != pkttype) {
+ 		break;
+ 	    } else {
+-		digp = xcalloc(1, sizeof(*digp));
+-		digp->tag = pkt.tag;
++		digp = pgpDigParamsNew(pkt.tag);
+ 	    }
+ 	}
+ 
+@@ -1105,8 +1111,7 @@ int pgpPrtParamsSubkeys(const uint8_t *pkts, size_t pktlen,
+ 		digps = xrealloc(digps, alloced * sizeof(*digps));
+ 	    }
+ 
+-	    digps[count] = xcalloc(1, sizeof(**digps));
+-	    digps[count]->tag = PGPTAG_PUBLIC_SUBKEY;
++	    digps[count] = pgpDigParamsNew(PGPTAG_PUBLIC_SUBKEY);
+ 	    /* Copy UID from main key to subkey */
+ 	    digps[count]->userid = xstrdup(mainkey->userid);
+ 
+-- 
+2.17.1
+
meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch new file +62 -0

62 lines not on this page · raw message

meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch new file +332 -0

332 lines not on this page · raw message

meta/recipes-devtools/rpm/rpm_4.16.1.3.bb +3 -0
index 62da3d2095..5a347953fa 100644
@@ -41,6 +41,9 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.16.x;protoc
            file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
            file://0001-tools-Add-error.h-for-non-glibc-case.patch \
            file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \
+           file://0001-CVE-2021-3521.patch \
+           file://0002-CVE-2021-3521.patch \
+           file://0003-CVE-2021-3521.patch \
            "
 
 PE = "1"
Signature · 1 line
2.33.1
#13 lore raw

PATCH 13/16 vim: fix CVE-2021-3875

In reply to Anuj Mittal

From: Mingli Yu <[email protected]>

Backport a patch to fix CVE-2021-3875.

---
 .../vim/files/CVE-2021-3875.patch             | 37 +++++++++++++++++++
 meta/recipes-support/vim/vim.inc              |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3875.patch
meta/recipes-support/vim/files/CVE-2021-3875.patch new file +37 -0
new file mode 100644
index 0000000000..d62d875f8e
@@ -0,0 +1,37 @@
+From 40aa9802ef56d3cdbe256b4c9e58049953051a2d Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar <[email protected]>
+Date: Mon, 15 Nov 2021 14:34:50 +0800
+Subject: [PATCH] patch 8.2.3489: ml_get error after search with range
+
+Problem:    ml_get error after search with range.
+Solution:   Limit the line number to the buffer line count.
+
+CVE: CVE-2021-3875
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/35a319b77f897744eec1155b736e9372c9c5575f]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ src/ex_docmd.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/ex_docmd.c b/src/ex_docmd.c
+index fb07450f8..89d33ba90 100644
+--- a/src/ex_docmd.c
++++ b/src/ex_docmd.c
+@@ -3586,8 +3586,10 @@ get_address(
+ 
+ 		    // When '/' or '?' follows another address, start from
+ 		    // there.
+-		    if (lnum != MAXLNUM)
+-			curwin->w_cursor.lnum = lnum;
++		    if (lnum > 0 && lnum != MAXLNUM)
++			curwin->w_cursor.lnum =
++			        lnum > curbuf->b_ml.ml_line_count
++			                   ? curbuf->b_ml.ml_line_count : lnum;
+ 
+ 		    // Start a forward search at the end of the line (unless
+ 		    // before the first line).
+-- 
+2.17.1
+
meta/recipes-support/vim/vim.inc +1 -0
index 1841498b74..65b0b2e330 100644
@@ -22,6 +22,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
            file://b7081e135a16091c93f6f5f7525a5c58fb7ca9f9.patch \
            file://CVE-2021-3903.patch \
            file://CVE-2021-3872.patch \
+           file://CVE-2021-3875.patch \
 "
 
 SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44"
Signature · 1 line
2.33.1
#14 lore raw

PATCH 14/16 bind: fix CVE-2021-25219

In reply to Anuj Mittal

From: Mingli Yu <[email protected]>

Backport patches to fix CVE-2021-25219.

---
 .../bind/bind-9.16.16/CVE-2021-25219-1.patch  | 76 +++++++++++++++++++
 .../bind/bind-9.16.16/CVE-2021-25219-2.patch  | 65 ++++++++++++++++
 .../recipes-connectivity/bind/bind_9.16.16.bb |  2 +
 3 files changed, 143 insertions(+)
 create mode 100644 meta/recipes-connectivity/bind/bind-9.16.16/CVE-2021-25219-1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind-9.16.16/CVE-2021-25219-2.patch
meta/recipes-connectivity/bind/bind-9.16.16/CVE-2021-25219-1.patch new file +76 -0
new file mode 100644
index 0000000000..f63c333264
@@ -0,0 +1,76 @@
+From 011e9418ce9bb25675de6ac8d47536efedeeb312 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <[email protected]>
+Date: Fri, 24 Sep 2021 09:35:11 +0200
+Subject: [PATCH] Disable lame-ttl cache
+
+The lame-ttl cache is implemented in ADB as per-server locked
+linked-list "indexed" with <qname,qtype>.  This list has to be walked
+every time there's a new query or new record added into the lame cache.
+Determined attacker can use this to degrade performance of the resolver.
+
+Resolver testing has shown that disabling the lame cache has little
+impact on the resolver performance and it's a minimal viable defense
+against this kind of attack.
+
+CVE: CVE-2021-25219
+
+Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/-/commit/8fe18c0566c41228a568157287f5a44f96d37662]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ bin/named/config.c    | 2 +-
+ bin/named/server.c    | 7 +++++--
+ doc/arm/reference.rst | 6 +++---
+ 3 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/bin/named/config.c b/bin/named/config.c
+index fa8473db7c..b6453b814e 100644
+--- a/bin/named/config.c
++++ b/bin/named/config.c
+@@ -151,7 +151,7 @@ options {\n\
+ 	fetches-per-server 0;\n\
+ 	fetches-per-zone 0;\n\
+ 	glue-cache yes;\n\
+-	lame-ttl 600;\n"
++	lame-ttl 0;\n"
+ #ifdef HAVE_LMDB
+ 			    "	lmdb-mapsize 32M;\n"
+ #endif /* ifdef HAVE_LMDB */
+diff --git a/bin/named/server.c b/bin/named/server.c
+index 638703e8c2..35ad6a0b7f 100644
+--- a/bin/named/server.c
++++ b/bin/named/server.c
+@@ -4806,8 +4806,11 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
+ 	result = named_config_get(maps, "lame-ttl", &obj);
+ 	INSIST(result == ISC_R_SUCCESS);
+ 	lame_ttl = cfg_obj_asduration(obj);
+-	if (lame_ttl > 1800) {
+-		lame_ttl = 1800;
++	if (lame_ttl > 0) {
++		cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
++			    "disabling lame cache despite lame-ttl > 0 as it "
++			    "may cause performance issues");
++		lame_ttl = 0;
+ 	}
+ 	dns_resolver_setlamettl(view->resolver, lame_ttl);
+ 
+diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst
+index 3bc4439745..fea854f3d1 100644
+--- a/doc/arm/reference.rst
++++ b/doc/arm/reference.rst
+@@ -3358,9 +3358,9 @@ Tuning
+ ^^^^^^
+ 
+ ``lame-ttl``
+-   This sets the number of seconds to cache a lame server indication. 0
+-   disables caching. (This is **NOT** recommended.) The default is
+-   ``600`` (10 minutes) and the maximum value is ``1800`` (30 minutes).
++   This is always set to 0. More information is available in the
++   `security advisory for CVE-2021-25219
++   <https://kb.isc.org/docs/cve-2021-25219>`_.
+ 
+ ``servfail-ttl``
+    This sets the number of seconds to cache a SERVFAIL response due to DNSSEC
+-- 
+2.17.1
+
meta/recipes-connectivity/bind/bind-9.16.16/CVE-2021-25219-2.patch new file +65 -0

65 lines not on this page · raw message

meta/recipes-connectivity/bind/bind_9.16.16.bb +2 -0
index b152598402..4bfdeca9ce 100644
@@ -18,6 +18,8 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
            file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
            file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
            file://0001-avoid-start-failure-with-bind-user.patch \
+           file://CVE-2021-25219-1.patch \
+           file://CVE-2021-25219-2.patch \
            "
 
 SRC_URI[sha256sum] = "6c913902adf878e7dc5e229cea94faefc9d40f44775a30213edd08860f761d7b"
Signature · 1 line
2.33.1
#15 lore raw

PATCH 15/16 vim: fix CVE-2021-3927 and CVE-2021-3928

In reply to Anuj Mittal

From: Mingli Yu <[email protected]>

Backport patches to fix CVE-2021-3927 and CVE-2021-3928.

---
 .../vim/files/CVE-2021-3927.patch             | 32 +++++++++++++++++
 .../vim/files/CVE-2021-3928.patch             | 34 +++++++++++++++++++
 meta/recipes-support/vim/vim.inc              |  2 ++
 3 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3927.patch
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3928.patch
meta/recipes-support/vim/files/CVE-2021-3927.patch new file +32 -0
new file mode 100644
index 0000000000..90b1b6b82e
@@ -0,0 +1,32 @@
+From f334a87204b4aab76536063b37b4d4a10be46a3a Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar <[email protected]>
+Date: Wed, 17 Nov 2021 11:09:48 +0800
+Subject: [PATCH] patch 8.2.3581: reading character past end of line
+
+Problem:    Reading character past end of line.
+Solution:   Correct the cursor column.
+
+CVE: CVE-2021-3927
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/0b5b06cb4777d1401fdf83e7d48d287662236e7e]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ src/ex_docmd.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/ex_docmd.c b/src/ex_docmd.c
+index 89d33ba90..54d7f4cb3 100644
+--- a/src/ex_docmd.c
++++ b/src/ex_docmd.c
+@@ -6905,6 +6905,7 @@ ex_put(exarg_T *eap)
+ 	eap->forceit = TRUE;
+     }
+     curwin->w_cursor.lnum = eap->line2;
++    check_cursor_col();
+     do_put(eap->regname, eap->forceit ? BACKWARD : FORWARD, 1L,
+ 						       PUT_LINE|PUT_CURSLINE);
+ }
+-- 
+2.17.1
+
meta/recipes-support/vim/files/CVE-2021-3928.patch new file +34 -0
new file mode 100644
index 0000000000..8672367ab9
@@ -0,0 +1,34 @@
+From ad7f7a3f81077ddfac451acd33ca049b9f2a5178 Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar <[email protected]>
+Date: Wed, 17 Nov 2021 11:22:21 +0800
+Subject: [PATCH] patch 8.2.3582: reading uninitialized memory when giving
+ spell suggestions
+
+Problem:    Reading uninitialized memory when giving spell suggestions.
+Solution:   Check that preword is not empty.
+
+CVE: CVE-2021-3928
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/15d9890eee53afc61eb0a03b878a19cb5672f732]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ src/spellsuggest.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/spellsuggest.c b/src/spellsuggest.c
+index 9d6df7930..88307b203 100644
+--- a/src/spellsuggest.c
++++ b/src/spellsuggest.c
+@@ -1600,7 +1600,7 @@ suggest_trie_walk(
+ 		    // char, e.g., "thes," -> "these".
+ 		    p = fword + sp->ts_fidx;
+ 		    MB_PTR_BACK(fword, p);
+-		    if (!spell_iswordp(p, curwin))
++		    if (!spell_iswordp(p, curwin) && *preword != NUL)
+ 		    {
+ 			p = preword + STRLEN(preword);
+ 			MB_PTR_BACK(preword, p);
+-- 
+2.17.1
+
meta/recipes-support/vim/vim.inc +2 -0
index 65b0b2e330..864006192b 100644
@@ -23,6 +23,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
            file://CVE-2021-3903.patch \
            file://CVE-2021-3872.patch \
            file://CVE-2021-3875.patch \
+           file://CVE-2021-3927.patch \
+           file://CVE-2021-3928.patch \
 "
 
 SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44"
Signature · 1 line
2.33.1
#16 lore raw

PATCH 16/16 squashfs-tools: fix CVE-2021-41072

In reply to Anuj Mittal

From: Kai Kang <[email protected]>

Backport patches to fix CVE-2021-41072. And update context for verison 4.4 at same time.

CVE: CVE-2021-41072

Ref:
* https://nvd.nist.gov/vuln/detail/CVE-2021-41072

---
 .../files/CVE-2021-41072-requisite-1.patch    | 135 +++++++
 .../files/CVE-2021-41072-requisite-2.patch    | 109 ++++++
 .../files/CVE-2021-41072-requisite-3.patch    | 330 ++++++++++++++++++
 .../squashfs-tools/files/CVE-2021-41072.patch | 316 +++++++++++++++++
 .../squashfs-tools/squashfs-tools_git.bb      |   4 +
 5 files changed, 894 insertions(+)
 create mode 100644 meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-1.patch
 create mode 100644 meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-2.patch
 create mode 100644 meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-3.patch
 create mode 100644 meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072.patch
meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-1.patch new file +135 -0
new file mode 100644
index 0000000000..d01b5c6871
@@ -0,0 +1,135 @@
+The commit is required by the fix for CVE-2021-41072.
+
+Upstream-Status: Backport [https://github.com/plougher/squashfs-tools/commit/80b8441]
+
+Signed-off-by: Kai Kang <[email protected]>
+
+From 80b8441a37fcf8bf07dacf24d9d6c6459a0f6e36 Mon Sep 17 00:00:00 2001
+From: Phillip Lougher <[email protected]>
+Date: Sun, 12 Sep 2021 19:58:19 +0100
+Subject: [PATCH] unsquashfs: use squashfs_closedir() to delete directory
+
+Signed-off-by: Phillip Lougher <[email protected]>
+---
+ squashfs-tools/unsquash-1.c    |  3 +--
+ squashfs-tools/unsquash-1234.c | 11 +++++++++--
+ squashfs-tools/unsquash-2.c    |  3 +--
+ squashfs-tools/unsquash-3.c    |  3 +--
+ squashfs-tools/unsquash-4.c    |  3 +--
+ squashfs-tools/unsquashfs.c    |  7 -------
+ squashfs-tools/unsquashfs.h    |  1 +
+ 7 files changed, 14 insertions(+), 17 deletions(-)
+
+diff --git a/squashfs-tools/unsquash-1.c b/squashfs-tools/unsquash-1.c
+index acba821..7598499 100644
+--- a/squashfs-tools/unsquash-1.c
++++ b/squashfs-tools/unsquash-1.c
+@@ -373,8 +373,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	return dir;
+ 
+ corrupted:
+-	free(dir->dirs);
+-	free(dir);
++	squashfs_closedir(dir);
+ 	return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-1234.c b/squashfs-tools/unsquash-1234.c
+index c2d4f42..0c8dfbb 100644
+--- a/squashfs-tools/unsquash-1234.c
++++ b/squashfs-tools/unsquash-1234.c
+@@ -25,8 +25,8 @@
+  * unsquash-4.
+  */
+ 
+-#define TRUE 1
+-#define FALSE 0
++#include "unsquashfs.h"
++
+ /*
+  * Check name for validity, name should not
+  *  - be ".", "./", or
+@@ -56,3 +56,10 @@ int check_name(char *name, int size)
+ 
+ 	return TRUE;
+ }
++
++
++void squashfs_closedir(struct dir *dir)
++{
++	free(dir->dirs);
++	free(dir);
++}
+diff --git a/squashfs-tools/unsquash-2.c b/squashfs-tools/unsquash-2.c
+index 0746b3d..86f62ba 100644
+--- a/squashfs-tools/unsquash-2.c
++++ b/squashfs-tools/unsquash-2.c
+@@ -465,8 +465,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	return dir;
+ 
+ corrupted:
+-	free(dir->dirs);
+-	free(dir);
++	squashfs_closedir(dir);
+ 	return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-3.c b/squashfs-tools/unsquash-3.c
+index 094caaa..c04aa9e 100644
+--- a/squashfs-tools/unsquash-3.c
++++ b/squashfs-tools/unsquash-3.c
+@@ -499,8 +499,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	return dir;
+ 
+ corrupted:
+-	free(dir->dirs);
+-	free(dir);
++	squashfs_closedir(dir);
+ 	return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
+index 3a1b9e1..ff62dcc 100644
+--- a/squashfs-tools/unsquash-4.c
++++ b/squashfs-tools/unsquash-4.c
+@@ -436,8 +436,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	return dir;
+ 
+ corrupted:
+-	free(dir->dirs);
+-	free(dir);
++	squashfs_closedir(dir);
+ 	return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 7b590bd..04be53c 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -1350,13 +1350,6 @@ unsigned int *offset, unsigned int *type)
+ }
+ 
+ 
+-void squashfs_closedir(struct dir *dir)
+-{
+-	free(dir->dirs);
+-	free(dir);
+-}
+-
+-
+ char *get_component(char *target, char **targname)
+ {
+ 	char *start;
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index 2e9201c..5ecb2ab 100644
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -291,4 +291,5 @@ extern long long *alloc_index_table(int);
+ 
+ /* unsquash-1234.c */
+ extern int check_name(char *, int);
++extern void squashfs_closedir(struct dir *);
+ #endif
+-- 
+2.17.1
+
meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-2.patch new file +109 -0

109 lines not on this page · raw message

meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-3.patch new file +330 -0

330 lines not on this page · raw message

meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072.patch new file +316 -0

316 lines not on this page · raw message

meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +4 -0
index 5d754b20b3..caa5417ed0 100644
@@ -12,6 +12,10 @@ SRCREV = "52eb4c279cd283ed9802dd1ceb686560b22ffb67"
 SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https;branch=master \
            file://0001-squashfs-tools-fix-build-failure-against-gcc-10.patch;striplevel=2 \
            file://CVE-2021-40153.patch;striplevel=2 \
+           file://CVE-2021-41072-requisite-1.patch;striplevel=2 \
+           file://CVE-2021-41072-requisite-2.patch;striplevel=2 \
+           file://CVE-2021-41072-requisite-3.patch;striplevel=2 \
+           file://CVE-2021-41072.patch;striplevel=2 \
 "
 
 S = "${WORKDIR}/git/squashfs-tools"
Signature · 1 line
2.33.1