{"id":"CVE-2026-90157","aliases":["CVE-2026-90157"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Reject negative optlen in cgroup getsockopt hook","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject negative optlen in cgroup getsockopt hook\n\nA cgroup getsockopt BPF program can shrink ctx->optlen after the\nkernel getsockopt handler has run. The kernel-buffer variant, used by\nTCP_ZEROCOPY_RECEIVE, only rejects values larger than the original\nlength.\n\nIf BPF writes a negative optlen, that value is accepted and propagated\nback to the TCP getsockopt code. It can then be passed to\ncopy_to_sockptr() as a size_t and trigger the hardened usercopy\nbytes > INT_MAX warning.\n\nReject negative ctx.optlen in __cgroup_bpf_run_filter_getsockopt_kern(),\nmatching the lower-bound validation already present in the sockptr-based\ngetsockopt hook.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject negative optlen in cgroup getsockopt hook\n\nA cgroup getsockopt BPF program can shrink ctx->optlen after the\nkernel getsockopt handler has run. The kernel-buffer variant, used by\nTCP_ZEROCOPY_RECEIVE, only rejects values larger than the original\nlength.\n\nIf BPF writes a negative optlen, that value is accepted and propagated\nback to the TCP getsockopt code. It can then be passed to\ncopy_to_sockptr() as a size_t and trigger the hardened usercopy\nbytes > INT_MAX warning.\n\nReject negative ctx.optlen in __cgroup_bpf_run_filter_getsockopt_kern(),\nmatching the lower-bound validation already present in the sockptr-based\ngetsockopt hook.","source":"cvelist"}],"published":"2026-09-17T16:06:49.081Z","modified":"2026-10-19T09:19:05.677Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"08f61a34913558e06576e7b6318bf583f273c1be","fixed":"5b09d984b38b018b123c3a9e02a96bbc6468dbe5","status":"affected"},{"type":"git","introduced":"9cacf81f8161111db25f98e78a7a0e32ae142b3f","fixed":"554ba7195c4108726450e24480c8449990c2268c","status":"affected"},{"type":"git","introduced":"9cacf81f8161111db25f98e78a7a0e32ae142b3f","fixed":"d02a12b4085ffe41ea750b1007f7a9c7aee2875a","status":"affected"},{"type":"git","introduced":"9cacf81f8161111db25f98e78a7a0e32ae142b3f","fixed":"e6fbf0eba87f50084d67508898f6ad6fc7ff1ba2","status":"affected"},{"type":"git","introduced":"9cacf81f8161111db25f98e78a7a0e32ae142b3f","fixed":"f68671b1a98d426c57864bd457c125fee14ac1a5","status":"affected"},{"type":"git","introduced":"9cacf81f8161111db25f98e78a7a0e32ae142b3f","fixed":"2bdbe00454200fcb0110f31eeca8d906a3515e74","status":"affected"},{"type":"git","introduced":"9cacf81f8161111db25f98e78a7a0e32ae142b3f","fixed":"31a89af4f513d750fec196e2bb6195a7d4473e9f","status":"affected"},{"type":"git","introduced":"9cacf81f8161111db25f98e78a7a0e32ae142b3f","fixed":"1b5aacd5b2419b0790e955e466d389a61c79b4b1","status":"affected"},{"type":"semver","introduced":"5.10.188","fixed":"5.10.270","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.12","status":"unaffected"},{"type":"semver","introduced":"5.10.270","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.221","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.188","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.157","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.110","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.52","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.6","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/5b09d984b38b018b123c3a9e02a96bbc6468dbe5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/554ba7195c4108726450e24480c8449990c2268c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d02a12b4085ffe41ea750b1007f7a9c7aee2875a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e6fbf0eba87f50084d67508898f6ad6fc7ff1ba2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f68671b1a98d426c57864bd457c125fee14ac1a5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2bdbe00454200fcb0110f31eeca8d906a3515e74","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/31a89af4f513d750fec196e2bb6195a7d4473e9f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1b5aacd5b2419b0790e955e466d389a61c79b4b1","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-90157","url":"https://www.cve.org/CVERecord?id=CVE-2026-90157","licence":"CVE Terms of Use","modified":"2026-10-19T08:58:55.961Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-90157","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-90157","licence":"Public domain","modified":"2026-10-19T09:19:05.677Z"}],"updatedAt":"2026-11-25T22:59:39.321Z","epss":{"score":0.00216,"percentile":0.12843,"date":"2026-12-01T12:00:22.000Z"}}