[Ocfs2-devel] [patch 01/10] ocfs2: do not write error flag to user structure we cannot copy from/to
Mark Fasheh
mfasheh at suse.de
Wed Aug 13 10:49:11 PDT 2014
On Wed, Aug 06, 2014 at 01:32:00PM -0700, Andrew Morton wrote:
> From: Ben Hutchings <ben at decadent.org.uk>
> Subject: ocfs2: do not write error flag to user structure we cannot copy from/to
>
> If we failed to copy from the structure, writing back the flags leaks 31
> bits of kernel memory (the rest of the ir_flags field).
>
> In any case, if we cannot copy from/to the structure, why should we expect
> putting just the flags to work?
>
> Also make sure ocfs2_info_handle_freeinode() returns the right error code
> if the copy_to_user() fails.
>
> Fixes: ddee5cdb70e6 ('Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v8.')
> Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
> Cc: Joel Becker <jlbec at evilplan.org>
> Cc: Mark Fasheh <mfasheh at suse.com>
> Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
This looks good, thanks Ben!
Reviewed-by: Mark Fasheh <mfasheh at suse.de>
--Mark
--
Mark Fasheh
More information about the Ocfs2-devel
mailing list