media: vidtv: initialize local pointers upon transfer of memory ownership
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3be8037960bccd13052cfdeba8805ad785041d70 · < 30f4d4e5224a9e44e9ceb3956489462319d804ce| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: vidtv: initialize local pointers upon transfer of memory ownership
vidtv_channel_si_init() creates a temporary list (program, service, event) and ownership of the memory itself is transferred to the PAT/SDT/EIT tables through vidtv_psi_pat_program_assign(), vidtv_psi_sdt_service_assign(), vidtv_psi_eit_event_assign().
The problem here is that the local pointer where the memory ownership transfer was completed is not initialized to NULL. This causes the vidtv_psi_pmt_create_sec_for_each_pat_entry() function to fail, and in the flow that jumps to free_eit, the memory that was freed by vidtv_psi_*_table_destroy() can be accessed again by vidtv_psi_*_event_destroy() due to the uninitialized local pointer, so it is freed once again.
Therefore, to prevent use-after-free and double-free vulnerability, local pointers must be initialized to NULL when transferring memory ownership.
From the CVE record · Linux
The Linux kernel's vidtv component fails to clear local pointers after transferring memory ownership. If section creation fails and cleanup reaches the free_eit path, the same memory can be accessed or freed again. The input does not specify how an attacker could reach this path or whether access or user interaction is required.
Engineers running Linux kernels with the vidtv component should check their versions; affected versions are not specified.