]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nameicap_check_dotdot: trim tracker on check
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 28 Feb 2021 00:15:21 +0000 (02:15 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 2 Mar 2021 18:21:35 +0000 (20:21 +0200)
commit49c98a4bf3a87ace0df99056fa683805c1645e61
tree703a7919b387ba39457882b50efcc2c1e3f1073d
parente8a2862aa0384c75603f801625e309a3dae0ed05
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
sys/kern/vfs_lookup.c