Patch "media: gspca/sq905.c: fix uninitialized variable" has been added to the 5.4-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

    media: gspca/sq905.c: fix uninitialized variable

to the 5.4-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:
     media-gspca-sq905.c-fix-uninitialized-variable.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 1339552288d078d8c420229635dd6b79c5efe5ee
Author: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
Date:   Thu Mar 11 15:46:40 2021 +0100

    media: gspca/sq905.c: fix uninitialized variable
    
    [ Upstream commit eaaea4681984c79d2b2b160387b297477f0c1aab ]
    
    act_len can be uninitialized if usb_bulk_msg() returns an error.
    Set it to 0 to avoid a KMSAN error.
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Reported-by: syzbot+a4e309017a5f3a24c7b3@xxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/usb/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c
index 863c485f4275..65a74060986a 100644
--- a/drivers/media/usb/gspca/sq905.c
+++ b/drivers/media/usb/gspca/sq905.c
@@ -158,7 +158,7 @@ static int
 sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock)
 {
 	int ret;
-	int act_len;
+	int act_len = 0;
 
 	gspca_dev->usb_buf[0] = '\0';
 	if (need_lock)



[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