Patch "media: em28xx: fix memory leak" has been added to the 5.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

    media: em28xx: fix memory leak

to the 5.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:
     media-em28xx-fix-memory-leak.patch
and it can be found in the queue-5.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 45ccb8852346c78b716287cd8b5d749ba9babb08
Author: Muhammad Usama Anjum <musamaanjum@xxxxxxxxx>
Date:   Wed Mar 24 19:07:53 2021 +0100

    media: em28xx: fix memory leak
    
    [ Upstream commit 0ae10a7dc8992ee682ff0b1752ff7c83d472eef1 ]
    
    If some error occurs, URB buffers should also be freed. If they aren't
    freed with the dvb here, the em28xx_dvb_fini call doesn't frees the URB
    buffers as dvb is set to NULL. The function in which error occurs should
    do all the cleanup for the allocations it had done.
    
    Tested the patch with the reproducer provided by syzbot. This patch
    fixes the memleak.
    
    Reported-by: syzbot+889397c820fa56adf25d@xxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Muhammad Usama Anjum <musamaanjum@xxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index fb9cbfa81a84..3cd9e9556fa9 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -1984,6 +1984,7 @@ ret:
 	return result;
 
 out_free:
+	em28xx_uninit_usb_xfer(dev, EM28XX_DIGITAL_MODE);
 	kfree(dvb);
 	dev->dvb = NULL;
 	goto ret;



[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