{"id":"CVE-2025-39840","published":"2025-09-19T15:26:15Z","modified":"2026-08-05T12:05:33Z","title":"audit: fix out-of-bounds read in audit_compare_dname_path()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"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 > 0 check to the while loop condition\nto prevent the out-of-bounds access.\n\n[PM: subject tweak, sign-off email fixes]","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00154,"percentile":0.04589,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://git.kernel.org/stable/c/9735a9dcc307427e7d6336c54171682f1bac9789","tags":[]},{"url":"https://git.kernel.org/stable/c/4540f1d23e7f387880ce46d11b5cd3f27248bf8d","tags":[]}],"priority":{"score":5.9,"factors":[{"name":"EPSS percentile","points":0.92},{"name":"CVSS severity","points":4.97}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= e92eebb0d6116f942ab25dfb1a41905aa59472a8, < 9735a9dcc307427e7d6336c54171682f1bac9789",">= e92eebb0d6116f942ab25dfb1a41905aa59472a8, < 4540f1d23e7f387880ce46d11b5cd3f27248bf8d"]},{"vendor":"Linux","product":"Linux","versions":["6.14"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-01-14T19:20:33.496174Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-30360","exploited":false,"provenance":"source"}}