{
  "id": "CVE-2025-39817",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39817",
  "published_at": "2025-09-16T13:00:17.776Z",
  "title": "efivarfs: Fix slab-out-of-bounds in efivarfs_d_compare",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.1,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/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\nefivarfs: Fix slab-out-of-bounds in efivarfs_d_compare\n\nObserved on kernel 6.6 (present on master as well):\n\n  BUG: KASAN: slab-out-of-bounds in memcmp+0x98/0xd0\n  Call trace:\n   kasan_check_range+0xe8/0x190\n   __asan_loadN+0x1c/0x28\n   memcmp+0x98/0xd0\n   efivarfs_d_compare+0x68/0xd8\n   __d_lookup_rcu_op_compare+0x178/0x218\n   __d_lookup_rcu+0x1f8/0x228\n   d_alloc_parallel+0x150/0x648\n   lookup_open.isra.0+0x5f0/0x8d0\n   open_last_lookups+0x264/0x828\n   path_openat+0x130/0x3f8\n   do_filp_open+0x114/0x248\n   do_sys_openat2+0x340/0x3c0\n   __arm64_sys_openat+0x120/0x1a0\n\nIf dentry-\u003ed_name.len \u003c EFI_VARIABLE_GUID_LEN , 'guid' can become\nnegative, leadings to oob. The issue can be triggered by parallel\nlookups using invalid filename:\n\n  T1\t\t\tT2\n  lookup_open\n   -\u003elookup\n    simple_lookup\n     d_add\n     // invalid dentry is added to hash list\n\n\t\t\tlookup_open\n\t\t\t d_alloc_parallel\n\t\t\t  __d_lookup_rcu\n\t\t\t   __d_lookup_rcu_op_compare\n\t\t\t    hlist_bl_for_each_entry_rcu\n\t\t\t    // invalid dentry can be retrieved\n\t\t\t     -\u003ed_compare\n\t\t\t      efivarfs_d_compare\n\t\t\t      // oob\n\nFix it by checking 'guid' before cmp.",
  "cwe": "CWE-125",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.1,
    "nvd": 7.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= da27a24383b2b10bf6ebd0db29b325548aafecb4, \u003c 0f63fbabeaaaaaaf5b742a2f4c1b4590d50bf1f6",
          "\u003e= da27a24383b2b10bf6ebd0db29b325548aafecb4, \u003c 794399019301944fd6d2e0d7a51b3327e26c410e",
          "\u003e= da27a24383b2b10bf6ebd0db29b325548aafecb4, \u003c 568e7761279b99c6daa3002290fd6d8047ddb6d2",
          "\u003e= da27a24383b2b10bf6ebd0db29b325548aafecb4, \u003c d7f5e35e70507d10cbaff5f9e194ed54c4ee14f7",
          "\u003e= da27a24383b2b10bf6ebd0db29b325548aafecb4, \u003c 925599eba46045930b850a98ae594d2e3028ac40",
          "\u003e= da27a24383b2b10bf6ebd0db29b325548aafecb4, \u003c c2925cd6207079c3f4d040d082515db78d63afbf",
          "\u003e= da27a24383b2b10bf6ebd0db29b325548aafecb4, \u003c 71581a82f38e5a4d807d71fc1bb59aead80ccf95",
          "\u003e= da27a24383b2b10bf6ebd0db29b325548aafecb4, \u003c a6358f8cf64850f3f27857b8ed8c1b08cfc4685c",
          "688289c4b745c018b3449b4b4c5a2030083c8eaf",
          "\u003e= 3.8.2, \u003c 3.9"
        ],
        "fixed_in": [
          "0f63fbabeaaaaaaf5b742a2f4c1b4590d50bf1f6",
          "794399019301944fd6d2e0d7a51b3327e26c410e",
          "568e7761279b99c6daa3002290fd6d8047ddb6d2",
          "d7f5e35e70507d10cbaff5f9e194ed54c4ee14f7",
          "925599eba46045930b850a98ae594d2e3028ac40",
          "c2925cd6207079c3f4d040d082515db78d63afbf",
          "71581a82f38e5a4d807d71fc1bb59aead80ccf95",
          "a6358f8cf64850f3f27857b8ed8c1b08cfc4685c",
          "3.9"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "3.9"
        ],
        "fixed_in": [
          "0",
          "5.4.298",
          "5.10.242",
          "5.15.191",
          "6.1.150",
          "6.6.104",
          "6.12.45",
          "6.16.5",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 0f63fbabeaaaaaaf5b742a2f4c1b4590d50bf1f6 or 794399019301944fd6d2e0d7a51b3327e26c410e or 568e7761279b99c6daa3002290fd6d8047ddb6d2 or d7f5e35e70507d10cbaff5f9e194ed54c4ee14f7 or 925599eba46045930b850a98ae594d2e3028ac40 or c2925cd6207079c3f4d040d082515db78d63afbf or 71581a82f38e5a4d807d71fc1bb59aead80ccf95 or a6358f8cf64850f3f27857b8ed8c1b08cfc4685c or 3.9 or later.",
      "Upgrade Linux to 0 or 5.4.298 or 5.10.242 or 5.15.191 or 6.1.150 or 6.6.104 or 6.12.45 or 6.16.5 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
