Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent freeing uninitialized pointer in compat_do_readv_writev
In 32-bit compatibility mode, the error handling for compat_do_readv_writev() may free an uninitialized pointer, potentially leading to all sorts of ugly memory corruption. This is reliably triggerable by unprivileged users by invoking the readv()/writev() syscalls with an invalid iovec pointer. The below patch fixes this to emulate the non-compat version. Introduced by commit b837336 ("compat: factor out compat_rw_copy_check_uvector from compat_do_readv_writev") Signed-off-by: Dan Rosenberg <[email protected]> Cc: [email protected] (2.6.35) Cc: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information