CVE-2024-50056 usb: gadget: uvc: Fix ERR_PTR dereference in uvc_v4l2.c

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel USB gadget driver can cause a system crash when specific USB video class operations are performed.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-50056?

CVE-2024-50056 is a medium-severity vulnerability in Linux kernel, published on 21 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: uvc: Fix ERR_PTR dereference in uvc_v4l2.c

Fix potential dereferencing of ERR_PTR() in find_format_by_pix() and uvc_v4l2_enum_format().

Fix the following smatch errors:

drivers/usb/gadget/function/uvc_v4l2.c:124 find_format_by_pix() error: 'fmtdesc' dereferencing possible ERR_PTR()

drivers/usb/gadget/function/uvc_v4l2.c:392 uvc_v4l2_enum_format() error: 'fmtdesc' dereferencing possible ERR_PTR()

Also, fix similar issue in uvc_v4l2_try_format() for potential dereferencing of ERR_PTR().

Weakness: CWE-476

Which versions are affected by CVE-2024-50056?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-50056?

Apply the vendor's patch.

Is CVE-2024-50056 being exploited?

There is no known exploitation of CVE-2024-50056 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-50056, DEBIAN-CVE-2024-50056, GHSA-x464-67pg-rxcc, ROOT-OS-DEBIAN-11-CVE-2024-50056, ROOT-OS-UBUNTU-2204-CVE-2024-50056, UBUNTU-CVE-2024-50056.

Is CVE-2024-50056 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free