{
  "id": "CVE-2026-31525",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-31525",
  "published_at": "2026-04-22T13:54:39.144Z",
  "title": "bpf: Fix undefined behavior in interpreter sdiv/smod for INT_MIN",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix undefined behavior in interpreter sdiv/smod for INT_MIN\n\nThe BPF interpreter's signed 32-bit division and modulo handlers use\nthe kernel abs() macro on s32 operands. The abs() macro documentation\n(include/linux/math.h) explicitly states the result is undefined when\nthe input is the type minimum. When DST contains S32_MIN (0x80000000),\nabs((s32)DST) triggers undefined behavior and returns S32_MIN unchanged\non arm64/x86. This value is then sign-extended to u64 as\n0xFFFFFFFF80000000, causing do_div() to compute the wrong result.\n\nThe verifier's abstract interpretation (scalar32_min_max_sdiv) computes\nthe mathematically correct result for range tracking, creating a\nverifier/interpreter mismatch that can be exploited for out-of-bounds\nmap value access.\n\nIntroduce abs_s32() which handles S32_MIN correctly by casting to u32\nbefore negating, avoiding signed overflow entirely. Replace all 8\nabs((s32)...) call sites in the interpreter's sdiv32/smod32 handlers.\n\ns32 is the only affected case -- the s64 division/modulo handlers do\nnot use abs().",
  "cwe": "CWE-190",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [
    {
      "repo": "HORKimhab/CVE-2026-31525",
      "url": "https://github.com/HORKimhab/CVE-2026-31525",
      "created_at": "2026-06-02T03:30:57Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "no",
      "kind": "writeup",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2018-07-12T07:48:30Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= ec0e2da95f72d4a46050a4d994e4fe471474fd80, \u003c 694ea55f1b1c74f9942d91ec366ae9e822422e42",
          "\u003e= ec0e2da95f72d4a46050a4d994e4fe471474fd80, \u003c 9ab1227765c446942f290c83382f0b19887c55cf",
          "\u003e= ec0e2da95f72d4a46050a4d994e4fe471474fd80, \u003c f14ca604c0ff274fba19f73f1f0485c0047c1396",
          "\u003e= ec0e2da95f72d4a46050a4d994e4fe471474fd80, \u003c 0d5d8c3ce45c734aaf3c51cbef59155a6746157d",
          "\u003e= ec0e2da95f72d4a46050a4d994e4fe471474fd80, \u003c c77b30bd1dcb61f66c640ff7d2757816210c7cb0"
        ],
        "fixed_in": [
          "694ea55f1b1c74f9942d91ec366ae9e822422e42",
          "9ab1227765c446942f290c83382f0b19887c55cf",
          "f14ca604c0ff274fba19f73f1f0485c0047c1396",
          "0d5d8c3ce45c734aaf3c51cbef59155a6746157d",
          "c77b30bd1dcb61f66c640ff7d2757816210c7cb0"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.6"
        ],
        "fixed_in": [
          "0",
          "6.6.131",
          "6.12.80",
          "6.18.21",
          "6.19.11",
          "7.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 694ea55f1b1c74f9942d91ec366ae9e822422e42 or 9ab1227765c446942f290c83382f0b19887c55cf or f14ca604c0ff274fba19f73f1f0485c0047c1396 or 0d5d8c3ce45c734aaf3c51cbef59155a6746157d or c77b30bd1dcb61f66c640ff7d2757816210c7cb0 or later.",
      "Upgrade Linux to 0 or 6.6.131 or 6.12.80 or 6.18.21 or 6.19.11 or 7.0 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
