vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c0cfa2d8a788fcf45df5bf4070ab2474c88d543a · < 91751e248256efc111e52e15115840c35d85abaf| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]
Recent reports have shown how we sometimes call vsock_*_has_data() when a vsock socket has been de-assigned from a transport (see attached links), but we shouldn't.
Previous commits should have solved the real problems, but we may have more in the future, so to avoid null-ptr-deref, we can return 0 (no space, no data available) but with a warning.
This way the code should continue to run in a nearly consistent state and have a warning that allows us to debug future problems.
From the CVE record · Linux
The Linux kernel’s vsock data and space checks can dereference a null pointer when a vsock socket has been de-assigned from its transport. The input does not specify how an attacker could trigger this condition or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with vsock support should check their versions; affected versions are not specified.