[Bug libstdc++/104161] Potential Security Vulnerability: remove_all and symbolic link

jistone at redhat dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 27 01:51:51 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104161

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--- Comment #5 from Josh Stone <jistone at redhat dot com> ---
You also need to use openat, because O_NOFOLLOW only affects the *trailing*
component of the path. That is, if we're removing "/base" and you're down to
"/base/foo/bar", I could change "/base/foo" to a symlink and then you'll open
"/other/bar".


More information about the Gcc-bugs mailing list