can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path
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 |
|
|
5.14.195.15.35.16In the Linux kernel, the following vulnerability has been resolved:
can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path
In es58x_rx_err_msg(), if can->do_set_mode() fails, the function directly returns without calling netif_rx(skb). This means that the skb previously allocated by alloc_can_err_skb() is not freed. In other terms, this is a memory leak.
This patch simply removes the return statement in the error branch and let the function continue.
Issue was found with GCC -fanalyzer, please follow the link below for details.
From the CVE record · Linux
The Linux kernel’s etas_es58x driver leaks an allocated network buffer in es58x_rx_err_msg() when can->do_set_mode() fails. The input does not describe how an attacker could trigger this condition or specify network, authentication, or user-interaction requirements.
Anyone running a Linux kernel with the etas_es58x driver should check their version; affected versions are not specified.