{"api_version":"1","generated_at":"2026-11-30T16:45:43+00:00","cve":"CVE-2026-139320","urls":{"html":"https://cve.report/CVE-2026-139320","api":"https://cve.report/api/cve/CVE-2026-139320.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139320","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139320"},"summary":{"title":"bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Look at all 64 bits of a BPF_JSET mask on 32-bit\n\nIn the branch of a BPF_JSET which is taken, the verifier can learn\nsomething about the register only if the mask has a single bit: then this\nbit is set. regs_refine_cond_op() tests this with is_power_of_2(val) and\nthen ORs val into var_off.\n\nval is a u64, but is_power_of_2() takes an unsigned long. On a 32-bit\nkernel it only sees the lower half of the mask. For\n\n\tif r1 & 0xffffffff80000000 goto l\n\nwhich is a BPF_JSET | BPF_K with an immediate of 0x80000000, the lower\nhalf is a power of two. So the verifier takes all 33 bits for set at l,\nwhile the branch is taken if any of them is. A mask of 0x100000001 from a\nregister does the same for bit 0.\n\nThe log of an i386 kernel, for r6 = bpf_get_prandom_u32() << 31:\n\n\t3: (45) if r6 & 0x80000000 goto pc+2\n\tfrom 3 to 6: R6=0xffffffff80000000 R10=fp0\n\t6: (77) r6 >>= 63                     ; R6=1\n\nWhen the program runs, r6 >> 63 is 0.\n\n>From then on the verifier works with known bits which the register does\nnot have at run time. It accepts, for example, an offset into a map value\nwhich it derives from these bits and believes to be constant, and the\nprogram can access memory outside of the map value.\n\nCount the bits of the whole value.\n\nOnly 32-bit kernels are affected. On a 64-bit kernel unsigned long holds\nthe whole mask, and this patch changes nothing.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:56","updated_at":"2026-11-30 14:18:56"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/5a9a6eb7bad37d72867734dc69f1b99a423cd50a","name":"https://git.kernel.org/stable/c/5a9a6eb7bad37d72867734dc69f1b99a423cd50a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a2c98b2a86b0f7011c9debf249208074bfb9c7f8","name":"https://git.kernel.org/stable/c/a2c98b2a86b0f7011c9debf249208074bfb9c7f8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5cea952976eb9b0b2dcc630dc87e207359b1292f","name":"https://git.kernel.org/stable/c/5cea952976eb9b0b2dcc630dc87e207359b1292f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ee4f44e0e3c8125eebe9ac967b6984bc9253d489","name":"https://git.kernel.org/stable/c/ee4f44e0e3c8125eebe9ac967b6984bc9253d489","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139320","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139320","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 960ea056561a08e2b837b2f02d22c53226414a84 5a9a6eb7bad37d72867734dc69f1b99a423cd50a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 960ea056561a08e2b837b2f02d22c53226414a84 5cea952976eb9b0b2dcc630dc87e207359b1292f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 960ea056561a08e2b837b2f02d22c53226414a84 a2c98b2a86b0f7011c9debf249208074bfb9c7f8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 960ea056561a08e2b837b2f02d22c53226414a84 ee4f44e0e3c8125eebe9ac967b6984bc9253d489 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.0","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.0 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["kernel/bpf/verifier.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"5a9a6eb7bad37d72867734dc69f1b99a423cd50a","status":"affected","version":"960ea056561a08e2b837b2f02d22c53226414a84","versionType":"git"},{"lessThan":"5cea952976eb9b0b2dcc630dc87e207359b1292f","status":"affected","version":"960ea056561a08e2b837b2f02d22c53226414a84","versionType":"git"},{"lessThan":"a2c98b2a86b0f7011c9debf249208074bfb9c7f8","status":"affected","version":"960ea056561a08e2b837b2f02d22c53226414a84","versionType":"git"},{"lessThan":"ee4f44e0e3c8125eebe9ac967b6984bc9253d489","status":"affected","version":"960ea056561a08e2b837b2f02d22c53226414a84","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["kernel/bpf/verifier.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.0"},{"lessThan":"5.0","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"5.0","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Look at all 64 bits of a BPF_JSET mask on 32-bit\n\nIn the branch of a BPF_JSET which is taken, the verifier can learn\nsomething about the register only if the mask has a single bit: then this\nbit is set. regs_refine_cond_op() tests this with is_power_of_2(val) and\nthen ORs val into var_off.\n\nval is a u64, but is_power_of_2() takes an unsigned long. On a 32-bit\nkernel it only sees the lower half of the mask. For\n\n\tif r1 & 0xffffffff80000000 goto l\n\nwhich is a BPF_JSET | BPF_K with an immediate of 0x80000000, the lower\nhalf is a power of two. So the verifier takes all 33 bits for set at l,\nwhile the branch is taken if any of them is. A mask of 0x100000001 from a\nregister does the same for bit 0.\n\nThe log of an i386 kernel, for r6 = bpf_get_prandom_u32() << 31:\n\n\t3: (45) if r6 & 0x80000000 goto pc+2\n\tfrom 3 to 6: R6=0xffffffff80000000 R10=fp0\n\t6: (77) r6 >>= 63                     ; R6=1\n\nWhen the program runs, r6 >> 63 is 0.\n\n>From then on the verifier works with known bits which the register does\nnot have at run time. It accepts, for example, an offset into a map value\nwhich it derives from these bits and believes to be constant, and the\nprogram can access memory outside of the map value.\n\nCount the bits of the whole value.\n\nOnly 32-bit kernels are affected. On a 64-bit kernel unsigned long holds\nthe whole mask, and this patch changes nothing."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:33:40.391Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/5a9a6eb7bad37d72867734dc69f1b99a423cd50a"},{"url":"https://git.kernel.org/stable/c/5cea952976eb9b0b2dcc630dc87e207359b1292f"},{"url":"https://git.kernel.org/stable/c/a2c98b2a86b0f7011c9debf249208074bfb9c7f8"},{"url":"https://git.kernel.org/stable/c/ee4f44e0e3c8125eebe9ac967b6984bc9253d489"}],"title":"bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139320","datePublished":"2026-11-30T13:33:40.391Z","dateReserved":"2026-11-30T13:22:15.927Z","dateUpdated":"2026-11-30T13:33:40.391Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:56","lastModifiedDate":"2026-11-30 14:18:56","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139320","Ordinal":"1","Title":"bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit","CVE":"CVE-2026-139320","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139320","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Look at all 64 bits of a BPF_JSET mask on 32-bit\n\nIn the branch of a BPF_JSET which is taken, the verifier can learn\nsomething about the register only if the mask has a single bit: then this\nbit is set. regs_refine_cond_op() tests this with is_power_of_2(val) and\nthen ORs val into var_off.\n\nval is a u64, but is_power_of_2() takes an unsigned long. On a 32-bit\nkernel it only sees the lower half of the mask. For\n\n\tif r1 & 0xffffffff80000000 goto l\n\nwhich is a BPF_JSET | BPF_K with an immediate of 0x80000000, the lower\nhalf is a power of two. So the verifier takes all 33 bits for set at l,\nwhile the branch is taken if any of them is. A mask of 0x100000001 from a\nregister does the same for bit 0.\n\nThe log of an i386 kernel, for r6 = bpf_get_prandom_u32() << 31:\n\n\t3: (45) if r6 & 0x80000000 goto pc+2\n\tfrom 3 to 6: R6=0xffffffff80000000 R10=fp0\n\t6: (77) r6 >>= 63                     ; R6=1\n\nWhen the program runs, r6 >> 63 is 0.\n\n>From then on the verifier works with known bits which the register does\nnot have at run time. It accepts, for example, an offset into a map value\nwhich it derives from these bits and believes to be constant, and the\nprogram can access memory outside of the map value.\n\nCount the bits of the whole value.\n\nOnly 32-bit kernels are affected. On a 64-bit kernel unsigned long holds\nthe whole mask, and this patch changes nothing.","Type":"Description","Title":"bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit"}]}}}