{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-50203", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-10-21T19:36:19.969Z", "datePublished": "2024-11-08T06:07:54.207Z", "dateUpdated": "2026-08-05T11:42:28.257Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:42:28.257Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, arm64: Fix address emission with tag-based KASAN enabled\n\nWhen BPF_TRAMP_F_CALL_ORIG is enabled, the address of a bpf_tramp_image\nstruct on the stack is passed during the size calculation pass and\nan address on the heap is passed during code generation. This may\ncause a heap buffer overflow if the heap address is tagged because\nemit_a64_mov_i64() will emit longer code than it did during the size\ncalculation pass. The same problem could occur without tag-based\nKASAN if one of the 16-bit words of the stack address happened to\nbe all-ones during the size calculation pass. Fix the problem by\nassuming the worst case (4 instructions) when calculating the size\nof the bpf_tramp_image address emission." } ], "metrics": [ { "cvssV3_1": { "version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH" }, "scenarios": [ { "lang": "en", "value": "AV:L - The vulnerable JIT path is reached only through the local `bpf()` syscall when attaching an fexit/fmod_ret tracing program or registering a struct_ops, which triggers `bpf_trampoline_update()` → `arch_bpf_trampoline_size()`/`arch_prepare_bpf_trampoline()`. There is no remote or adjacent-network path into arm64 trampoline code generation.\nAC:L - The attacker can attach and detach trampolines repeatedly, and with tag-based KASAN (KASAN_SW_TAGS/HW_TAGS, shipped in Android GKI kernels on MTE hardware) the tagged `kzalloc()` address routinely needs a 4-instruction encoding while the stack address needed only 3, so retrying until the size mismatch occurs is entirely under the attacker's control. Slab grooming further lets the attacker influence which address the `bpf_tramp_image` receives.\nPR:L - Loading and attaching the tracing/struct_ops program requires CAP_BPF plus CAP_PERFMON, which are held by ordinary non-root service accounts on real deployments (Android, tracing/observability daemons) and can be delegated into a user namespace via BPF tokens, so this is a low-privileged rather than full-root-only operation. No further authentication gate exists between the attach request and `prepare_trampoline()`.\nUI:N - The overflow happens synchronously inside the attacker's own `bpf()` syscall during trampoline code generation. No victim action, mount, or file open is needed.\nS:U - The corrupted `kvmalloc()` buffer and the truncated trampoline both live in kernel memory managed by the same security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - This is a heap out-of-bounds write past a kmalloc'd JIT scratch buffer, and `validate_code()` additionally reads out of bounds; such slab corruption is leverageable into an arbitrary-read primitive by grooming a useful victim object next to the allocation. The truncated trampoline can also transfer control into adjacent `bpf_prog_pack` code, exposing arbitrary kernel memory.\nI:H - The undercounted size causes instruction words to be written past the end of the heap allocation, corrupting neighbouring slab objects, and the installed executable trampoline is missing its epilogue/`RET` so the CPU runs off into adjacent JIT text. Both give control-flow-hijack potential in kernel context, i.e. arbitrary modification.\nA:H - Slab redzone/next-object corruption trips KASAN or slab debugging and the truncated trampoline falls through into `AARCH64_BREAK_FAULT` fill in the prog pack, producing a kernel oops/panic. This is triggerable at will, so the system can be crashed repeatedly." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "arch/arm64/net/bpf_jit_comp.c" ], "versions": [ { "version": "077149478497b2f00ff4fd9da2c892defa6418d8", "lessThan": "9e80f366ebfdfafc685fe83a84c34f7ef01cbe88", "status": "affected", "versionType": "git" }, { "version": "d9664e6ff040798a46cdc5d401064f55b8676c83", "lessThan": "f521c2a0c0c4585f36d912bf62c852b88682c4f2", "status": "affected", "versionType": "git" }, { "version": "19d3c179a37730caf600a97fed3794feac2b197b", "lessThan": "7db1a2121f3c7903b8e397392beec563c3d00950", "status": "affected", "versionType": "git" }, { "version": "19d3c179a37730caf600a97fed3794feac2b197b", "lessThan": "a552e2ef5fd1a6c78267cd4ec5a9b49aa11bbb1c", "status": "affected", "versionType": "git" }, { "version": "6d218fcc707d6b2c3616b6cd24b948fd4825cfec", "status": "affected", "versionType": "git" }, { "version": "6.10.3", "lessThan": "6.11", "status": "affected", "versionType": "semver" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "arch/arm64/net/bpf_jit_comp.c" ], "versions": [ { "version": "6.11", "status": "affected" }, { "version": "0", "lessThan": "6.11", "status": "unaffected", "versionType": "semver" }, { "version": "6.11.6", "lessThanOrEqual": "6.11.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.11", "versionEndExcluding": "6.11.6" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.11", "versionEndExcluding": "6.12" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.10.3" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/9e80f366ebfdfafc685fe83a84c34f7ef01cbe88" }, { "url": "https://git.kernel.org/stable/c/f521c2a0c0c4585f36d912bf62c852b88682c4f2" }, { "url": "https://git.kernel.org/stable/c/7db1a2121f3c7903b8e397392beec563c3d00950" }, { "url": "https://git.kernel.org/stable/c/a552e2ef5fd1a6c78267cd4ec5a9b49aa11bbb1c" } ], "title": "bpf, arm64: Fix address emission with tag-based KASAN enabled", "x_generator": { "engine": "bippy-1.2.0" } } } }