tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk
In the Linux kernel, the following vulnerability has been resolved: tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk When the best clk is searched, we iterate over all possible clk. If we find a better match, the previous one, if any, needs to be freed. If a better match has already been found, we still need to free the new one, otherwise it leaks.
02 / AFFECTED SOFTWARE
Affected packages
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
In the Linux kernel, the following vulnerability has been resolved: tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk When the best clk is searched, we iterate over all possible clk. If we find a better match, the previous one, if any, needs to be freed. If a better match has already been found, we still need to free the new one, otherwise it leaks.
05 / REFERENCES
Further evidence
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
- https://git.kernel.org/stable/c/01dd8a43a84616c830782166ba3cceb01ad95363
- https://git.kernel.org/stable/c/1962717c4649e026a4252fe6625175affd28a593
- https://git.kernel.org/stable/c/1f426293fef1c13742b2a685bf7e363f51f6ee03
- https://git.kernel.org/stable/c/46574e5a0a2aee41e6ebb979cfe1dbaea8693e16
- https://git.kernel.org/stable/c/832e231cff476102e8204a9e7bddfe5c6154a375
- https://git.kernel.org/stable/c/933e5b2998bc3a527d15efbf1e97c9e63297aa3c
- https://git.kernel.org/stable/c/9dd8091959bc41fee51d0827276a2b982e84adf0
- https://git.kernel.org/stable/c/f0bf102ef9b05d7294bd8d506755465f6867d944
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53687.json
- https://nvd.nist.gov/vuln/detail/CVE-2023-53687