{
  "id": "CVE-2025-71074",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-71074",
  "published_at": "2026-01-13T15:31:27.413Z",
  "title": "functionfs: fix the open/removal races",
  "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\nfunctionfs: fix the open/removal races\n\nffs_epfile_open() can race with removal, ending up with file-\u003eprivate_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-\u003eopened 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-\u003emutex (both for ep0 and for dynamic files)\n\t* have dynamic ones use atomic_inc_not_zero() and fail if we had\nzero -\u003eopened; 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 -\u003ei_private there.\n\t* have open of dynamic ones verify they hadn't been already removed,\nalong with checking that state is FFS_ACTIVE.",
  "cwe": "CWE-362",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.35:-:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 4.7
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= ddf8abd2599491cbad959c700b90ba72a5dce8d0, \u003c e002b3c1e6a0faa53329ef0d21e6351bcece6edb",
          "\u003e= ddf8abd2599491cbad959c700b90ba72a5dce8d0, \u003c 585a656283c954337036422afcd9cb70dd4135e7",
          "\u003e= ddf8abd2599491cbad959c700b90ba72a5dce8d0, \u003c 75240e5e51c6e6d67a3039384125fa54259a3926",
          "\u003e= ddf8abd2599491cbad959c700b90ba72a5dce8d0, \u003c e5bf5ee266633cb18fff6f98f0b7d59a62819eee"
        ],
        "fixed_in": [
          "e002b3c1e6a0faa53329ef0d21e6351bcece6edb",
          "585a656283c954337036422afcd9cb70dd4135e7",
          "75240e5e51c6e6d67a3039384125fa54259a3926",
          "e5bf5ee266633cb18fff6f98f0b7d59a62819eee"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.35"
        ],
        "fixed_in": [
          "0",
          "6.1.191",
          "6.6.160",
          "6.12.114",
          "6.19"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to e002b3c1e6a0faa53329ef0d21e6351bcece6edb or 585a656283c954337036422afcd9cb70dd4135e7 or 75240e5e51c6e6d67a3039384125fa54259a3926 or e5bf5ee266633cb18fff6f98f0b7d59a62819eee or later.",
      "Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.114 or 6.19 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
