{
  "id": "CVE-2025-39840",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39840",
  "published_at": "2025-09-19T15:26:15.596Z",
  "title": "audit: fix out-of-bounds read in audit_compare_dname_path()",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.1,
    "source": "cisa-adp",
    "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\naudit: fix out-of-bounds read in audit_compare_dname_path()\n\nWhen a watch on dir=/ is combined with an fsnotify event for a\nsingle-character name directly under / (e.g., creating /a), an\nout-of-bounds read can occur in audit_compare_dname_path().\n\nThe helper parent_len() returns 1 for \"/\". In audit_compare_dname_path(),\nwhen parentlen equals the full path length (1), the code sets p = path + 1\nand pathlen = 1 - 1 = 0. The subsequent loop then dereferences\np[pathlen - 1] (i.e., p[-1]), causing an out-of-bounds read.\n\nFix this by adding a pathlen \u003e 0 check to the while loop condition\nto prevent the out-of-bounds access.\n\n[PM: subject tweak, sign-off email fixes]",
  "cwe": "CWE-125",
  "cpes": [
    "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:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 7.1,
    "cna": 7.1,
    "nvd": 7.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= e92eebb0d6116f942ab25dfb1a41905aa59472a8, \u003c 9735a9dcc307427e7d6336c54171682f1bac9789",
          "\u003e= e92eebb0d6116f942ab25dfb1a41905aa59472a8, \u003c 4540f1d23e7f387880ce46d11b5cd3f27248bf8d"
        ],
        "fixed_in": [
          "9735a9dcc307427e7d6336c54171682f1bac9789",
          "4540f1d23e7f387880ce46d11b5cd3f27248bf8d"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.14"
        ],
        "fixed_in": [
          "0",
          "6.16.6",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 9735a9dcc307427e7d6336c54171682f1bac9789 or 4540f1d23e7f387880ce46d11b5cd3f27248bf8d or later.",
      "Upgrade Linux to 0 or 6.16.6 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
