forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: ipq60xx: Add upstream patch for USB Support autocore: improve x86 index display x86: add support for iKoolCore R1 (eth1/2/3 for LAN, eth0 for WAN) x86: improve sysinfo handling of special values tools/cmake: update to 3.25.1 build: add gzip to prereq-build.mk build: images: squashfs: add help, fix description kernel: ca8210: Fix crash by zero initializing data e2fsprogs: Fix CVE-2022-1304 mediatek: mt7623: build mt6577_auxadc driver into kernel trusted-firmware-a.mk: fix build with binutils 2.39 build: make sure that $(STAGING_DIR_IMAGE) exists
- Loading branch information
Showing
20 changed files
with
301 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...fsprogs/patches/004-CVE-2022-1304-libext2fs-add-sanity-check-to-extent-manipulation.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
From ab51d587bb9b229b1fade1afd02e1574c1ba5c76 Mon Sep 17 00:00:00 2001 | ||
From: Lukas Czerner <lczerner@redhat.com> | ||
Date: Thu, 21 Apr 2022 19:31:48 +0200 | ||
Subject: libext2fs: add sanity check to extent manipulation | ||
|
||
It is possible to have a corrupted extent tree in such a way that a leaf | ||
node contains zero extents in it. Currently if that happens and we try | ||
to traverse the tree we can end up accessing wrong data, or possibly | ||
even uninitialized memory. Make sure we don't do that. | ||
|
||
Additionally make sure that we have a sane number of bytes passed to | ||
memmove() in ext2fs_extent_delete(). | ||
|
||
Note that e2fsck is currently unable to spot and fix such corruption in | ||
pass1. | ||
|
||
Signed-off-by: Lukas Czerner <lczerner@redhat.com> | ||
Reported-by: Nils Bars <nils_bars@t-online.de> | ||
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2068113 | ||
Addresses: CVE-2022-1304 | ||
Addresses-Debian-Bug: #1010263 | ||
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ||
--- | ||
lib/ext2fs/extent.c | 8 ++++++++ | ||
1 file changed, 8 insertions(+) | ||
|
||
--- a/lib/ext2fs/extent.c | ||
+++ b/lib/ext2fs/extent.c | ||
@@ -495,6 +495,10 @@ retry: | ||
ext2fs_le16_to_cpu(eh->eh_entries); | ||
newpath->max_entries = ext2fs_le16_to_cpu(eh->eh_max); | ||
|
||
+ /* Make sure there is at least one extent present */ | ||
+ if (newpath->left <= 0) | ||
+ return EXT2_ET_EXTENT_NO_DOWN; | ||
+ | ||
if (path->left > 0) { | ||
ix++; | ||
newpath->end_blk = ext2fs_le32_to_cpu(ix->ei_block); | ||
@@ -1630,6 +1634,10 @@ errcode_t ext2fs_extent_delete(ext2_exte | ||
|
||
cp = path->curr; | ||
|
||
+ /* Sanity check before memmove() */ | ||
+ if (path->left < 0) | ||
+ return EXT2_ET_EXTENT_LEAF_BAD; | ||
+ | ||
if (path->left) { | ||
memmove(cp, cp + sizeof(struct ext3_extent_idx), | ||
path->left * sizeof(struct ext3_extent_idx)); |
30 changes: 30 additions & 0 deletions
30
target/linux/generic/pending-5.10/870-ca8210-Fix-crash-by-zero-initializing-data.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 1e24c54da257ab93cff5826be8a793b014a5dc9c Mon Sep 17 00:00:00 2001 | ||
From: Hauke Mehrtens <hauke@hauke-m.de> | ||
Date: Mon, 21 Nov 2022 01:22:01 +0100 | ||
Subject: ca8210: Fix crash by zero initializing data | ||
|
||
The struct cas_control embeds multiple generic SPI structures and we | ||
have to make sure these structures are initialized to default values. | ||
This driver does not set all attributes. When using kmalloc before some | ||
attributes were not initialized and contained random data which caused | ||
random crashes at bootup. | ||
|
||
Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") | ||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> | ||
Link: https://lore.kernel.org/r/20221121002201.1339636-1-hauke@hauke-m.de | ||
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org> | ||
--- | ||
drivers/net/ieee802154/ca8210.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/drivers/net/ieee802154/ca8210.c | ||
+++ b/drivers/net/ieee802154/ca8210.c | ||
@@ -926,7 +926,7 @@ static int ca8210_spi_transfer( | ||
|
||
dev_dbg(&spi->dev, "%s called\n", __func__); | ||
|
||
- cas_ctl = kmalloc(sizeof(*cas_ctl), GFP_ATOMIC); | ||
+ cas_ctl = kzalloc(sizeof(*cas_ctl), GFP_ATOMIC); | ||
if (!cas_ctl) | ||
return -ENOMEM; | ||
|
30 changes: 30 additions & 0 deletions
30
target/linux/generic/pending-5.15/870-ca8210-Fix-crash-by-zero-initializing-data.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 1e24c54da257ab93cff5826be8a793b014a5dc9c Mon Sep 17 00:00:00 2001 | ||
From: Hauke Mehrtens <hauke@hauke-m.de> | ||
Date: Mon, 21 Nov 2022 01:22:01 +0100 | ||
Subject: ca8210: Fix crash by zero initializing data | ||
|
||
The struct cas_control embeds multiple generic SPI structures and we | ||
have to make sure these structures are initialized to default values. | ||
This driver does not set all attributes. When using kmalloc before some | ||
attributes were not initialized and contained random data which caused | ||
random crashes at bootup. | ||
|
||
Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") | ||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> | ||
Link: https://lore.kernel.org/r/20221121002201.1339636-1-hauke@hauke-m.de | ||
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org> | ||
--- | ||
drivers/net/ieee802154/ca8210.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/drivers/net/ieee802154/ca8210.c | ||
+++ b/drivers/net/ieee802154/ca8210.c | ||
@@ -927,7 +927,7 @@ static int ca8210_spi_transfer( | ||
|
||
dev_dbg(&spi->dev, "%s called\n", __func__); | ||
|
||
- cas_ctl = kmalloc(sizeof(*cas_ctl), GFP_ATOMIC); | ||
+ cas_ctl = kzalloc(sizeof(*cas_ctl), GFP_ATOMIC); | ||
if (!cas_ctl) | ||
return -ENOMEM; | ||
|
115 changes: 115 additions & 0 deletions
115
target/linux/ipq60xx/patches-5.15/1013-arm64-dts-qcom-ipq6018-add-usb3-DT-description.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
From d438c9afd73a482a0438e6cf86daa0580422598e Mon Sep 17 00:00:00 2001 | ||
From: Kathiravan T <kathirav@codeaurora.org> | ||
Date: Tue, 31 Aug 2021 08:57:32 +0300 | ||
Subject: [PATCH 1013/1013] arm64: dts: qcom: ipq6018: add usb3 DT description | ||
|
||
Based on downstream codeaurora code. | ||
|
||
Tested (USB2 only) on IPQ6010 based hardware. | ||
|
||
Signed-off-by: Kathiravan T <kathirav@codeaurora.org> | ||
Signed-off-by: Baruch Siach <baruch@tkos.co.il> | ||
[bjorn: Changed dwc3 node name to usb, per binding] | ||
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> | ||
Link: https://lore.kernel.org/r/ebc2d340d566fa2d43127e253d5b8b134a87a78e.1630389452.git.baruch@tkos.co.il | ||
--- | ||
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 83 +++++++++++++++++++++++++++ | ||
1 file changed, 83 insertions(+) | ||
|
||
diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi | ||
index d8da83aa8bda..b4c9bda0104c 100644 | ||
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi | ||
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi | ||
@@ -715,6 +715,89 @@ dwc_1: usb@7000000 { | ||
}; | ||
}; | ||
|
||
+ ssphy_0: ssphy@78000 { | ||
+ compatible = "qcom,ipq6018-qmp-usb3-phy"; | ||
+ reg = <0x0 0x78000 0x0 0x1C4>; | ||
+ #address-cells = <2>; | ||
+ #size-cells = <2>; | ||
+ #clock-cells = <1>; | ||
+ ranges; | ||
+ | ||
+ clocks = <&gcc GCC_USB0_AUX_CLK>, | ||
+ <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, <&xo>; | ||
+ clock-names = "aux", "cfg_ahb", "ref"; | ||
+ | ||
+ resets = <&gcc GCC_USB0_PHY_BCR>, | ||
+ <&gcc GCC_USB3PHY_0_PHY_BCR>; | ||
+ reset-names = "phy","common"; | ||
+ status = "disabled"; | ||
+ | ||
+ usb0_ssphy: lane@78200 { | ||
+ reg = <0x0 0x00078200 0x0 0x130>, /* Tx */ | ||
+ <0x0 0x00078400 0x0 0x200>, /* Rx */ | ||
+ <0x0 0x00078800 0x0 0x1F8>, /* PCS */ | ||
+ <0x0 0x00078600 0x0 0x044>; /* PCS misc */ | ||
+ #phy-cells = <0>; | ||
+ clocks = <&gcc GCC_USB0_PIPE_CLK>; | ||
+ clock-names = "pipe0"; | ||
+ clock-output-names = "gcc_usb0_pipe_clk_src"; | ||
+ }; | ||
+ }; | ||
+ | ||
+ qusb_phy_0: qusb@79000 { | ||
+ compatible = "qcom,ipq6018-qusb2-phy"; | ||
+ reg = <0x0 0x079000 0x0 0x180>; | ||
+ #phy-cells = <0>; | ||
+ | ||
+ clocks = <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, | ||
+ <&xo>; | ||
+ clock-names = "cfg_ahb", "ref"; | ||
+ | ||
+ resets = <&gcc GCC_QUSB2_0_PHY_BCR>; | ||
+ status = "disabled"; | ||
+ }; | ||
+ | ||
+ usb3: usb3@8A00000 { | ||
+ compatible = "qcom,ipq6018-dwc3", "qcom,dwc3"; | ||
+ reg = <0x0 0x8AF8800 0x0 0x400>; | ||
+ #address-cells = <2>; | ||
+ #size-cells = <2>; | ||
+ ranges; | ||
+ | ||
+ clocks = <&gcc GCC_SYS_NOC_USB0_AXI_CLK>, | ||
+ <&gcc GCC_USB0_MASTER_CLK>, | ||
+ <&gcc GCC_USB0_SLEEP_CLK>, | ||
+ <&gcc GCC_USB0_MOCK_UTMI_CLK>; | ||
+ clock-names = "sys_noc_axi", | ||
+ "master", | ||
+ "sleep", | ||
+ "mock_utmi"; | ||
+ | ||
+ assigned-clocks = <&gcc GCC_SYS_NOC_USB0_AXI_CLK>, | ||
+ <&gcc GCC_USB0_MASTER_CLK>, | ||
+ <&gcc GCC_USB0_MOCK_UTMI_CLK>; | ||
+ assigned-clock-rates = <133330000>, | ||
+ <133330000>, | ||
+ <20000000>; | ||
+ | ||
+ resets = <&gcc GCC_USB0_BCR>; | ||
+ status = "disabled"; | ||
+ | ||
+ dwc_0: usb@8A00000 { | ||
+ compatible = "snps,dwc3"; | ||
+ reg = <0x0 0x8A00000 0x0 0xcd00>; | ||
+ interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; | ||
+ phys = <&qusb_phy_0>, <&usb0_ssphy>; | ||
+ phy-names = "usb2-phy", "usb3-phy"; | ||
+ tx-fifo-resize; | ||
+ snps,is-utmi-l1-suspend; | ||
+ snps,hird-threshold = /bits/ 8 <0x0>; | ||
+ snps,dis_u2_susphy_quirk; | ||
+ snps,dis_u3_susphy_quirk; | ||
+ snps,ref-clock-period-ns = <0x32>; | ||
+ dr_mode = "host"; | ||
+ }; | ||
+ }; | ||
}; | ||
|
||
wcss: wcss-smp2p { | ||
-- | ||
2.37.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.