]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ovl: listxattr: use strnlen()
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 1 Sep 2016 09:12:00 +0000 (11:12 +0200)
committerShan Hai <shan.hai@oracle.com>
Fri, 4 Aug 2017 05:56:12 +0000 (13:56 +0800)
commit1f458e4487f58c1b3935c7f3d088b1b70b09a4b0
tree3c5e8311fb334f86874d34378beb0b64d5121512
parentd7c96681380e1563308d06e6066572e84c4584d8
ovl: listxattr: use strnlen()

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>
Cc: <stable@vger.kernel.org>
Orabug: 26401569

(backport upstream commit 7cb35119d067191ce9ebc380a599db0b03cbd9d9)

Signed-off-by: Shan Hai <shan.hai@oracle.com>
Reviewed-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
fs/overlayfs/inode.c