bpf: Fix insn_aux_data leak on verifier err_free_env path
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:
bpf: Fix insn_aux_data leak on verifier err_free_env path
When bpf_check() allocates env->insn_aux_data successfully but later fails to allocate env->succ, it jumps directly to err_free_env.
The existing vfree(env->insn_aux_data) sits before the err_free_env label, so that direct jump bypasses it and leaks insn_aux_data.
Move vfree(env->insn_aux_data) into err_free_env so all early and late exit paths release it consistently.
From the CVE record · Linux
The Linux kernel BPF verifier can leak memory when allocation of env->succ fails after env->insn_aux_data has been allocated. The input does not specify how an attacker could trigger this condition, whether authentication is needed, or whether user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified.