Re: [PATCH] kernel/kmod: fix use-after-free of the sub_info structure

From: Oleg Nesterov
Date: Thu Oct 16 2014 - 13:45:26 EST


On 10/17, Tetsuo Handa wrote:
>
> For both UMH_NO_WAIT and UMH_WAIT_EXEC cases,
>
> kernel_thread(call_helper, sub_info, CLONE_VFORK | SIGCHLD)
>
> in __call_usermodehelper() waits for do_execve() to succeed or do_exit(),

Well, not really. kernel_thread(CLONE_VFORK) waits for do_exit() or
exec_mmap(), and exec can fail after that.

Oleg.

--
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/