Re: [PATCH] Yama: handle 32-bit userspace prctl

From: James Morris
Date: Fri Sep 07 2012 - 11:33:43 EST


On Mon, 27 Aug 2012, Kees Cook wrote:

> When running a 64-bit kernel and receiving prctls from a 32-bit
> userspace, the "-1" used as an unsigned long will end up being
> misdetected. The kernel is looking for 0xffffffffffffffff instead of
> 0xffffffff. Since prctl lacks a distinct compat interface, Yama needs
> to handle this translation itself. As such, support either value as
> meaning PR_SET_PTRACER_ANY, to avoid breaking the ABI for 64-bit.
>
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/