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: <CAGXu5jKrW4t0HxBiinYTQs9eun_Z+bkNCjKgM_RYaL6Vz1PsoA@mail.gmail.com>
Date:	Mon, 8 Jul 2013 06:09:50 -0700
From:	Kees Cook <keescook@...omium.org>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Arnd Bergmann <arnd@...db.de>, Ankita Garg <ankita@...ibm.com>,
	Simon Kagstrom <simon.kagstrom@...insight.net>,
	Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH 1/4] lkdtm: fix stack protector trigger

Hi,

I'd like to get this series added to lkdtm. Can someone take a moment
to review or ack them?

Thanks,

-Kees

On Sat, Jun 22, 2013 at 11:37 AM, Kees Cook <keescook@...omium.org> wrote:
> The -fstack-protector compiler flag will only build stack protections if
> a character array is seen. Additionally, the offset to the saved
> instruction pointer changes based on architecture, so stomp much harder
> (64 bytes) when corrupting the stack.
>
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
>  drivers/misc/lkdtm.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c
> index 08aad69..adb6bde 100644
> --- a/drivers/misc/lkdtm.c
> +++ b/drivers/misc/lkdtm.c
> @@ -295,10 +295,10 @@ static void lkdtm_do_action(enum ctype which)
>                 (void) recursive_loop(0);
>                 break;
>         case CT_CORRUPT_STACK: {
> -               volatile u32 data[8];
> -               volatile u32 *p = data;
> +               /* Make sure the compiler creates and uses an 8 char array. */
> +               volatile char data[8];
>
> -               p[12] = 0x12345678;
> +               memset((void *)data, 0, 64);
>                 break;
>         }
>         case CT_UNALIGNED_LOAD_STORE_WRITE: {
> --
> 1.7.9.5
>



-- 
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ