auxdisplay: line-display: fix NULL dereference in linedisp_release
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
auxdisplay: line-display: fix NULL dereference in linedisp_release
linedisp_release() currently retrieves the enclosing struct linedisp via to_linedisp(). That lookup depends on the attachment list, but the attachment may already have been removed before put_device() invokes the release callback. This can happen in linedisp_unregister(), and can also be reached from some linedisp_register() error paths.
In that case, to_linedisp() returns NULL and linedisp_release() dereferences it while freeing the display resources.
The struct device released here is the embedded linedisp->dev used by linedisp_register(), so retrieve the enclosing object directly with container_of() instead.
From the CVE record · Linux
The Linux kernel's auxdisplay line-display release callback can dereference a NULL pointer if its attachment has already been removed. This can occur during display unregistration or certain registration error paths and may crash the kernel. The input does not specify an attacker access requirement or user interaction.
Engineers running Linux kernels with the auxdisplay line-display component should check their kernel's status; affected versions are not specified.