]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Dec 2024 14:01:32 +0000 (15:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Dec 2024 14:01:32 +0000 (15:01 +0100)
added patches:
octeontx2-fix-condition.patch
octeontx2-pf-fix-otx2_get_fecparam.patch

queue-5.10/octeontx2-fix-condition.patch [new file with mode: 0644]
queue-5.10/octeontx2-pf-fix-otx2_get_fecparam.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/octeontx2-fix-condition.patch b/queue-5.10/octeontx2-fix-condition.patch
new file mode 100644 (file)
index 0000000..0ae6260
--- /dev/null
@@ -0,0 +1,27 @@
+From b0aae0bde26f276401640e05e81a8a0ce3d8f70e Mon Sep 17 00:00:00 2001
+From: "David S. Miller" <davem@davemloft.net>
+Date: Fri, 12 Feb 2021 16:56:08 -0800
+Subject: octeontx2: Fix condition.
+
+From: David S. Miller <davem@davemloft.net>
+
+commit b0aae0bde26f276401640e05e81a8a0ce3d8f70e upstream.
+
+Fixes: 93efb0c656837 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
++++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+@@ -801,7 +801,7 @@ static int otx2_get_fecparam(struct net_
+       if (IS_ERR(rsp))
+               return PTR_ERR(rsp);
+-      if (rsp->fwdata.supported_fec <= FEC_MAX_INDEX) {
++      if (rsp->fwdata.supported_fec < FEC_MAX_INDEX) {
+               if (!rsp->fwdata.supported_fec)
+                       fecparam->fec = ETHTOOL_FEC_NONE;
+               else
diff --git a/queue-5.10/octeontx2-pf-fix-otx2_get_fecparam.patch b/queue-5.10/octeontx2-pf-fix-otx2_get_fecparam.patch
new file mode 100644 (file)
index 0000000..c14c729
--- /dev/null
@@ -0,0 +1,36 @@
+From 38b5133ad607ecdcc8d24906d1ac9cc8df41acd5 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Wed, 17 Feb 2021 10:41:39 +0300
+Subject: octeontx2-pf: Fix otx2_get_fecparam()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 38b5133ad607ecdcc8d24906d1ac9cc8df41acd5 upstream.
+
+Static checkers complained about an off by one read overflow in
+otx2_get_fecparam() and we applied two conflicting fixes for it.
+
+Correct: b0aae0bde26f ("octeontx2: Fix condition.")
+  Wrong: 93efb0c65683 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
+
+Revert the incorrect fix.
+
+Fixes: 93efb0c65683 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
++++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+@@ -805,7 +805,7 @@ static int otx2_get_fecparam(struct net_
+               if (!rsp->fwdata.supported_fec)
+                       fecparam->fec = ETHTOOL_FEC_NONE;
+               else
+-                      fecparam->fec = fec[rsp->fwdata.supported_fec - 1];
++                      fecparam->fec = fec[rsp->fwdata.supported_fec];
+       }
+       return 0;
+ }
index 8cc6b211bda0fe1d03991ffa126df1c4f548c6fb..4a4e79d844ada015159dc9e2fc702ada28604be3 100644 (file)
@@ -456,3 +456,5 @@ scsi-sd-fix-sd_do_mode_sense-buffer-length-handling.patch
 scsi-core-fix-scsi_mode_select-buffer-length-handling.patch
 alsa-usb-audio-fix-out-of-bounds-reads-when-finding-clock-sources.patch
 media-uvcvideo-require-entities-to-have-a-non-zero-unique-id.patch
+octeontx2-fix-condition.patch
+octeontx2-pf-fix-otx2_get_fecparam.patch