Linux · Linux Kernel · CVE-2023-52637
**Name of the Vulnerable Software and Affected Versions**
Linux kernel versions prior to 6.5.0-rc5
**Description**
The vulnerability is a use-after-free (UAF) bug in the j1939 sk match filter function during setsockopt(SO J1939 FILTER) calls. This occurs when the setsockopt call modifies the jsk->filters while receiving packets, and the jsk->sk is not properly locked to prevent the UAF. The bug can be triggered by a slab-use-after-free in j1939 sk recv match one, which can lead to a read of size 4 at an invalid address.
**Recommendations**
To resolve this issue, update the Linux kernel to a version that includes the fix for this vulnerability. Specifically, versions 6.5.0-rc5 and later should be used. For versions prior to 6.5.0-rc5, consider applying the patch that fixes the UAF bug in j1939 sk match filter. As a temporary workaround, consider disabling the j1939 sk match filter function until a patch is available. However, this may have performance implications and should be carefully evaluated before implementation.