{"id":"CVE-2025-71074","title":"functionfs: fix the open/removal races","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nfunctionfs: fix the open/removal races\n\nffs_epfile_open() can race with removal, ending up with file->private_data\npointing to freed object.\n\nThere is a total count of …","severity":"high","cvss":7.8,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","cvssSource":"cna","vendor":"Linux","product":"Linux","affected":["Linux >= ddf8abd2599491cbad959c700b90ba72a5dce8d0 < 585a656283c954337036422afcd9cb70dd4135e7","Linux >= ddf8abd2599491cbad959c700b90ba72a5dce8d0 < 75240e5e51c6e6d67a3039384125fa54259a3926","Linux >= ddf8abd2599491cbad959c700b90ba72a5dce8d0 < e5bf5ee266633cb18fff6f98f0b7d59a62819eee","Linux 2.6.35"],"published":"2026-01-13","updated":"2026-10-21","sourceUpdated":"2026-10-21T12:38:33.246Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-71074","references":[{"url":"https://git.kernel.org/stable/c/585a656283c954337036422afcd9cb70dd4135e7"},{"url":"https://git.kernel.org/stable/c/75240e5e51c6e6d67a3039384125fa54259a3926"},{"url":"https://git.kernel.org/stable/c/e5bf5ee266633cb18fff6f98f0b7d59a62819eee"}],"tags":["cve.org"],"epss":0.00131,"epssPercentile":0.02655,"ingestedAt":"2026-10-21T12:48:53.674Z","slug":"CVE-2025-71074","body":"## Overview\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nfunctionfs: fix the open/removal races\n\nffs_epfile_open() can race with removal, ending up with file->private_data\npointing to freed object.\n\nThere is a total count of opened files on functionfs (both ep0 and\ndynamic ones) and when it hits zero, dynamic files get removed.\nUnfortunately, that removal can happen while another thread is\nin ffs_epfile_open(), but has not incremented the count yet.\nIn that case open will succeed, leaving us with UAF on any subsequent\nread() or write().\n\nThe root cause is that ffs->opened is misused; atomic_dec_and_test() vs.\natomic_add_return() is not a good idea, when object remains visible all\nalong.\n\nTo untangle that\n\t* serialize openers on ffs->mutex (both for ep0 and for dynamic files)\n\t* have dynamic ones use atomic_inc_not_zero() and fail if we had\nzero ->opened; in that case the file we are opening is doomed.\n\t* have the inodes of dynamic files marked on removal (from the\ncallback of simple_recursive_removal()) - clear ->i_private there.\n\t* have open of dynamic ones verify they hadn't been already removed,\nalong with checking that state is FFS_ACTIVE.\n\n## Affected\n\n- `Linux >= ddf8abd2599491cbad959c700b90ba72a5dce8d0 < 585a656283c954337036422afcd9cb70dd4135e7`\n- `Linux >= ddf8abd2599491cbad959c700b90ba72a5dce8d0 < 75240e5e51c6e6d67a3039384125fa54259a3926`\n- `Linux >= ddf8abd2599491cbad959c700b90ba72a5dce8d0 < e5bf5ee266633cb18fff6f98f0b7d59a62819eee`\n- `Linux 2.6.35`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"twilight","depthScore":43,"depthScoreParts":{"impact":42.9,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}