HomeFreeBSD

nameicap_check_dotdot: trim tracker on check

Description

nameicap_check_dotdot: trim tracker on check

Tracker should contain exactly the path from the starting directory to
the current lookup point. Otherwise we might not detect some cases of
dotdot escape. Consequently, if we are walking up the tree by dotdot
lookup, we must remove an entries below the walked directory.

Reviewed by: markj
Tested by: arichardson, pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D28907

Details

Provenance
kibAuthored on Feb 28 2021, 12:15 AM
Reviewer
markj
Differential Revision
D28907: open(2): Remove O_BENEATH and AT_BENEATH
Parents
rGe8a2862aa038: Add nameicap_cleanup_from(), to clean tracker list starting from some element
Branches
Unknown
Tags
Unknown