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]
Date:   Mon, 22 May 2023 18:23:06 -0700
From:   Kees Cook <kees@...nel.org>
To:     Eric Biggers <ebiggers@...nel.org>,
        Kees Cook <keescook@...omium.org>
CC:     "Theodore Y. Ts'o" <tytso@....edu>,
        Jaegeuk Kim <jaegeuk@...nel.org>,
        "Gustavo A . R . Silva" <gustavoars@...nel.org>,
        linux-fscrypt@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH] fscrypt: Replace 1-element array with flexible array

On May 22, 2023 4:02:06 PM PDT, Eric Biggers <ebiggers@...nel.org> wrote:
>On Mon, May 22, 2023 at 02:39:28PM -0700, Kees Cook wrote:
>> In the future, we can add annotations for the flexible array member
>> "encrypted_path" to have a size determined by the "len" member.
>
>That seems unlikely, as 'struct fscrypt_symlink_data' is an on-disk data
>structure.  The "len" field does not necessarily use CPU endianness, and before
>being validated it might be greater than the size of the allocated space.

Oh yes, good point.

>I agree that it should use a flex array (and thanks for catching this one that I
>had forgotten about...), but the above explanation seems wrong.

Shall I spin a v2?


-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ