Skip to content

Commit 6ee9083

Browse files
committed
CHANGELOG: mention openat2 retry loop changes
Signed-off-by: Aleksa Sarai <[email protected]>
1 parent cc741d0 commit 6ee9083

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1919
and distributors can then opt-in to using `libpathrs` for the entire binary
2020
if they wish.
2121

22+
### Changed ###
23+
- `openat2` can return `-EAGAIN` if it detects a possible attack in certain
24+
scenarios (namely if there was a rename or mount while walking a path with a
25+
`..` component). While this is necessary to avoid a denial-of-service in the
26+
kernel, it does require retry loops in userspace. In previous versions,
27+
`pathrs-lite` would retry `openat2` 32 times before returning an error, but
28+
we've received user reports that this limit can be hit on systems with very
29+
heavy load. We have improved the situation in two ways:
30+
31+
* We have now increased this limit to 128, which should be good enough for
32+
most use-cases without becoming a denial-of-service vector (the number of
33+
syscalls called by the `O_PATH` resolver in a typical case is within the
34+
same ballpark).
35+
36+
* In addition, we now return a `unix.EAGAIN` error that is bubbled up and can
37+
be detected by callers. This means that callers with stricter requirements
38+
to avoid spurious errors can choose to do their own infinite `EAGAIN` retry
39+
loop.
40+
2241
## [0.5.0] - 2025-09-26 ##
2342

2443
> Let the past die. Kill it if you have to.

0 commit comments

Comments
 (0)