{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-37893", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-04-16T04:51:23.964Z", "datePublished": "2025-04-18T07:01:28.856Z", "dateUpdated": "2026-08-05T11:58:07.979Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:58:07.979Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: BPF: Fix off-by-one error in build_prologue()\n\nVincent reported that running BPF progs with tailcalls on LoongArch\ncauses kernel hard lockup. Debugging the issues shows that the JITed\nimage missing a jirl instruction at the end of the epilogue.\n\nThere are two passes in JIT compiling, the first pass set the flags and\nthe second pass generates JIT code based on those flags. With BPF progs\nmixing bpf2bpf and tailcalls, build_prologue() generates N insns in the\nfirst pass and then generates N+1 insns in the second pass. This makes\nepilogue_offset off by one and we will jump to some unexpected insn and\ncause lockup. Fix this by inserting a nop insn." } ], "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 vulnerability is triggered through the bpf(BPF_PROG_LOAD) syscall when the LoongArch JIT compiles an attacker-supplied program, and the miscompiled image is executed via a locally attached socket filter. Per kernel scoring guidance, BPF is a local attack vector.\nAC:L - The miscompilation is fully deterministic — any program that sets both SAVE_RA and SAVE_TCC (one call plus one tail call) makes build_prologue() emit N+1 instructions in pass 2 versus N in pass 1. No race, no memory-layout luck, and the attacker authors the exact instruction sequence.\nPR:L - BPF_MAP_TYPE_PROG_ARRAY is an unprivileged map type in map_create(), bpf_tail_call_proto is returned before the CAP_BPF gate in bpf_base_func_proto(), and BPF_PROG_TYPE_SOCKET_FILTER loads without CAP_BPF, so an ordinary local user can reach this where unprivileged BPF is enabled or CAP_BPF is delegated to a service.\nUI:N - The attacker loads and attaches the BPF program to a socket it owns and triggers execution itself; no action by any other user is required.\nS:U - The corruption and the wrong control flow occur inside the kernel's own JIT image and exception table, within the same security authority as the kernel itself.\nC:H - The off-by-one epilogue branch executes an attacker-chosen instruction (e.g. a `ldd` load) with attacker-controlled register operands at kernel privilege, and the corrupted exception-table entry alters kernel fault fixup, both of which can be leveraged to read kernel memory.\nI:H - There is a 4-byte out-of-bounds write past prog_size into prog->aux->extable, plus attacker-directed execution of an arbitrary JIT-emitted instruction (including stores) with a mismatched stack frame — a kernel-mode write/control-flow primitive.\nA:H - The reported and confirmed symptom is a kernel hard lockup, since the mis-targeted branch can loop indefinitely in kernel context; any unprivileged user able to load such a program can wedge the machine." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "arch/loongarch/net/bpf_jit.c", "arch/loongarch/net/bpf_jit.h" ], "versions": [ { "version": "5dc615520c4dfb358245680f1904bad61116648e", "lessThan": "b3ffad2f02db4aace6799fe0049508b8925eae45", "status": "affected", "versionType": "git" }, { "version": "5dc615520c4dfb358245680f1904bad61116648e", "lessThan": "205a2182c51ffebaef54d643e3745e720cded08b", "status": "affected", "versionType": "git" }, { "version": "5dc615520c4dfb358245680f1904bad61116648e", "lessThan": "c74d95a5679741ef428974ab788f5b0758dc78ae", "status": "affected", "versionType": "git" }, { "version": "5dc615520c4dfb358245680f1904bad61116648e", "lessThan": "48b904de2408af5f936f0e03f48dfcddeab58aa0", "status": "affected", "versionType": "git" }, { "version": "5dc615520c4dfb358245680f1904bad61116648e", "lessThan": "7e2586991e36663c9bc48c828b83eab180ad30a9", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "arch/loongarch/net/bpf_jit.c", "arch/loongarch/net/bpf_jit.h" ], "versions": [ { "version": "6.1", "status": "affected" }, { "version": "0", "lessThan": "6.1", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.87", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.23", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.13.11", "lessThanOrEqual": "6.13.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.14.2", "lessThanOrEqual": "6.14.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.15", "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.1", "versionEndExcluding": "6.6.87" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1", "versionEndExcluding": "6.12.23" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1", "versionEndExcluding": "6.13.11" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1", "versionEndExcluding": "6.14.2" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1", "versionEndExcluding": "6.15" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/b3ffad2f02db4aace6799fe0049508b8925eae45" }, { "url": "https://git.kernel.org/stable/c/205a2182c51ffebaef54d643e3745e720cded08b" }, { "url": "https://git.kernel.org/stable/c/c74d95a5679741ef428974ab788f5b0758dc78ae" }, { "url": "https://git.kernel.org/stable/c/48b904de2408af5f936f0e03f48dfcddeab58aa0" }, { "url": "https://git.kernel.org/stable/c/7e2586991e36663c9bc48c828b83eab180ad30a9" } ], "title": "LoongArch: BPF: Fix off-by-one error in build_prologue()", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "problemTypes": [ { "descriptions": [ { "type": "CWE", "cweId": "CWE-193", "lang": "en", "description": "CWE-193 Off-by-one Error" } ] } ], "metrics": [ { "cvssV3_1": { "scope": "UNCHANGED", "version": "3.1", "baseScore": 5.5, "attackVector": "LOCAL", "baseSeverity": "MEDIUM", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "integrityImpact": "NONE", "userInteraction": "NONE", "attackComplexity": "LOW", "availabilityImpact": "HIGH", "privilegesRequired": "LOW", "confidentialityImpact": "NONE" } }, { "other": { "type": "ssvc", "content": { "timestamp": "2025-10-01T16:14:33.067841Z", "id": "CVE-2025-37893", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "version": "2.0.3" } } } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2025-10-01T16:14:37.219Z" } } ] } }