All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: laniel_francis@privacyrequired.com
Cc: linux-hardening@vger.kernel.org, dja@axtens.net
Subject: Re: [RFC PATCH v4 3/5] string.h: Add FORTIFY coverage for strscpy()
Date: Tue, 17 Nov 2020 14:02:58 -0800	[thread overview]
Message-ID: <202011171402.0B95045@keescook> (raw)
In-Reply-To: <20201116145012.24471-4-laniel_francis@privacyrequired.com>

On Mon, Nov 16, 2020 at 03:50:10PM +0100, laniel_francis@privacyrequired.com wrote:
> From: Francis Laniel <laniel_francis@privacyrequired.com>
> 
> The fortified version of strscpy ensures the following before vanilla strscpy
> is called:
> 1. There is no read overflow because we either size is smaller than src length
> or we shrink size to src length by calling fortified strnlen.
> 2. There is no write overflow because we either failed during compilation or at
> runtime by checking that size is smaller than dest size.
> 
> Signed-off-by: Francis Laniel <laniel_francis@privacyrequired.com>

Acked-by: Kees Cook <keescook@chromium.org>


-- 
Kees Cook

  reply	other threads:[~2020-11-17 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 14:50 [RFC PATCH v4 0/5] Fortify strscpy() laniel_francis
2020-11-16 14:50 ` [PATCH v4 1/5] string.h: detect intra-object overflow in fortified string functions laniel_francis
2020-11-16 14:50 ` [PATCH v4 2/5] lkdtm: tests for FORTIFY_SOURCE laniel_francis
2020-11-16 14:50 ` [RFC PATCH v4 3/5] string.h: Add FORTIFY coverage for strscpy() laniel_francis
2020-11-17 22:02   ` Kees Cook [this message]
2020-11-16 14:50 ` [RFC PATCH v4 4/5] Add new file in LKDTM to test fortified strscpy laniel_francis
2020-11-17 22:04   ` Kees Cook
2020-11-16 14:50 ` [RFC PATCH v4 5/5] Correct wrong filenames in comment laniel_francis
2020-11-17 22:06 ` [RFC PATCH v4 0/5] Fortify strscpy() Kees Cook
2020-11-18 10:41   ` Francis Laniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202011171402.0B95045@keescook \
    --to=keescook@chromium.org \
    --cc=dja@axtens.net \
    --cc=laniel_francis@privacyrequired.com \
    --cc=linux-hardening@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.