forked from openwrt/openwrt
-
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.
Merge branch 'openwrt:openwrt-23.05' into openwrt-23.05
- Loading branch information
Showing
19 changed files
with
543 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
/feeds | ||
/feeds.conf | ||
/files | ||
/target/linux/feeds | ||
/overlay | ||
/package/feeds | ||
/package/openwrt-packages | ||
|
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
30 changes: 30 additions & 0 deletions
30
...neric/backport-5.15/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.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 2203718c2f59ffdd6c78d54e5add594aebb4461e Mon Sep 17 00:00:00 2001 | ||
From: Georgi Valkov <gvalkov@gmail.com> | ||
Date: Wed, 7 Jun 2023 15:56:59 +0200 | ||
Subject: [PATCH 1/4] usbnet: ipheth: fix risk of NULL pointer deallocation | ||
|
||
The cleanup precedure in ipheth_probe will attempt to free a | ||
NULL pointer in dev->ctrl_buf if the memory allocation for | ||
this buffer is not successful. While kfree ignores NULL pointers, | ||
and the existing code is safe, it is a better design to rearrange | ||
the goto labels and avoid this. | ||
|
||
Signed-off-by: Georgi Valkov <gvalkov@gmail.com> | ||
Signed-off-by: Foster Snowhill <forst@pen.gy> | ||
Signed-off-by: David S. Miller <davem@davemloft.net> | ||
--- | ||
drivers/net/usb/ipheth.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/drivers/net/usb/ipheth.c | ||
+++ b/drivers/net/usb/ipheth.c | ||
@@ -510,8 +510,8 @@ err_register_netdev: | ||
ipheth_free_urbs(dev); | ||
err_alloc_urbs: | ||
err_get_macaddr: | ||
-err_alloc_ctrl_buf: | ||
kfree(dev->ctrl_buf); | ||
+err_alloc_ctrl_buf: | ||
err_endpoints: | ||
free_netdev(netdev); | ||
return retval; |
35 changes: 35 additions & 0 deletions
35
...eric/backport-5.15/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.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,35 @@ | ||
From 3e65efcca87a9bb5f3b864e0a43d167bc0a8688c Mon Sep 17 00:00:00 2001 | ||
From: Foster Snowhill <forst@pen.gy> | ||
Date: Wed, 7 Jun 2023 15:57:00 +0200 | ||
Subject: [PATCH 2/4] usbnet: ipheth: transmit URBs without trailing padding | ||
|
||
The behaviour of the official iOS tethering driver on macOS is to not | ||
transmit any trailing padding at the end of URBs. This is applicable | ||
to both NCM and legacy modes, including older devices. | ||
|
||
Adapt the driver to not include trailing padding in TX URBs, matching | ||
the behaviour of the official macOS driver. | ||
|
||
Signed-off-by: Foster Snowhill <forst@pen.gy> | ||
Tested-by: Georgi Valkov <gvalkov@gmail.com> | ||
Signed-off-by: David S. Miller <davem@davemloft.net> | ||
--- | ||
drivers/net/usb/ipheth.c | 4 +--- | ||
1 file changed, 1 insertion(+), 3 deletions(-) | ||
|
||
--- a/drivers/net/usb/ipheth.c | ||
+++ b/drivers/net/usb/ipheth.c | ||
@@ -373,12 +373,10 @@ static netdev_tx_t ipheth_tx(struct sk_b | ||
} | ||
|
||
memcpy(dev->tx_buf, skb->data, skb->len); | ||
- if (skb->len < IPHETH_BUF_SIZE) | ||
- memset(dev->tx_buf + skb->len, 0, IPHETH_BUF_SIZE - skb->len); | ||
|
||
usb_fill_bulk_urb(dev->tx_urb, udev, | ||
usb_sndbulkpipe(udev, dev->bulk_out), | ||
- dev->tx_buf, IPHETH_BUF_SIZE, | ||
+ dev->tx_buf, skb->len, | ||
ipheth_sndbulk_callback, | ||
dev); | ||
dev->tx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; |
Oops, something went wrong.