KEVWire

Security intelligence, with context.

Response snapshot Oct 29, 2026, 02:31 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-112935

filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders

The stale-lock break shared by SoftFileLock, MarkerSoftFileLock and SoftFileLease (and their async variants, and a FileLock that has fallen back to a soft lock on ENOSYS, the "not implemented" error) recognises the marker it judged stale by two values.

At a glance

Exploited
Not known
Severity
4.7 Medium (CVSS 3.1)
Chance of exploitation
0.1% in the next 30 days
Sources
1 source

What to do

GitHub lists first patched versions: filelock: 4.2.1. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-fq56-3cx3-fjxp (opens a new tab)

What happened

The stale-lock break shared by SoftFileLock, MarkerSoftFileLock and SoftFileLease (and their async variants, and a FileLock that has fallen back to a soft lock on ENOSYS, the "not implemented" error) recognises the marker it judged stale by two values. The marker is the lock file at , whose presence says a process holds the lock.

The values are its inode number (the kernel's identity for a file, independent of its name) and its modification time (mtime) not being newer. The check runs after the contender has already closed the marker, so nothing keeps the inode allocated.

On a filesystem that hands a freed inode number straight to the next file (ext4, xfs, overlayfs on them) the next holder's marker can carry that number. A contender still between its read and its break then renames and unlinks the live marker.

Another local user (the other user below) who can create files in the lock's directory, a sticky /tmp included (the sticky bit is a directory flag that lets only a file's owner remove it), forces this at will. It plants a marker with a stale owner record and a modification time in the future and unlinks it as soon as a contender has read it.

Continue reading

Two processes of the user running the lock (the lock user below) then hold the same default-configured lock at once, and nothing raises or logs. Affected versions: filelock >= 3.22.0 and mtime_before or current.st_ino != ino_before: return break_path: Final[str] = f"{lock_file}.break.{os.getpid()}.{secrets.token_hex(16)}" Path(lock_file).rename(break_path) if (st_after := os.lstat(break_path)).

st_mtime \n \n1\n and sets its time to the year 2100 with os.utime(). A live PID with a wrong start token (the value that identifies one incarnation of a PID) is a recycled PID, so every contender judges the owner stale. On its own this marker only makes the lock user's processes wait: they cannot rename another user's file in a sticky directory (EPERM, and acquire(timeout=1) raises Timeout`). 2.

A polls, reads (record, mtime=2100, ino=I), closes the file and enters owner_is_stale(). 3. The other user unlinks its marker. Inode I is free. 4. B polls. The path is empty, so O_EXCL (create only if absent) succeeds and ext4 gives the new marker inode number I. B holds the lock. 5. A reaches line 113 and looks at B's marker: its time (now) is not newer than 2100 and its inode number is I.

A renames it (it is the lock user's own file, so the sticky bit does not object), line 117 passes for the same reason, and line 118 unlinks the live marker. 6. The path is empty again while B is still inside. The next contender to poll, A included, creates its marker and holds the lock as well.

When B releases, _unlink_open_marker finds another file at the path and leaves it alone, so neither side raises or logs anything. This is not the documented rename/link-back window: the code does not take the link-back branch and leaves no app.lock.break.* file behind. With a marker dated 2000, line 113 sees a newer time on B's marker and returns.

The other user does not need luck for the timing of step 3. It sees A's close() through inotify (a Linux facility that reports file events; here IN_CLOSE_NOWRITE on its own file), and it chooses how long A stays in owner_is_stale(). To compare the start token, process_start_token() reads /proc/ /stat, and the kernel walks every thread of that process.

Measured as victim, owner_is_stale() takes a median of 19 µs for a dead PID and 931 µs for a process with 8000 idle threads. Step 4 then needs another contender's 50 ms poll to fall into that millisecond, and the other user retries at every release of the lock.

A forged time is not required, only convenient. File times advance in 4 ms steps, so a successor's marker created in the same step as the stale marker's last write compares equal and passes > / /stat of every process on the machine (7 ms with 500 processes, 45 ms with 3000, against the default 50 ms poll_interval). With 3000 idle processes of the other user, both jobs of the lock user were inside at once in 12 and 13 of 30 rounds.

MarkerSoftFileLock and SoftFileLease read with _read_lock_file() and call break_lock_file() in the same way, and showed the same overlap when a stall held A 3 s in its kill(pid, 0) probe. The malformed-marker self-heal in SoftFileLock hands break_lock_file() values from the same closed descriptor.

Where the lock user may rename the other user's file (it owns the sticky directory, or is root), the other user only acquires the free lock, dates the marker ahead and exits without releasing. The first contender then breaks that marker as designed and creates its own on the freed number, and a second contender that judged the planted marker before that break removes the live one.

Two of the project's own tests at the scanned commit hit the same case without any other user (test_stale_break_racing_a_successor_admits_no_third_holder, test_break_lock_file_leaves_a_swapped_in_symlink_aside), failing in 10 of 14 runs on ext4.

Reproduction

The scanner's reproducer for finding ANT-2026-KIIS96IX, as received, ran against commit b831496b0273ecd11bf02b8d080ca8b673a538c1. The repro script drives the files under repro.d/.

repro

#!/usr/bin/env python3
import os
import shutil
import subprocess
import sys

LOCK_DIR = "/tmp/shared-locks"
LOCK_PATH = f"{LOCK_DIR}/app.lock"
VICTIM_JOBS = 6
RUN_SECONDS = 20
JAN_1_2000 = 946684800
JAN_1_2100 = 4102444800

def run_victim_jobs_beside_attacker(stale_marker_mtime):
 # set up: an empty root-owned sticky directory, like /tmp (the sticky bit stops the attacker removing victim files)
 shutil.rmtree(LOCK_DIR, ignore_errors=True)
 os.mkdir(LOCK_DIR)
 os.chmod(LOCK_DIR, 0o1777)

 # run: nobody is paused or traced; the attacker and the victim's jobs just run side by side
 attacker = subprocess.Popen(
 [sys.executable, "/tmp/repro.d/plant_stale_markers.py", LOCK_PATH, str(stale_marker_mtim

Affected package ranges reported by GitHub:
filelock: >= 3.22.0, <= 4.2.0

Scores and how they were measured

CVSS base severity

4.7

Version 3.1As of

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

0.1%

Scored Percentile 2.8%

Model and measurement source (opens a new tab)

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-fq56-3cx3-fjxp (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-fq56-3cx3-fjxp, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

  3. Primary source

    FIRST measured EPSS score (opens a new tab)

    Measured EPSS probability and percentile for CVE-2026-112935, scored 2026-10-28. This is a model estimate, not proof of exposure.

    Published Checked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 28). filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders (CVE-2026-112935). https://kevwire.com/record/CVE-2026-112935

MLA

"filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders (CVE-2026-112935)." KEVWire, 28 Oct. 2026, kevwire.com/record/CVE-2026-112935.

Chicago

KEVWire. "filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders (CVE-2026-112935)." Last modified October 28, 2026. https://kevwire.com/record/CVE-2026-112935.

Evidence summary (plain text)

filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders (Oct 28, 2026).
The stale-lock break shared by SoftFileLock, MarkerSoftFileLock and SoftFileLease (and their async variants, and a FileLock that has fallen back to a soft lock on ENOSYS, the "not implemented" error) recognises the marker it judged stale by two values. The marker is the lock file at  , whose presence says a process holds the lock. The values are its inode number (the kernel's identity for a file, independent of its name) and its modification time (mtime) not being newer. The check runs after the contender has already closed the marker, so nothing keeps the inode allocated.
CVSS 4.7 (version 3.1; evidence as of Oct 28, 2026; https://github.com/advisories/GHSA-fq56-3cx3-fjxp).
EPSS 0.1% for the following 30 days, scored Oct 28, 2026 (https://api.first.org/data/v1/epss?cve=CVE-2026-112935&date=2026-10-28).
Sources:
GitHub-reviewed advisory GHSA-fq56-3cx3-fjxp: https://github.com/advisories/GHSA-fq56-3cx3-fjxp
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
FIRST measured EPSS score: https://api.first.org/data/v1/epss?cve=CVE-2026-112935&date=2026-10-28
Record ID: CVE-2026-112935.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 29, 2026, 02:16 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are coming as part of KEVWire Premium: join the waitlist. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail