media: tegra-video: Fix memory leak in __tegra_channel_try_format()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1ebaeb09830f36c1111b72a95420814225bd761c · < 43e5302d22334f1183dec3e0d5d8007eefe2817c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: tegra-video: Fix memory leak in __tegra_channel_try_format()
The state object allocated by __v4l2_subdev_state_alloc() must be freed with __v4l2_subdev_state_free() when it is no longer needed.
In __tegra_channel_try_format(), two error paths return directly after v4l2_subdev_call() fails, without freeing the allocated 'sd_state' object. This violates the requirement and causes a memory leak.
Fix this by introducing a cleanup label and using goto statements in the error paths to ensure that __v4l2_subdev_state_free() is always called before the function returns.
From the CVE record · Linux
The Linux kernel’s tegra-video driver leaks an allocated state object when a subdevice call fails in __tegra_channel_try_format(). The input does not establish how an attacker could trigger this failure or whether access or user interaction is required.
Engineers running Linux kernels with the tegra-video driver should check their kernel versions; affected versions are not specified.