{"id":"CVE-2025-40050","state":"PUBLISHED","title":"bpf: Skip scalar adjustment for BPF_NEG if dst is a pointer","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Skip scalar adjustment for BPF_NEG if dst is a pointer\n\nIn check_alu_op(), the verifier currently calls check_reg_arg() and\nadjust_scalar_min_max_vals() unconditionally for BPF_NEG operations.\nHowever, if the destination register holds a pointer, these scalar\nadjustments are unnecessary and potentially incorrect.\n\nThis patch adds a check to skip the adjustment logic when the destination\nregister contains a pointer.","publishedAt":"2025-10-28T11:48:26.654Z","updatedAt":"2026-05-11T21:41:30.716Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"aced132599b3c8884c050218d4c48eef203678f6","status":"affected","lessThan":"b9ef4963227246b9222e1559ddeec8e7af63e6c6","versionType":"git"},{"version":"aced132599b3c8884c050218d4c48eef203678f6","status":"affected","lessThan":"34904582b502a86fdb4d7984b12cacd2faabbe0d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.17.3","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]}],"references":["https://git.kernel.org/stable/c/b9ef4963227246b9222e1559ddeec8e7af63e6c6","https://git.kernel.org/stable/c/34904582b502a86fdb4d7984b12cacd2faabbe0d"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40050.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40050","state":"PUBLISHED","datePublished":"2025-10-28T11:48:26.654Z","dateUpdated":"2026-05-11T21:41:30.716Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.157Z"},"containers":{"cna":{"title":"bpf: Skip scalar adjustment for BPF_NEG if dst is a pointer","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Skip scalar adjustment for BPF_NEG if dst is a pointer\n\nIn check_alu_op(), the verifier currently calls check_reg_arg() and\nadjust_scalar_min_max_vals() unconditionally for BPF_NEG operations.\nHowever, if the destination register holds a pointer, these scalar\nadjustments are unnecessary and potentially incorrect.\n\nThis patch adds a check to skip the adjustment logic when the destination\nregister contains a pointer."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"aced132599b3c8884c050218d4c48eef203678f6","status":"affected","lessThan":"b9ef4963227246b9222e1559ddeec8e7af63e6c6","versionType":"git"},{"version":"aced132599b3c8884c050218d4c48eef203678f6","status":"affected","lessThan":"34904582b502a86fdb4d7984b12cacd2faabbe0d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.17.3","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b9ef4963227246b9222e1559ddeec8e7af63e6c6"},{"url":"https://git.kernel.org/stable/c/34904582b502a86fdb4d7984b12cacd2faabbe0d"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:41:30.716Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.17.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}