Skip to content

Commit f8a4dc5

Browse files
author
Desnes Nunes
committed
media: uvcvideo: Fix deadlock during uvc_probe
JIRA: https://issues.redhat.com/browse/RHEL-78828 CVE: CVE-2024-58059 commit a67f75c Author: Ricardo Ribalda <ribalda@chromium.org> Date: Tue, 22 Oct 2024 08:30:30 +0000 CVE: CVE-2024-58059 If uvc_probe() fails, it can end up calling uvc_status_unregister() before uvc_status_init() is called. Fix this by checking if dev->status is NULL or not in uvc_status_unregister(). Reported-by: syzbot+9446d5e0d25571e6a212@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-media/20241020160249.GD7770@pendragon.ideasonboard.com/T/#m506744621d72a2ace5dd2ab64055be9898112dbd Fixes: c5fe3ed ("media: uvcvideo: Avoid race condition during unregister") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241022-race-unreg-v1-1-2212f364d9de@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Desnes Nunes <desnesn@redhat.com>
1 parent 1a66107 commit f8a4dc5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/media/usb/uvc/uvc_status.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ int uvc_status_init(struct uvc_device *dev)
294294

295295
void uvc_status_unregister(struct uvc_device *dev)
296296
{
297+
if (!dev->status)
298+
return;
299+
297300
uvc_status_suspend(dev);
298301
uvc_input_unregister(dev);
299302
}

0 commit comments

Comments
 (0)