lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFLxGvz8KV=zzy=fijEuK7qtCivS=A2BBpNvNksv4J06KTSmZw@mail.gmail.com>
Date:   Tue, 18 Oct 2016 14:22:07 +0200
From:   Richard Weinberger <richard.weinberger@...il.com>
To:     Eric Biggers <ebiggers@...gle.com>
Cc:     linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
        "Theodore Ts'o" <tytso@....edu>, jaegeuk@...nel.org,
        David Gstir <david@...ma-star.at>
Subject: Re: [PATCH] fscrypto: move ioctl processing more fully into common code

Eric,

On Mon, Oct 17, 2016 at 6:54 PM, Eric Biggers <ebiggers@...gle.com> wrote:
> Multiple bugs were recently fixed in the "set encryption policy" ioctl.
> To make it clear that fscrypt_process_policy() and fscrypt_get_policy()
> implement ioctls and therefore their implementations must take standard
> security and correctness precautions, rename them to
> fscrypt_ioctl_set_policy() and fscrypt_ioctl_get_policy().  Make the
> latter take in a struct file * to make it consistent with the former.
>
> In addition, make the common functions do the copies to and from
> userspace rather than duplicating this code within each filesystem, and
> memset the policy to 0 to make it clear there is no stack leak.
>
> Signed-off-by: Eric Biggers <ebiggers@...gle.com>
> ---
>  fs/crypto/policy.c       | 36 +++++++++++++++++++++++-------------
>  fs/ext4/ext4.h           |  4 ++--
>  fs/ext4/ioctl.c          | 34 +++++-----------------------------
>  fs/f2fs/f2fs.h           |  4 ++--
>  fs/f2fs/file.c           | 19 ++-----------------
>  include/linux/fscrypto.h | 12 ++++++------
>  6 files changed, 40 insertions(+), 69 deletions(-)

Hmm, are you sure the change is worth it?
The patch basically moves a copy_from/to_user() from ext4/f2fs into fscrypto.

-- 
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ