From: Eric Bollengier Date: Wed, 15 Sep 2021 15:15:29 +0000 (+0200) Subject: Fix #8142 Skip XATTR larger than MaximumNetworkBuffer X-Git-Tag: Release-11.3.2~324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f336c69ec12c7d2550fda8cb983ccab7969861e;p=thirdparty%2Fbacula.git Fix #8142 Skip XATTR larger than MaximumNetworkBuffer --- diff --git a/bacula/src/filed/bxattr_osx.c b/bacula/src/filed/bxattr_osx.c index 9acc9db51..ccaf10f09 100644 --- a/bacula/src/filed/bxattr_osx.c +++ b/bacula/src/filed/bxattr_osx.c @@ -204,7 +204,11 @@ bRC_BXATTR BXATTR_OSX::os_get_xattr_value (JCR *jcr, char * name, char ** pvalue break; } - if (len > 0){ + if (len >= me->max_network_buffer_size) { + DMmsg2(100, jcr->errmsg, _("xattr maximum length %d is greater than MaximumNetworkBufferSize on file \"%s\"\n"), len, jcr->last_fname); + return bRC_BXATTR_error; + + } else if (len > 0){ /* * allocate memory for the extented attribute value * default size is a 256B for PM_MESSAGE, so we need to check required size