Database/Kernel, userspace & hypervisor
Linux kernel bpf_link: freed too early while attached programs still dereference it
Impact
Some BPF program types receive their bpf_link as a runtime context and dereference it to look up data such as BPF cookies. Before this fix the link could be deallocated as soon as its refcount hit zero, while BPF programs attached through multi-kprobe, multi-uprobe or raw tracepoints were still executing and reading it - a use-after-free in kernel context. The fix defers dealloc until after an RCU grace period (RCU tasks trace first for sleepable programs). On a GPU node this matters because tracing-based observability and eBPF networking agents attach and detach these links continuously; a use-after-free in that path crashes or corrupts the host kernel, taking every tenant pod on the node with it. Reaching it requires the ability to load and attach BPF programs, so on a node where only the operator's agents hold CAP_BPF the practical exposure is a stability bug rather than a tenant escape.
Who can reach it
Local, authenticated: a process able to load and attach BPF programs (CAP_BPF/CAP_SYS_ADMIN, or root in a privileged container) that races detach against program execution. Unprivileged tenant pods without BPF capabilities cannot reach it.
What to do
Take the stable kernel update containing the fix for your series (commits linked in the record); no configuration mitigation exists other than not granting BPF load/attach rights. Applying it means a kernel update and a reboot, so drain the node and reboot it during a maintenance window.
References
Related entries
- Linux kernel (net/tls): Tls_init published the new sk_prot before the TLS context was fully initialized, so aCVE-2024-36489 · Linux kernel (net/tls)Medium
- Linux kernel amdkfd (KFD compute driver, /dev/kfd) (drm/amdkfd): Missing or insufficient validation of user-suppliedCVE-2024-36951 · Linux kernel amdkfd (KFD compute driver, /dev/kfd) (drm/amdkfd)Medium
- Linux kernel (drivers/gpu/drm/xe): A tenant's jobs can occupy the same copy engines the driver needs to service GPUCVE-2024-37026 · Linux kernel (drivers/gpu/drm/xe)Medium
- Linux kernel (drivers/gpu/drm): Three lines of userspace - mmap a GEM object with PROT_WRITE and MAP_PRIVATE, thenCVE-2024-39497 · Linux kernel (drivers/gpu/drm)Medium
- Linux kernel page cache (MAX_PAGECACHE_ORDER vs xarray limits in mm/filemap and mm/shmem): On arm64 kernels built withCVE-2024-41031 · Linux kernel page cache (MAX_PAGECACHE_ORDER vs xarray limits in mm/filemap and mm/shmem)Medium
- Linux kernel (drivers/vfio/pci): An uninitialized stack variable is used as the device count when a tenant asks vfioCVE-2024-41052 · Linux kernel (drivers/vfio/pci)Medium
This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.