]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ovl: listxattr: use strnlen()
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 1 Sep 2016 09:12:00 +0000 (11:12 +0200)
committerKamal Mostafa <kamal@canonical.com>
Thu, 15 Sep 2016 17:37:22 +0000 (10:37 -0700)
commitad434057d24396a54bc989f4a9381c9a21b925b2
tree19d1119dfc9c2a2c9545e9910f465525c427dadd
parent6973f1b86495d136d23998b7cd6eae7d4ac3fefd
ovl: listxattr: use strnlen()

BugLink: http://bugs.launchpad.net/bugs/1624037
commit 7cb35119d067191ce9ebc380a599db0b03cbd9d9 upstream.

Be defensive about what underlying fs provides us in the returned xattr
list buffer.  If it's not properly null terminated, bail out with a warning
insead of BUG.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
fs/overlayfs/inode.c