Openbsd update recommendation

Matthias Urlichs matthias at urlichs.de
Sat Jun 2 13:56:33 CEST 2018


On 02.06.2018 05:15, Jason A. Donenfeld wrote:
> # ksh -c pwd
> /root/a
>
> That's pretty weird behavior, but maybe there's an interesting reason
> for it

Yes.

# mv ../a ../xx
# /bin/pwd

Basically you have three choices, (a) check whether $PWD points to the
current directory, (b) reconstruct the current path by walking up and
"readdir()" on each level, (c) ask the kernel.

In order to make some interesting attacks via symlinks more difficult,
(b) is somewhat safer. However, it's also significantly more expensive.
(c) works on Linux, just readlink("/proc/self/cwd"); it's equivalent to
(b). I don't know whether OpenBSD can do that, though.

-- 
-- Matthias Urlichs



More information about the WireGuard mailing list