CVE-2023-52735: bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself

Description

In the Linux kernel, the following vulnerability has been resolved:

bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself

sock_map proto callbacks should never call themselves by design. Protect
against bugs like [1] and break out of the recursive loop to avoid a stack
overflow in favor of a resource leak.

[1] https://lore.kernel.org/all/[email protected]/

Classification

CVE ID: CVE-2023-52735

Affected Products

Vendor: Linux

Product: Linux

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.05% (probability of being exploited)

EPSS Percentile: 17.83% (scored less or equal to compared to others)

EPSS Date: 2025-02-04 (when was this score calculated)

References

https://git.kernel.org/stable/c/f312367f5246e04df564d341044286e9e37a97ba
https://git.kernel.org/stable/c/7499859881488da97589f3c79cc66fa75748ad49
https://git.kernel.org/stable/c/5b4a79ba65a1ab479903fff2e604865d229b70a9

Timeline