]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ovl: use a minimal buffer in ovl_copy_xattr
authorVito Caputo <vito.caputo@coreos.com>
Sat, 24 Oct 2015 12:19:46 +0000 (07:19 -0500)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Tue, 1 Aug 2017 15:52:26 +0000 (08:52 -0700)
commit85d477ab1e2c00bc1013a1f30f6c1eae05140960
tree14d7142e34670e8da9424d75a00992bdfb0979c8
parentc9bb79cb1ac0ce170c8a63c3224fb06582146aba
ovl: use a minimal buffer in ovl_copy_xattr

Orabug: 2654637926540706
CVE-2016-1575
CVE-2016-1576

Rather than always allocating the high-order XATTR_SIZE_MAX buffer
which is costly and prone to failure, only allocate what is needed and
realloc if necessary.

Fixes https://github.com/coreos/bugs/issues/489

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: <stable@vger.kernel.org>
(cherry picked from commit e4ad29fa0d224d05e08b2858e65f112fd8edd4fe)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
fs/overlayfs/copy_up.c