genetlink: pin family module during policy dump
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d07dcf9aadd6b2842b439e8668ff7ea2873f28d7 · < 508387ad95ef9c13aa6431678c39763e882da2dc| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
genetlink: pin family module during policy dump
The generic netlink controller's policy dump keeps pointers to the target family's operation and policy tables in its callback state. A dump may be split across multiple skbs and remain pending after the initial request.
Netlink pins the module which owns the dump callback, but in this case that is the controller's owner rather than the target family's owner. The target family can consequently be unregistered and its module unloaded while a policy dump is pending. Advancing the dump then dereferences policy memory from the unloaded module.
Take a reference to the target family's module when the dump starts. Drop it from the error and done paths. This matches the lifetime for which the dump context retains the family and policy pointers.
From the CVE record · Linux
The generic netlink controller can retain pointers to a target family's policy after that family's module is unloaded. If a policy dump is still pending when the module unloads, advancing the dump can dereference freed memory. The input does not specify whether authentication, network access, or user interaction is required.
Engineers running the Linux kernel should check their systems; affected versions are not specified.