Patch "ca8210: fix mac_len negative array access" has been added to the 4.14-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 mac_len negative array access

to the 4.14-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-mac_len-negative-array-access.patch
and it can be found in the queue-4.14 subdirectory.

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



commit 25eceb89bd3c7678b3220a3bfda85dbcd0e2cb66
Author: Alexander Aring <aahringo@xxxxxxxxxx>
Date:   Thu Feb 16 23:25:04 2023 -0500

    ca8210: fix mac_len negative array access
    
    [ Upstream commit 6c993779ea1d0cccdb3a5d7d45446dd229e610a3 ]
    
    This patch fixes a buffer overflow access of skb->data if
    ieee802154_hdr_peek_addrs() fails.
    
    Reported-by: lianhui tang <bluetlh@xxxxxxxxx>
    Signed-off-by: Alexander Aring <aahringo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230217042504.3303396-1-aahringo@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 eff7571dbea20..76ca8c63bc379 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1955,6 +1955,8 @@ static int ca8210_skb_tx(
 	 * packet
 	 */
 	mac_len = ieee802154_hdr_peek_addrs(skb, &header);
+	if (mac_len < 0)
+		return mac_len;
 
 	secspec.security_level = header.sec.level;
 	secspec.key_id_mode = header.sec.key_id_mode;



[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