net: nexthop: Initialize all fields in dumped nexthops
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 430a049190de3c9e219f43084de9f1122da04570 · < a13d3864b76ac87085ec530b2ff8e37482a63a96| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: nexthop: Initialize all fields in dumped nexthops
struct nexthop_grp contains two reserved fields that are not initialized by nla_put_nh_group(), and carry garbage. This can be observed e.g. with strace (edited for clarity):
# ip nexthop add id 1 dev lo # ip nexthop add id 101 group 1 # strace -e recvmsg ip nexthop get id 101 ... recvmsg(... [{nla_len=12, nla_type=NHA_GROUP}, [{id=1, weight=0, resvd1=0x69, resvd2=0x67}]] ...) = 52
The fields are reserved and therefore not currently used. But as they are, they leak kernel memory, and the fact they are not just zero complicates repurposing of the fields for new ends. Initialize the full structure.
From the CVE record · Linux
The Linux kernel does not initialize two reserved fields in dumped nexthop groups, which can expose kernel memory. A local user who can request a nexthop dump can observe the fields; the input does not specify whether authentication or additional privileges are required.
Teams running Linux kernels should check their versions against their vendor's advisory; affected versions were not provided.