Skip to content
Snippets Groups Projects
Commit d8eabbb4 authored by Kees Cook's avatar Kees Cook Committed by Upgrade Bot
Browse files

ovl: Use "buf" flexible array for memcpy() destination


commit cf8aa9bf upstream.

The "buf" flexible array needs to be the memcpy() destination to avoid
false positive run-time warning from the recent FORTIFY_SOURCE
hardening:

  memcpy: detected field-spanning write (size 93) of single field "&fh->fb"
  at fs/overlayfs/export.c:799 (size 21)

Reported-by: default avatar <syzbot+9d14351a171d0d1c7955@syzkaller.appspotmail.com>
Link: https://lore.kernel.org/all/000000000000763a6c05e95a5985@google.com/


Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 10ae4d5b
No related branches found
No related tags found
1 merge request!63🤖 Upgrade Bot: Update v6.1-ktn to latest Stable Kernel
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment