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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABVgOSmGN2=ptHmEv+FT7vaCUVW4a4bLQUhLKEDV7gbTtH6raA@mail.gmail.com>
Date:   Fri, 4 Mar 2022 15:52:05 +0800
From:   David Gow <davidgow@...gle.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Eric Biederman <ebiederm@...ssion.com>,
        Daniel Latypov <dlatypov@...gle.com>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Magnus Groß <magnus.gross@...h-aachen.de>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        KUnit Development <kunit-dev@...glegroups.com>,
        linux-fsdevel@...r.kernel.org,
        Linux Memory Management List <linux-mm@...ck.org>,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] binfmt_elf: Introduce KUnit test

On Fri, Mar 4, 2022 at 12:48 PM Kees Cook <keescook@...omium.org> wrote:
>
> Adds simple KUnit test for some binfmt_elf internals: specifically a
> regression test for the problem fixed by commit 8904d9cd90ee ("ELF:
> fix overflow in total mapping size calculation").
>
> $ ./tools/testing/kunit/kunit.py run --arch x86_64 \
>     --kconfig_add CONFIG_IA32_EMULATION=y '*binfmt_elf'
> ...
> [19:41:08] ================== binfmt_elf (1 subtest) ==================
> [19:41:08] [PASSED] total_mapping_size_test
> [19:41:08] =================== [PASSED] binfmt_elf ====================
> [19:41:08] ============== compat_binfmt_elf (1 subtest) ===============
> [19:41:08] [PASSED] total_mapping_size_test
> [19:41:08] ================ [PASSED] compat_binfmt_elf ================
> [19:41:08] ============================================================
> [19:41:08] Testing complete. Passed: 2, Failed: 0, Crashed: 0, Skipped: 0, Errors: 0
>
> Cc: Eric Biederman <ebiederm@...ssion.com>
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
> This is now at the top of my for-next/execve tree
> v1: https://lore.kernel.org/lkml/20220224054332.1852813-1-keescook@chromium.org
> v2:
>  - improve commit log
>  - fix comment URL (Daniel)
>  - drop redundant KUnit Kconfig help info (Daniel)
>  - note in Kconfig help that COMPAT builds add a compat test (David)
> ---

This looks good to me, and works fine with those two prerequisite
patches from your tree:
- ELF: Properly redefine PT_GNU_* in terms of PT_LOOS
- ELF: fix overflow in total mapping size calculation
(I even played a few of the games which triggered the ELF bug to make
sure it was fixed, too. :-) )

Reviewed-by: David Gow <davidgow@...gle.com>

Cheers,
-- David

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4003 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ