bpf: Fix verifier assumptions about socket->sk
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix verifier assumptions about socket->sk The verifier assumes that 'sk' field in 'struct socket' is valid and non-NULL when 'socket' pointer itself is trusted and non-NULL. That may not be the case when socket was just created and passed to LSM socket_accept hook. Fix this verifier assumption and adjust tests.
02 / AFFECTED SOFTWARE
Affected packages
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix verifier assumptions about socket->sk The verifier assumes that 'sk' field in 'struct socket' is valid and non-NULL when 'socket' pointer itself is trusted and non-NULL. That may not be the case when socket was just created and passed to LSM socket_accept hook. Fix this verifier assumption and adjust tests.
05 / REFERENCES
Further evidence
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
- https://git.kernel.org/stable/c/0db63c0b86e981a1e97d2596d64ceceba1a5470e
- https://git.kernel.org/stable/c/39f8a29330f433000e716eefc4b9abda05b71a82
- https://git.kernel.org/stable/c/6f5ae91172a93abac9720ba94edf3ec8f4d7f24f
- https://git.kernel.org/stable/c/c58ccdd2483a1d990748cdaf94206b5d5986a001
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38566.json
- https://nvd.nist.gov/vuln/detail/CVE-2024-38566