]> git.ipfire.org Git - people/arne_f/kernel.git/commit
ovl: copy_up_xattr(): use strnlen
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 16 Sep 2016 12:12:11 +0000 (14:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 07:45:23 +0000 (03:45 -0400)
commit5a7d384203fcc75d020a6f10179fe571151c2e2d
tree1e47b15283feb41786a819088f1cebd53206cba4
parent05cc17e076ea335385db7ac2896c4f3db46ccd15
ovl: copy_up_xattr(): use strnlen

commit 8b326c61de08f5ca4bc454a168f19e7e43c4cc2a upstream.

Be defensive about what underlying fs provides us in the returned xattr
list buffer.  strlen() may overrun the buffer, so use strnlen() and WARN if
the contents are not properly null terminated.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/copy_up.c