Skip to content

Commit 08fce32

Browse files
committed
proc: remove safety warning comment
With commit c41bcd7 ("proc: switch to much safer resolver for non-openat2 systems"), the primary safety benefits of libpathrs's procfs resolver are now available within filepath-securejoin. This comment is now outdated. Fixes: c41bcd7 ("proc: switch to much safer resolver for non-openat2 systems") Signed-off-by: Aleksa Sarai <[email protected]>
1 parent 5e78ca5 commit 08fce32

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

procfs_linux.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,6 @@ var errUnsafeProcfs = errors.New("unsafe procfs detected")
216216
// [os.File]: https://pkg.go.dev/os#File
217217
type ProcThreadSelfCloser func()
218218

219-
// NOTE: THIS IS NOT YET SAFE TO EXPORT. The non-openat2(2) case is just using
220-
// a plain openat(2), which is not entirely safe against overmount attacks.
221-
// Yes, if we are using fsopen(2) or open_tree(2) (without AT_RECURSIVE), then
222-
// this is safe, but we shouldn't make less privileged users (or users on older
223-
// kernels) incorrectly assume this is safe. libpathrs does it correctly, and
224-
// it's best to leave it to them.
225219
func procThreadSelf(procRoot *os.File, subpath string) (_ *os.File, _ ProcThreadSelfCloser, Err error) {
226220
// If called from the external API, procRoot will be nil, so just get the
227221
// global root handle. It's also possible one of our tests calls this with

0 commit comments

Comments
 (0)