netfilter: x_tables: avoid leaking percpu counter pointers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 71ae0dff02d756e4d2ca710b79f2ff5390029a5f · < 08a3e218064db11f154ad9ad5541751ea7f34ebe| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: x_tables: avoid leaking percpu counter pointers
The native and compat get-entries paths copy the fixed rule entry header from the kernelized rule blob to userspace before overwriting the entry's counter fields with a sanitized counter snapshot.
On SMP kernels, entry->counters.pcnt contains the percpu allocation address used by x_tables rule counters. A caller can provide a userspace buffer that faults during the initial fixed-header copy after pcnt has been copied but before the later sanitized counter copy runs. The syscall then returns -EFAULT while leaving the raw percpu pointer in userspace.
Copy only the fixed entry prefix before counters from the kernelized rule blob, then copy the sanitized counter snapshot into the counter field. Apply this ordering to the IPv4, IPv6, and ARP native and compat get-entries implementations so a fault cannot expose the internal percpu counter pointer.
From the CVE record · Linux
The Linux kernel's netfilter x_tables get-entries paths can expose an internal per-CPU counter pointer to userspace. On SMP kernels, a caller can trigger the disclosure by supplying a userspace buffer that faults during the initial rule-header copy, before the counter fields are sanitized. The input does not specify whether authentication or additional privileges are required.
Engineers running Linux kernels with netfilter x_tables should check their installations; affected versions are not specified.