Patch "octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()" has been added to the 5.11-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

    octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()

to the 5.11-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:
     octeontx2-af-fix-an-off-by-one-in-rvu_dbg_qsize_writ.patch
and it can be found in the queue-5.11 subdirectory.

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



commit ba03296fe77e8240aa74ce0b031074c69478a8ff
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Fri Feb 19 12:56:32 2021 +0300

    octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()
    
    [ Upstream commit 3a2eb515d1367c0f667b76089a6e727279c688b8 ]
    
    This code does not allocate enough memory for the NUL terminator so it
    ends up putting it one character beyond the end of the buffer.
    
    Fixes: 8756828a8148 ("octeontx2-af: Add NPA aura and pool contexts to debugfs")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
index d27543c1a166a..bb3fdaf337519 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
@@ -385,7 +385,7 @@ static ssize_t rvu_dbg_qsize_write(struct file *filp,
 	u16 pcifunc;
 	int ret, lf;
 
-	cmd_buf = memdup_user(buffer, count);
+	cmd_buf = memdup_user(buffer, count + 1);
 	if (IS_ERR(cmd_buf))
 		return -ENOMEM;
 



[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