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  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]
Date:   Tue, 25 Oct 2022 11:58:36 +0300
From:   Andy Shevchenko <>
To:     Kees Cook <>
Cc:     "Darrick J . Wong" <>,
        Zorro Lang <>,,
        "Gustavo A. R. Silva" <>,
        Keith Packard <>,
        Francis Laniel <>,
        Daniel Axtens <>,
        Dan Williams <>,
        Vincenzo Frascino <>,
        Guenter Roeck <>,
        Daniel Vetter <>,
        Tadeusz Struk <>,
        Geert Uytterhoeven <>,
        Paolo Abeni <>,,
Subject: Re: [PATCH 2/2] xfs: Use flex_cpy() to check extent copying

On Mon, Oct 24, 2022 at 10:20:58AM -0700, Kees Cook wrote:
> Use flex_cpy() instead of memcpy() to copy the bui_fmt flexible array
> structure, which will perform bounds checking internally. Avoids the
> false positive warning seen under FORTIFY_SOURCE:
>   memcpy: detected field-spanning write (size 48) of single field "dst_bui_fmt" at fs/xfs/xfs_bmap_item.c:628 (size 16)


>  #include "xfs_error.h"
>  #include "xfs_log_priv.h"
>  #include "xfs_log_recover.h"

> +#include <linux/flex_array.h>

Wouldn't it be better to include it before any "local" headers?

With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists