net: pfcp: allocate per-cpu tstats for PFCP netdevs
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: pfcp: allocate per-cpu tstats for PFCP netdevs
PFCP uses dev_get_tstats64() as its ndo_get_stats64 callback, but pfcp_link_setup() does not request NETDEV_PCPU_STAT_TSTATS. The net core therefore leaves dev->tstats NULL for PFCP devices.
Creating a PFCP rtnetlink device can immediately ask the new netdev for stats while building the RTM_NEWLINK notification. That reaches dev_get_tstats64() and dereferences the NULL dev->tstats pointer.
Set pcpu_stat_type to NETDEV_PCPU_STAT_TSTATS during PFCP link setup so the net core allocates the storage expected by dev_get_tstats64().
From the CVE record · Linux
PFCP devices in the Linux kernel do not allocate the per-CPU statistics storage used by their statistics callback. Creating a PFCP rtnetlink device can trigger a NULL pointer dereference when the kernel gathers statistics for the new-link notification. The input does not specify the privileges needed to create the device.
Engineers running Linux kernels with PFCP netdev support should check whether their kernel includes the fix; affected versions are not specified.