lkml.org 
[lkml]   [2021]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 09/64] staging: rtl8723bs: Avoid field-overflowing memcpy()
    On Tue, Jul 27, 2021 at 01:58:00PM -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.
    >
    > Adjust memcpy() destination to be the named structure itself, rather than
    > the first member, allowing memcpy() to correctly reason about the size.
    >
    > "objdump -d" shows no object code changes.
    >
    > Signed-off-by: Kees Cook <keescook@chromium.org>
    > ---
    > drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)


    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    \
     
     \ /
      Last update: 2021-07-28 07:46    [W:2.259 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site