bpf: Disallow bpf_skb_pull_data() for LWT_SEG6LOCAL
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 004d4b274e2a1a895a0e5dc66158b90a7d463d44 · < 37b18688cd18fd86d2f35c212df1611862a26cd5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Disallow bpf_skb_pull_data() for LWT_SEG6LOCAL
An LWT_SEG6LOCAL program can invalidate its cached SRH with bpf_lwt_seg6_adjust_srh() and then call bpf_skb_pull_data(). The latter may reallocate skb->head, leaving the per-CPU SRH pointer dangling. Post-program SRH validation then writes through that pointer.
Disallow bpf_skb_pull_data() for LWT_SEG6LOCAL programs so the verifier rejects this unsafe helper combination. Other LWT program types continue to expose the helper through lwt_out_func_proto().
From the CVE record · Linux
An LWT_SEG6LOCAL BPF program can call bpf_lwt_seg6_adjust_srh() followed by bpf_skb_pull_data(), leaving a dangling pointer if the latter reallocates skb->head. Subsequent SRH validation writes through that pointer. Exploitation requires the ability to run such a program; the input does not specify authentication or user-interaction requirements.
Engineers running the Linux kernel should check their kernel version; affected versions are not specified.