On Thu, Jan 24, 2013 at 9:57 AM, Maxime Villard <[email protected]> wrote:

> Hum here, if vp->v_type != VLNK, auio is untouched, but before returning
> we use auio.uio_resid, which is not initialized. Is it?
>

Nice catch.  We should probably move the *retval assignment up just after
the VOP_READLINK() call, since this can technically result in undefined
behavior if you try to readlink on a non-symlink file.

I don't think it should leak any information moment though, since the
EINVAL errno will take precedence instead of *retval when we return to
userspace.

Reply via email to