From 37f5a3bb01305ca9e853f512fc3e4b929be83f0c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 15 Jul 2024 11:55:20 +0200 Subject: [PATCH 1/4] uboot-mediatek: fix build error on mt7988-rfb Remove an unnecessary config option that was breaking the build Signed-off-by: Felix Fietkau --- ...5-configs-add-usefull-stuff-to-mt7988-rfb.patch | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch b/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch index 32d87a376d..6040aaa0c4 100644 --- a/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch +++ b/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch @@ -1,6 +1,6 @@ --- a/configs/mt7988_sd_rfb_defconfig +++ b/configs/mt7988_sd_rfb_defconfig -@@ -11,6 +11,24 @@ CONFIG_DEBUG_UART_BASE=0x11000000 +@@ -11,6 +11,23 @@ CONFIG_DEBUG_UART_BASE=0x11000000 CONFIG_DEBUG_UART_CLOCK=40000000 CONFIG_SYS_LOAD_ADDR=0x46000000 CONFIG_DEBUG_UART=y @@ -19,13 +19,12 @@ +CONFIG_LED_GPIO=y +CONFIG_SPI_BOOT=y +CONFIG_SD_BOOT=y -+CONFIG_NAND_BOOT=y +CONFIG_BOOTSTD_DEFAULTS=y +CONFIG_BOOTSTD_FULL=y # CONFIG_AUTOBOOT is not set CONFIG_DEFAULT_FDT_FILE="mt7988-sd-rfb" CONFIG_SYS_CBSIZE=512 -@@ -22,15 +40,118 @@ CONFIG_SYS_PROMPT="MT7988> " +@@ -22,15 +39,118 @@ CONFIG_SYS_PROMPT="MT7988> " # CONFIG_BOOTM_PLAN9 is not set # CONFIG_BOOTM_RTEMS is not set # CONFIG_BOOTM_VXWORKS is not set @@ -145,7 +144,7 @@ CONFIG_DOS_PARTITION=y CONFIG_EFI_PARTITION=y CONFIG_PARTITION_TYPE_GUID=y -@@ -46,6 +167,9 @@ CONFIG_PROT_TCP=y +@@ -46,6 +166,9 @@ CONFIG_PROT_TCP=y CONFIG_REGMAP=y CONFIG_SYSCON=y CONFIG_CLK=y @@ -157,7 +156,7 @@ CONFIG_MTD=y --- a/configs/mt7988_rfb_defconfig +++ b/configs/mt7988_rfb_defconfig -@@ -11,7 +11,24 @@ CONFIG_DEBUG_UART_BASE=0x11000000 +@@ -11,7 +11,23 @@ CONFIG_DEBUG_UART_BASE=0x11000000 CONFIG_DEBUG_UART_CLOCK=40000000 CONFIG_SYS_LOAD_ADDR=0x46000000 CONFIG_DEBUG_UART=y @@ -177,13 +176,12 @@ +CONFIG_LED_GPIO=y +CONFIG_SPI_BOOT=y +CONFIG_SD_BOOT=y -+CONFIG_NAND_BOOT=y +CONFIG_BOOTSTD_DEFAULTS=y +CONFIG_BOOTSTD_FULL=y CONFIG_DEFAULT_FDT_FILE="mt7988-rfb" CONFIG_SYS_CBSIZE=512 CONFIG_SYS_PBSIZE=1049 -@@ -22,15 +39,120 @@ CONFIG_SYS_PROMPT="MT7988> " +@@ -22,15 +38,120 @@ CONFIG_SYS_PROMPT="MT7988> " # CONFIG_BOOTM_PLAN9 is not set # CONFIG_BOOTM_RTEMS is not set # CONFIG_BOOTM_VXWORKS is not set @@ -305,7 +303,7 @@ CONFIG_DOS_PARTITION=y CONFIG_EFI_PARTITION=y CONFIG_PARTITION_TYPE_GUID=y -@@ -46,6 +168,9 @@ CONFIG_PROT_TCP=y +@@ -46,6 +167,9 @@ CONFIG_PROT_TCP=y CONFIG_REGMAP=y CONFIG_SYSCON=y CONFIG_CLK=y From 22258443921c59d25da741266cbac583a7402714 Mon Sep 17 00:00:00 2001 From: Chad Monroe Date: Mon, 15 Jul 2024 10:37:55 -0700 Subject: [PATCH 2/4] mediatek: filogic: disable eMMC HS400 mode for Mount Stuart series The eMMC chip used in a small batch of these devices has issues operating in HS400 mode. Reducing to HS200 mode works around the problem and does not cause any noticeable performance penalties as smaller chips are not fast enough to saturate the bus. Root cause analysis is pending. Signed-off-by: Chad Monroe --- target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi index 2b468f9bb3..fac267abf4 100644 --- a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi +++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi @@ -481,8 +481,6 @@ max-frequency = <200000000>; cap-mmc-highspeed; mmc-hs200-1_8v; - mmc-hs400-1_8v; - hs400-ds-delay = <0x12814>; vmmc-supply = <®_3p3v>; vqmmc-supply = <®_1p8v>; non-removable; From 3a0232ffd33f2dc894c671d90de6b2766399f4dc Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 15 Jul 2024 01:06:38 +0200 Subject: [PATCH 3/4] wolfssl: Update to version 5.7.2 This fixes multiple security problems: * [Medium] CVE-2024-1544 Potential ECDSA nonce side channel attack in versions of wolfSSL before 5.6.6 with wc_ecc_sign_hash calls. * [Medium] CVE-2024-5288 A private key blinding operation, enabled by defining the macro WOLFSSL_BLIND_PRIVATE_KEY, was added to mitigate a potential row hammer attack on ECC operations. * [Low] When parsing a provided maliciously crafted certificate directly using wolfSSL API, outside of a TLS connection, a certificate with an excessively large number of extensions could lead to a potential DoS. * [Low] CVE-2024-5991 In the function MatchDomainName(), input param str is treated as a NULL terminated string despite being user provided and unchecked. * [Medium] CVE-2024-5814 A malicious TLS1.2 server can force a TLS1.3 client with downgrade capability to use a ciphersuite that it did not agree to and achieve a successful connection. * [Medium] OCSP stapling version 2 response verification bypass issue when a crafted response of length 0 is received. * [Medium] OCSP stapling version 2 revocation bypass with a retry of a TLS connection attempt. Unset DISABLE_NLS to prevent setting the unsupported configuration option --disable-nls which breaks the build now. Link: https://github.com/openwrt/openwrt/pull/15948 Signed-off-by: Hauke Mehrtens --- package/libs/wolfssl/Makefile | 6 ++++-- .../libs/wolfssl/patches/100-disable-hardening-check.patch | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 60ba85e15f..bac4a8ef52 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=5.7.0-stable +PKG_VERSION:=5.7.2-stable PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) -PKG_HASH:=2de93e8af588ee856fe67a6d7fce23fc1b226b74d710b0e3946bc8061f6aa18f +PKG_HASH:=0f2ed82e345b833242705bbc4b08a2a2037a33f7bf9c610efae6464f6b10e305 PKG_FIXUP:=libtool libtool-abiver PKG_INSTALL:=1 @@ -51,6 +51,8 @@ PKG_CONFIG_DEPENDS+=\ include $(INCLUDE_DIR)/package.mk +DISABLE_NLS:= + define Package/libwolfssl/Default SECTION:=libs SUBMENU:=SSL diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch index 680d3588a6..174e657982 100644 --- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch +++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch @@ -1,6 +1,6 @@ --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h -@@ -2945,7 +2945,7 @@ extern void uITRON4_free(void *p) ; +@@ -3046,7 +3046,7 @@ extern void uITRON4_free(void *p) ; /* warning for not using harden build options (default with ./configure) */ /* do not warn if big integer support is disabled */ From b4f1deab9041583e7c350df4a490f6c8d999614b Mon Sep 17 00:00:00 2001 From: John Audia Date: Mon, 15 Jul 2024 15:37:46 -0400 Subject: [PATCH 4/4] kernel: bump 6.6 to 6.6.40 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.40 All patches (one in this case) automatically rebased. Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000 Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000 Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/15956 Signed-off-by: Hauke Mehrtens --- include/kernel-6.6 | 4 ++-- .../950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 6a6c8aae11..a736da59cb 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .39 -LINUX_KERNEL_HASH-6.6.39 = 2783d42112095f95c510e1b421f056df8cbfa845f9040c6115080434a77a776b +LINUX_VERSION-6.6 = .40 +LINUX_KERNEL_HASH-6.6.40 = 5c3a3c03c055b8d601a6d7f80d1465ada6b83a12299f6ace2027b47f0baff538 diff --git a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch index 1280d2c27d..e1846dc8f5 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch @@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3658,6 +3658,48 @@ static int xhci_align_td(struct xhci_hcd +@@ -3657,6 +3657,48 @@ static int xhci_align_td(struct xhci_hcd return 1; } @@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell /* This is very similar to what ehci-q.c qtd_fill() does */ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, int slot_id, unsigned int ep_index) -@@ -3814,6 +3856,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3813,6 +3855,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * } check_trb_math(urb, enqd_len); @@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, start_cycle, start_trb); return 0; -@@ -3949,6 +3993,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3948,6 +3992,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * /* Event on completion */ field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state);