{
  "cveId": "CVE-2025-40079",
  "url": "https://patchblox.com/security/cve/CVE-2025-40079",
  "summary": "CVE-2025-40079 is fixed in linux on 1 platform, first by DEBIAN-CVE-2025-40079, released October 28, 2025. It is not reported as exploited. Patch Radar priority: High.",
  "title": "riscv, bpf: Sign extend struct ops return values properly",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  riscv, bpf: Sign extend struct ops return values properly  The ns_bpf_qdisc selftest triggers a kernel panic:      Unable to handle kernel paging request at virtual address ffffffffa38dbf58     Current test_progs pgtable: 4K pagesize, 57-bit VAs, pgdp=0x00000001109cc000     [ffffffffa38dbf58] pgd=000000011fffd801, p4d=000000011fffd401, pud=000000011fffd001, pmd=0000000000000000     Oops [#1]     Modules linked in: bpf_testmod(OE) xt_conntrack nls_iso8859_1 [...] [last unloaded: bpf_testmod(OE)]     CPU: 1 UID: 0 PID: 23584 Comm: test_progs Tainted: G        W  OE       6.17.0-rc1-g2465bb83e0b4 #1 NONE     Tainted: [W]=WARN, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE     Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2024.01\u002Bdfsg-1ubuntu5.1 01/01/2024     epc : __qdisc_run\u002B0x82/0x6f0      ra : __qdisc_run\u002B0x6e/0x6f0     epc : ffffffff80bd5c7a ra : ffffffff80bd5c66 sp : ff2000000eecb550      gp : ffffffff82472098 tp : ff60000096895940 t0 : ffffffff8001f180      t1 : ffffffff801e1664 t2 : 0000000000000000 s0 : ff2000000eecb5d0      s1 : ff60000093a6a600 a0 : ffffffffa38dbee8 a1 : 0000000000000001      a2 : ff2000000eecb510 a3 : 0000000000000001 a4 : 0000000000000000      a5 : 0000000000000010 a6 : 0000000000000000 a7 : 0000000000735049      s2 : ffffffffa38dbee8 s3 : 0000000000000040 s4 : ff6000008bcda000      s5 : 0000000000000008 s6 : ff60000093a6a680 s7 : ff60000093a6a6f0      s8 : ff60000093a6a6ac s9 : ff60000093140000 s10: 0000000000000000      s11: ff2000000eecb9d0 t3 : 0000000000000000 t4 : 0000000000ff0000      t5 : 0000000000000000 t6 : ff60000093a6a8b6     status: 0000000200000120 badaddr: ffffffffa38dbf58 cause: 000000000000000d     [\u003Cffffffff80bd5c7a\u003E] __qdisc_run\u002B0x82/0x6f0     [\u003Cffffffff80b6fe58\u003E] __dev_queue_xmit\u002B0x4c0/0x1128     [\u003Cffffffff80b80ae0\u003E] neigh_resolve_output\u002B0xd0/0x170     [\u003Cffffffff80d2daf6\u003E] ip6_finish_output2\u002B0x226/0x6c8     [\u003Cffffffff80d31254\u003E] ip6_finish_output\u002B0x10c/0x2a0     [\u003Cffffffff80d31446\u003E] ip6_output\u002B0x5e/0x178     [\u003Cffffffff80d2e232\u003E] ip6_xmit\u002B0x29a/0x608     [\u003Cffffffff80d6f4c6\u003E] inet6_csk_xmit\u002B0xe6/0x140     [\u003Cffffffff80c985e4\u003E] __tcp_transmit_skb\u002B0x45c/0xaa8     [\u003Cffffffff80c995fe\u003E] tcp_connect\u002B0x9ce/0xd10     [\u003Cffffffff80d66524\u003E] tcp_v6_connect\u002B0x4ac/0x5e8     [\u003Cffffffff80cc19b8\u003E] __inet_stream_connect\u002B0xd8/0x318     [\u003Cffffffff80cc1c36\u003E] inet_stream_connect\u002B0x3e/0x68     [\u003Cffffffff80b42b20\u003E] __sys_connect_file\u002B0x50/0x88     [\u003Cffffffff80b42bee\u003E] __sys_connect\u002B0x96/0xc8     [\u003Cffffffff80b42c40\u003E] __riscv_sys_connect\u002B0x20/0x30     [\u003Cffffffff80e5bcae\u003E] do_trap_ecall_u\u002B0x256/0x378     [\u003Cffffffff80e69af2\u003E] handle_exception\u002B0x14a/0x156     Code: 892a 0363 1205 489c 8bc1 c7e5 2d03 084a 2703 080a (2783) 0709     ---[ end trace 0000000000000000 ]---  The bpf_fifo_dequeue prog returns a skb which is a pointer. The pointer is treated as a 32bit value and sign extend to 64bit in epilogue. This behavior is right for most bpf prog types but wrong for struct ops which requires RISC-V ABI.  So let\u0027s sign extend struct ops return values according to the function model and RISC-V ABI([0]).    [0]: https://riscv.org/wp-content/uploads/2024/12/riscv-calling.pdf",
  "published": "2025-10-28T12:15:42Z",
  "severity": "Moderate",
  "cvss": 7.8,
  "cvssVector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
  "epss": 0.00152,
  "epssPercentile": 0.04397,
  "priority": "High",
  "priorityTier": 3,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "vendorAdvisory": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-40079",
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "6.12.57-1",
      "fix": "DEBIAN-CVE-2025-40079",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2025-40079",
      "released": "2025-10-28T12:15:42Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "6.17.6-1",
      "fix": "DEBIAN-CVE-2025-40079",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2025-40079",
      "released": "2025-10-28T12:15:42Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T13:06:02Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}