Patch "net: dsa: mv88e6xxx: Fix out-of-bound access" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: dsa: mv88e6xxx: Fix out-of-bound access

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-dsa-mv88e6xxx-fix-out-of-bound-access.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e824326b868c630ae7789b334f71992a005bf4c2
Author: Joseph Huang <Joseph.Huang@xxxxxxxxxx>
Date:   Mon Aug 19 19:52:50 2024 -0400

    net: dsa: mv88e6xxx: Fix out-of-bound access
    
    [ Upstream commit 528876d867a23b5198022baf2e388052ca67c952 ]
    
    If an ATU violation was caused by a CPU Load operation, the SPID could
    be larger than DSA_MAX_PORTS (the size of mv88e6xxx_chip.ports[] array).
    
    Fixes: 75c05a74e745 ("net: dsa: mv88e6xxx: Fix counting of ATU violations")
    Signed-off-by: Joseph Huang <Joseph.Huang@xxxxxxxxxx>
    Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
    Link: https://patch.msgid.link/20240819235251.1331763-1-Joseph.Huang@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa/mv88e6xxx/global1_atu.c
index ce3b3690c3c05..c47f068f56b32 100644
--- a/drivers/net/dsa/mv88e6xxx/global1_atu.c
+++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c
@@ -457,7 +457,8 @@ static irqreturn_t mv88e6xxx_g1_atu_prob_irq_thread_fn(int irq, void *dev_id)
 		trace_mv88e6xxx_atu_full_violation(chip->dev, spid,
 						   entry.portvec, entry.mac,
 						   fid);
-		chip->ports[spid].atu_full_violation++;
+		if (spid < ARRAY_SIZE(chip->ports))
+			chip->ports[spid].atu_full_violation++;
 	}
 
 	return IRQ_HANDLED;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux