diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-10-20 16:17:41 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-10-31 08:58:19 -0700 |
commit | a38ebce1da271f480e47c3def4f810c6106b74a1 (patch) | |
tree | 9207f5c9adca79346bc6102693bfc0856adef0cb /fs/9p/vfs_dentry.c | |
parent | 59da7ff49d67a1b63b1b81c7f53dcb6a84cdad2b (diff) | |
download | linux-a38ebce1da271f480e47c3def4f810c6106b74a1.tar.gz linux-a38ebce1da271f480e47c3def4f810c6106b74a1.tar.bz2 linux-a38ebce1da271f480e47c3def4f810c6106b74a1.zip |
xfs: fix memcpy fortify errors in BUI log format copying
Starting in 6.1, CONFIG_FORTIFY_SOURCE checks the length parameter of
memcpy. Unfortunately, it doesn't handle flex arrays correctly:
------------[ cut here ]------------
memcpy: detected field-spanning write (size 48) of single field "dst_bui_fmt" at fs/xfs/xfs_bmap_item.c:628 (size 16)
Fix this by refactoring the xfs_bui_copy_format function to handle the
copying of the head and the flex array members separately. While we're
at it, fix a minor validation deficiency in the recovery function.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/9p/vfs_dentry.c')
0 files changed, 0 insertions, 0 deletions