]> git.ipfire.org Git - thirdparty/samba.git/commit
CVE-2021-44142: libadouble: harden ad_unpack_xattrs()
authorRalph Boehme <slow@samba.org>
Fri, 26 Nov 2021 06:19:32 +0000 (07:19 +0100)
committerJule Anger <janger@samba.org>
Mon, 31 Jan 2022 11:27:42 +0000 (12:27 +0100)
commit5da11db4cd9058bbec13a3096e7597727798a627
tree9b31d6778957ecf18ac311453e1ad4d35193bf8a
parent4672487f3db3a88070ffcb2cc8fec4b7d3b24186
CVE-2021-44142: libadouble: harden ad_unpack_xattrs()

This ensures ad_unpack_xattrs() is only called for an ad_type of ADOUBLE_RSRC,
which is used for parsing ._ AppleDouble sidecar files, and the buffer
ad->ad_data is AD_XATTR_MAX_HDR_SIZE bytes large which is a prerequisite for all
buffer out-of-bounds access checks in ad_unpack_xattrs().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/adouble.c