Patch "ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()" has been added to the 4.19-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

    ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()

to the 4.19-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:
     ca8210-fix-unsigned-mac_len-comparison-with-zero-in-.patch
and it can be found in the queue-4.19 subdirectory.

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



commit b132adcdc9ef43286ddfd3c43a7ad1b25a81e669
Author: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
Date:   Mon Mar 6 11:18:24 2023 -0800

    ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()
    
    [ Upstream commit 748b2f5e82d17480404b3e2895388fc2925f7caf ]
    
    mac_len is of type unsigned, which can never be less than zero.
    
            mac_len = ieee802154_hdr_peek_addrs(skb, &header);
            if (mac_len < 0)
                    return mac_len;
    
    Change this to type int as ieee802154_hdr_peek_addrs() can return negative
    integers, this is found by static analysis with smatch.
    
    Fixes: 6c993779ea1d ("ca8210: fix mac_len negative array access")
    Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
    Acked-by: Alexander Aring <aahringo@xxxxxxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230306191824.4115839-1-harshit.m.mogalapalli@xxxxxxxxxx
    Signed-off-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 2d4471b77fa7c..f75faec23cc98 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1943,10 +1943,9 @@ static int ca8210_skb_tx(
 	struct ca8210_priv  *priv
 )
 {
-	int status;
 	struct ieee802154_hdr header = { };
 	struct secspec secspec;
-	unsigned int mac_len;
+	int mac_len, status;
 
 	dev_dbg(&priv->spi->dev, "%s called\n", __func__);
 



[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