video: fbdev: smscufx: Fix null-ptr-deref in ufx_usb_probe()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3c8a63e22a0802fd56380f6ab305b419f18eb6f5 · < c420b540db4b5d69de0a36d8b9d9a6a79a04f05a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
video: fbdev: smscufx: Fix null-ptr-deref in ufx_usb_probe()
I got a null-ptr-deref report:
BUG: kernel NULL pointer dereference, address: 0000000000000000 ... RIP: 0010:fb_destroy_modelist+0x38/0x100 ... Call Trace: ufx_usb_probe.cold+0x2b5/0xac1 [smscufx] usb_probe_interface+0x1aa/0x3c0 [usbcore] really_probe+0x167/0x460 ... ret_from_fork+0x1f/0x30
If fb_alloc_cmap() fails in ufx_usb_probe(), fb_destroy_modelist() will be called to destroy modelist in the error handling path. But modelist has not been initialized yet, so it will result in null-ptr-deref.
Initialize modelist before calling fb_alloc_cmap() to fix this bug.
From the CVE record · Linux
The Linux kernel's smscufx USB probe can dereference a null pointer if fb_alloc_cmap() fails, because its error path destroys an uninitialized modelist. This can cause a kernel crash during device probing; the input does not establish whether an attacker can trigger it or what access would be required.
Engineers running Linux kernels with the smscufx driver should check their kernel's status; affected versions are not specified.