Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
veth: fix NAPI leak in XDP enable error path
During XDP enablement in veth, if xdp_rxq_info_reg() or xdp_rxq_info_reg_mem_model() fails, the driver rolls back the changes.
However, the rollback loop: for (i–; i >= start; i–) {
decrements the loop index ‘i’ before the first iteration. This correctly skips unregistering the rxq for the failed index ‘i’ (as registration failed or was already cleaned up), but it also erroneously skips calling netif_napi_deli() for rq[i].xdp_napi.
Since netif_napi_add() was already called for index ‘i’, this leaves a dangling napi_struct in the device’s napi_list. When the veth device is later destroyed, the freed queue memory (which contains the leaked NAPI structure) can be reused.
The subsequent device teardown iterates the NAPI list and corrupts the reallocated memory, leading to UAF.
Fix this by explicitly deleting the NAPI association for the failed index ‘i’ before rolling back the successfully configured queues.
Details
- Affected product:
- AlmaLinux 9.2 ESU , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , Debian 10 ELS , TuxCare 9.6 ESU , TuxCare 9.8 ESU , Ubuntu 20.04 ELS
- Affected packages:
- linux @ 4.19.0 (+7 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| Amazon Linux 2023 | Planned | — |
| Debian 12 | Released |
42 kernels
|
| Debian 13 | Released |
13 kernels
|
| Oracle Linux 8 UEK 7 | Released |
112 kernels
|
| Oracle Linux 9 UEK 7 | Released |
112 kernels
|
| Proxmox VE 7 5.15 | In Rollout |
47 kernels
|
| Ubuntu 20.04 HWE AWS | In Rollout |
57 kernels
|
| Ubuntu 22.04 | Released |
102 kernels
|
| Ubuntu 22.04 AWS | Released |
93 kernels
|
| Ubuntu 22.04 Azure | Released |
83 kernels
|
| Ubuntu 24.04 | Planned | — |
| Ubuntu 24.04 AWS | Planned | — |
| Ubuntu 26.04 | In Rollout |
2 kernels
|