From: Greg Kroah-Hartman Date: Thu, 12 Dec 2024 14:01:32 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v5.4.287~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d5ff46175169fde3290e67b33390f4c9a1609c6;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: octeontx2-fix-condition.patch octeontx2-pf-fix-otx2_get_fecparam.patch --- diff --git a/queue-5.10/octeontx2-fix-condition.patch b/queue-5.10/octeontx2-fix-condition.patch new file mode 100644 index 00000000000..0ae62602570 --- /dev/null +++ b/queue-5.10/octeontx2-fix-condition.patch @@ -0,0 +1,27 @@ +From b0aae0bde26f276401640e05e81a8a0ce3d8f70e Mon Sep 17 00:00:00 2001 +From: "David S. Miller" +Date: Fri, 12 Feb 2021 16:56:08 -0800 +Subject: octeontx2: Fix condition. + +From: David S. Miller + +commit b0aae0bde26f276401640e05e81a8a0ce3d8f70e upstream. + +Fixes: 93efb0c656837 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()") +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..c14c729a195 --- /dev/null +++ b/queue-5.10/octeontx2-pf-fix-otx2_get_fecparam.patch @@ -0,0 +1,36 @@ +From 38b5133ad607ecdcc8d24906d1ac9cc8df41acd5 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 17 Feb 2021 10:41:39 +0300 +Subject: octeontx2-pf: Fix otx2_get_fecparam() + +From: Dan Carpenter + +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 +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + 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; + } diff --git a/queue-5.10/series b/queue-5.10/series index 8cc6b211bda..4a4e79d844a 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -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