blob: 8e5c08d18f21d1afd5afc44bd39059c7131e5c40 [file]
The Linux kernel vulnerability CVE-2020-36786 occurs in the `atomisp-lm3554.c` file within the staging media driver for AtomISP. Specifically, when the `lm3554_platform_data_func` call returns an error, a memory leak is introduced on the error return path of the object flash.
This issue arises because there was no error handling mechanism in place to free the `flash` object in case of an error. To fix this vulnerability, an error return path was added to release the `flash` object and prevent the memory leak. Additionally, labels were renamed (`fail2` to `fail3` and `fail1` to `fail2`) to ensure proper error handling.
The vulnerability was introduced in Linux kernel version 5.10 with commit `9289cdf39992` and has been fixed in various subsequent kernel versions, including 5.10.37, 5.11.21, 5.12.4, and 5.13, with corresponding commits `cc4cc2fb5aaf`, `4f0f37d03cde`, `27d2eab69f7d`, and `6045b01dd0e3`.