Skip to content
Heist/ feed
Back to feed
UnratedFix available

bpf: Reject >8 byte return values on return-reading trampoline paths

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject >8 byte return values on return-reading trampoline paths btf_distill_func_proto() builds the function model used for the fentry/fexit/fmod_ret/fsession trampolines and struct_ops. It has accepted a 16-byte __int128 return value since the trampoline was introduced: __get_type_size() returns the integer's type size, and the return-type check only rejected ret < 0. But the BPF trampoline preserves only 8 bytes of the return value (RAX on x86, i.e. R0). For an attach type that reads the target's return value the second half (RDX / R3) is neither saved nor restored, so a program attached to a function returning a 16-byte value corrupts the value seen by the real caller and itself observes only half of it. struct_ops trampolines have the same limitation. This affects the attach types that read the target's return value: fexit, fmod_ret and fsession (plus the _multi variants of fexit and fsession), and struct_ops. fentry/fentry_multi run before the target returns and are unaffected. Reject a >8 byte return value for these attach types in bpf_check_attach_target() and bpf_check_attach_btf_id_multi(), and for struct_ops in bpf_struct_ops_desc_init().

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.114, 6.18.57, 7.2.6
CVEs
CVE-2026-90359
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 06:15 UTC · Revision 1

Source evidence

bpf: Reject >8 byte return values on return-reading trampoline paths

core-osv · Original source

Published 17 Sept 2026, 16:09 UTC

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject >8 byte return values on return-reading trampoline paths btf_distill_func_proto() builds the function model used for the fentry/fexit/fmod_ret/fsession trampolines and struct_ops. It has accepted a 16-byte __int128 return value since the trampoline was introduced: __get_type_size() returns the integer's type size, and the return-type check only rejected ret < 0. But the BPF trampoline preserves only 8 bytes of the return value (RAX on x86, i.e. R0). For an attach type that reads the target's return value the second half (RDX / R3) is neither saved nor restored, so a program attached to a function returning a 16-byte value corrupts the value seen by the real caller and itself observes only half of it. struct_ops trampolines have the same limitation. This affects the attach types that read the target's return value: fexit, fmod_ret and fsession (plus the _multi variants of fexit and fsession), and struct_ops. fentry/fentry_multi run before the target returns and are unaffected. Reject a >8 byte return value for these attach types in bpf_check_attach_target() and bpf_check_attach_btf_id_multi(), and for struct_ops in bpf_struct_ops_desc_init().

osv:CVE-2026-90359

Kernel

Fixed versions: 6.12.114, 6.18.57, 7.2.6

Complete source record
{
  "id": "c94be3e3be34d152628381da57897b101a0ba69fca251c61fa957d91e287a6f0",
  "url": "https://osv.dev/vulnerability/CVE-2026-90359",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "bpf: Reject >8 byte return values on return-reading trampoline paths",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: bpf: Reject >8 byte return values on return-reading trampoline paths btf_distill_func_proto() builds the function model used for the fentry/fexit/fmod_ret/fsession trampolines and struct_ops. It has accepted a 16-byte __int128 return value since the trampoline was introduced: __get_type_size() returns the integer's type size, and the return-type check only rejected ret < 0. But the BPF trampoline preserves only 8 bytes of the return value (RAX on x86, i.e. R0). For an attach type that reads the target's return value the second half (RDX / R3) is neither saved nor restored, so a program attached to a function returning a 16-byte value corrupts the value seen by the real caller and itself observes only half of it. struct_ops trampolines have the same limitation. This affects the attach types that read the target's return value: fexit, fmod_ret and fsession (plus the _multi variants of fexit and fsession), and struct_ops. fentry/fentry_multi run before the target returns and are unaffected. Reject a >8 byte return value for these attach types in bpf_check_attach_target() and bpf_check_attach_btf_id_multi(), and for struct_ops in bpf_struct_ops_desc_init().",
    "evidence": "osv:CVE-2026-90359",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.114",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.57",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.2.6",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-90359",
      "aliases": [
        "CVE-2026-90359"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "fec56f5890d93fc2ed74166c397dc186b1c25951"
                },
                {
                  "fixed": "de54ba33690d2dd3c4aa686c9693505644285b0b"
                },
                {
                  "fixed": "9a9e902bd0556052534641f7d5f868c6dc4b84ae"
                },
                {
                  "fixed": "d36ac53fc83baf843c51b7afd6d2471f36b713d8"
                },
                {
                  "fixed": "c48796aa6c392cde93946e5d5a9a1f1b1cf72feb"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-90359.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "6.12.114"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.57"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.2.6"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-90359.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:43.016352820Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/9a9e902bd0556052534641f7d5f868c6dc4b84ae",
        "https://git.kernel.org/stable/c/c48796aa6c392cde93946e5d5a9a1f1b1cf72feb",
        "https://git.kernel.org/stable/c/d36ac53fc83baf843c51b7afd6d2471f36b713d8",
        "https://git.kernel.org/stable/c/de54ba33690d2dd3c4aa686c9693505644285b0b",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/90xxx/CVE-2026-90359.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-90359",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/90xxx/CVE-2026-90359.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-90359",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 511024,
  "published_at": "2026-09-17T16:09:04.187+00:00"
}