From: Greg Kroah-Hartman Date: Mon, 31 Oct 2022 10:05:52 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v4.19.263~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=349381c7be9b5d23b0c6e97f25b9bed1bcd05fb9;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: ethtool-eeprom-fix-null-deref-on-genl_info-in-dump.patch net-ieee802154-fix-error-return-code-in-dgram_bind.patch --- 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 index 00000000000..a92a768ba30 --- /dev/null +++ b/queue-5.15/ethtool-eeprom-fix-null-deref-on-genl_info-in-dump.patch @@ -0,0 +1,37 @@ +From 9d9effca9d7d7cf6341182a7c5cabcbd6fa28063 Mon Sep 17 00:00:00 2001 +From: Xin Long +Date: Fri, 21 Oct 2022 10:22:47 -0400 +Subject: ethtool: eeprom: fix null-deref on genl_info in dump + +From: Xin Long + +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 +Link: https://lore.kernel.org/r/5575919a2efc74cd9ad64021880afc3805c54166.1666362167.git.lucien.xin@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..e30f6d49e50 --- /dev/null +++ b/queue-5.15/net-ieee802154-fix-error-return-code-in-dgram_bind.patch @@ -0,0 +1,35 @@ +From 444d8ad4916edec8a9fc684e841287db9b1e999f Mon Sep 17 00:00:00 2001 +From: Wei Yongjun +Date: Mon, 19 Sep 2022 16:08:30 +0000 +Subject: net: ieee802154: fix error return code in dgram_bind() + +From: Wei Yongjun + +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 +Link: https://lore.kernel.org/r/20220919160830.1436109-1-weiyongjun@huaweicloud.com +Signed-off-by: Stefan Schmidt +Signed-off-by: Greg Kroah-Hartman +--- + 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); diff --git a/queue-5.15/series b/queue-5.15/series index 88d2039e744..1b5f80aa02e 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -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