• K
    xfrm: Use memset_after() to clear padding · caf283d0
    Kees Cook 提交于
    In preparation for FORTIFY_SOURCE performing compile-time and run-time
    field bounds checking for memset(), avoid intentionally writing across
    neighboring fields.
    
    Clear trailing padding bytes using the new helper so that memset()
    doesn't get confused about writing "past the end" of the last struct
    member. There is no change to the resulting machine code.
    
    Cc: Steffen Klassert <steffen.klassert@secunet.com>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Cc: netdev@vger.kernel.org
    Signed-off-by: NKees Cook <keescook@chromium.org>
    caf283d0
xfrm_policy.c 105.5 KB