]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2022 10:05:52 +0000 (11:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2022 10:05:52 +0000 (11:05 +0100)
added patches:
ethtool-eeprom-fix-null-deref-on-genl_info-in-dump.patch
net-ieee802154-fix-error-return-code-in-dgram_bind.patch

queue-5.15/ethtool-eeprom-fix-null-deref-on-genl_info-in-dump.patch [new file with mode: 0644]
queue-5.15/net-ieee802154-fix-error-return-code-in-dgram_bind.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/ethtool-eeprom-fix-null-deref-on-genl_info-in-dump.patch b/queue-5.15/ethtool-eeprom-fix-null-deref-on-genl_info-in-dump.patch
new file mode 100644 (file)
index 0000000..a92a768
--- /dev/null
@@ -0,0 +1,37 @@
+From 9d9effca9d7d7cf6341182a7c5cabcbd6fa28063 Mon Sep 17 00:00:00 2001
+From: Xin Long <lucien.xin@gmail.com>
+Date: Fri, 21 Oct 2022 10:22:47 -0400
+Subject: ethtool: eeprom: fix null-deref on genl_info in dump
+
+From: Xin Long <lucien.xin@gmail.com>
+
+commit 9d9effca9d7d7cf6341182a7c5cabcbd6fa28063 upstream.
+
+The similar fix as commit 46cdedf2a0fa ("ethtool: pse-pd: fix null-deref on
+genl_info in dump") is also needed for ethtool eeprom.
+
+Fixes: c781ff12a2f3 ("ethtool: Allow network drivers to dump arbitrary EEPROM data")
+Signed-off-by: Xin Long <lucien.xin@gmail.com>
+Link: https://lore.kernel.org/r/5575919a2efc74cd9ad64021880afc3805c54166.1666362167.git.lucien.xin@gmail.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ethtool/eeprom.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/ethtool/eeprom.c b/net/ethtool/eeprom.c
+index 1c94bb8ea03f..49c0a2a77f02 100644
+--- a/net/ethtool/eeprom.c
++++ b/net/ethtool/eeprom.c
+@@ -124,7 +124,7 @@ static int eeprom_prepare_data(const struct ethnl_req_info *req_base,
+       if (ret)
+               goto err_free;
+-      ret = get_module_eeprom_by_page(dev, &page_data, info->extack);
++      ret = get_module_eeprom_by_page(dev, &page_data, info ? info->extack : NULL);
+       if (ret < 0)
+               goto err_ops;
+-- 
+2.38.1
+
diff --git a/queue-5.15/net-ieee802154-fix-error-return-code-in-dgram_bind.patch b/queue-5.15/net-ieee802154-fix-error-return-code-in-dgram_bind.patch
new file mode 100644 (file)
index 0000000..e30f6d4
--- /dev/null
@@ -0,0 +1,35 @@
+From 444d8ad4916edec8a9fc684e841287db9b1e999f Mon Sep 17 00:00:00 2001
+From: Wei Yongjun <weiyongjun1@huawei.com>
+Date: Mon, 19 Sep 2022 16:08:30 +0000
+Subject: net: ieee802154: fix error return code in dgram_bind()
+
+From: Wei Yongjun <weiyongjun1@huawei.com>
+
+commit 444d8ad4916edec8a9fc684e841287db9b1e999f upstream.
+
+Fix to return error code -EINVAL from the error handling
+case instead of 0, as done elsewhere in this function.
+
+Fixes: 94160108a70c ("net/ieee802154: fix uninit value bug in dgram_sendmsg")
+Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
+Link: https://lore.kernel.org/r/20220919160830.1436109-1-weiyongjun@huaweicloud.com
+Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ieee802154/socket.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/net/ieee802154/socket.c
++++ b/net/ieee802154/socket.c
+@@ -502,8 +502,10 @@ static int dgram_bind(struct sock *sk, s
+       if (err < 0)
+               goto out;
+-      if (addr->family != AF_IEEE802154)
++      if (addr->family != AF_IEEE802154) {
++              err = -EINVAL;
+               goto out;
++      }
+       ieee802154_addr_from_sa(&haddr, &addr->addr);
+       dev = ieee802154_get_dev(sock_net(sk), &haddr);
index 88d2039e744335edb26c23403da31bb2986c75f6..1b5f80aa02e1f65399e7b6f1cf15877d258bec4d 100644 (file)
@@ -51,3 +51,5 @@ revert-scsi-lpfc-sli-path-split-refactor-scsi-paths.patch
 revert-scsi-lpfc-sli-path-split-refactor-fast-and-slow-paths-to-native-sli4.patch
 revert-scsi-lpfc-sli-path-split-refactor-lpfc_iocbq.patch
 mmc-block-remove-error-check-of-hw_reset-on-reset.patch
+ethtool-eeprom-fix-null-deref-on-genl_info-in-dump.patch
+net-ieee802154-fix-error-return-code-in-dgram_bind.patch