CVE-2024-50163
bpf: Make sure internal and UAPI bpf_redirect flags don't overlap
Reported by linux · Published November 7, 2024
In the Linux kernel, the following vulnerability has been resolved: bpf: Make sure internal and UAPI bpf_redirect flags don't overlap The bpf_redirect_info is shared between the SKB and XDP redirect paths, and the two paths use the same numeric flag values in the ri->flags field (specifically, BPF_F_BROADCAST == BPF_F_NEXTHOP). This means that if skb bpf_redirect_neigh() is used with a non-NULL params argument and, subsequently, an XDP redirect is performed using the same bpf_redirect_info struct, the XDP path will get confused and end up crashing, which syzbot managed to trigger. With the stack-allocated bpf_redirect_info, the structure is no longer shared between the SKB and XDP paths, so the crash doesn't happen anymore. However, different code paths using identically-numbered flag values in the same struct field still seems like a bit of a mess, so this patch cleans that up by moving the flag definitions together and redefining the three flags in BPF_F_REDIRECT_INTERNAL to not overlap with the flags used for XDP. It also adds a BUILD_BUG_ON() check to make sure the overlap is not re-introduced by mistake.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-headers | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 6.1.115-126.197.amzn2023 |
| bpftool | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-tools | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-libbpf-devel | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-livepatch-6.1.115-126.197 | Amazon Linux | 1.0-0.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | e624d4ed4aa8cc3c69d1359b0aaea539203ed266, e624d4ed4aa8cc3c69d1359b0aaea539203ed266, e624d4ed4aa8cc3c69d1359b0aaea539203ed266 |
| Linux | Linux | 5.14, 0, 5.15.170 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-livepatch-6.1.115-126.197 | 0 |
| linux | linux_kernel | 5.14, 5.14, 5.14 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| Linux | Linux | 6.6.59, 6.11.6, * |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | perf | 0 |
Timeline
- Nov 6, 2024 CVE Published
- Nov 7, 2024 Coalition ESS Score (19 in total, the first dated here)
- Nov 8, 2024 EPSS Score (30 in total, the first dated here)
- Dec 16, 2025 PoC Published
- Jan 2, 2026 Security Advisory (127 in total, the first dated here)
- Apr 29, 2026 Distribution Patch (114 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-50163
vulnetix vdb fixes CVE-2024-50163
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-50163/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart