wireguard: netlink: access device through ctx instead of peer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e7096c131e5161fa3b8e52a650d7719d2857adfd · < d44bd323d8bb8031eef4bdc44547925998a11e47| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wireguard: netlink: access device through ctx instead of peer
The previous commit fixed a bug that led to a NULL peer->device being dereferenced. It's actually easier and faster performance-wise to instead get the device from ctx->wg. This semantically makes more sense too, since ctx->wg->peer_allowedips.seq is compared with ctx->allowedips_seq, basing them both in ctx. This also acts as a defence in depth provision against freed peers.
From the CVE record · Linux
A bug in the Linux kernel’s WireGuard netlink code can dereference a NULL peer device pointer. The input does not specify what an attacker could do, how the bug could be reached, or whether authentication or user interaction is required.
Engineers running Linux kernels with WireGuard should check their kernel version against the vendor advisory; affected versions are not listed in the input.