Re: [PATCH 62/64] netlink: Avoid false-positive memcpy() warning

2021-07-29 Thread Kees Cook
On Wed, Jul 28, 2021 at 07:49:46AM +0200, Greg Kroah-Hartman wrote: > On Tue, Jul 27, 2021 at 01:58:53PM -0700, Kees Cook wrote: > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > field bounds checking for memcpy(), memmove(), and memset(), avoid > > intentionally

Re: [PATCH 62/64] netlink: Avoid false-positive memcpy() warning

2021-07-29 Thread Kees Cook
On Wed, Jul 28, 2021 at 01:24:01PM +0200, Rasmus Villemoes wrote: > On 28/07/2021 07.49, Greg Kroah-Hartman wrote: > > On Tue, Jul 27, 2021 at 01:58:53PM -0700, Kees Cook wrote: > >> In preparation for FORTIFY_SOURCE performing compile-time and run-time > >> field bounds checking for memcpy(),

Re: [PATCH 62/64] netlink: Avoid false-positive memcpy() warning

2021-07-28 Thread Rasmus Villemoes
On 28/07/2021 07.49, Greg Kroah-Hartman wrote: > On Tue, Jul 27, 2021 at 01:58:53PM -0700, Kees Cook wrote: >> In preparation for FORTIFY_SOURCE performing compile-time and run-time >> field bounds checking for memcpy(), memmove(), and memset(), avoid >> intentionally writing across neighboring

Re: [PATCH 62/64] netlink: Avoid false-positive memcpy() warning

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:58:53PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Add a flexible array member to mark the

[PATCH 62/64] netlink: Avoid false-positive memcpy() warning

2021-07-27 Thread Kees Cook
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Add a flexible array member to mark the end of struct nlmsghdr, and split the memcpy() to avoid false positive