From: Elena Reshetova Date: Mon, 4 Sep 2017 10:11:56 +0000 (+0300) Subject: udf: prevent speculative execution X-Git-Tag: Ubuntu-4.13.0-27.30~60 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f575840dd363aa80a14faacddf90b95db1185e2c;p=mirror_ubuntu-artful-kernel.git udf: prevent speculative execution CVE-2017-5753 CVE-2017-5715 Real commit text tbd Signed-off-by: Elena Reshetova Signed-off-by: Tim Chen Signed-off-by: Andy Whitcroft Signed-off-by: Kleber Sacilotto de Souza --- diff --git a/fs/udf/misc.c b/fs/udf/misc.c index 3949c4bec3a3..4bd10b2e8540 100644 --- a/fs/udf/misc.c +++ b/fs/udf/misc.c @@ -104,6 +104,8 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size, iinfo->i_lenEAttr) { uint32_t aal = le32_to_cpu(eahd->appAttrLocation); + + gmb(); memmove(&ea[offset - aal + size], &ea[aal], offset - aal); offset -= aal; @@ -114,6 +116,8 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size, iinfo->i_lenEAttr) { uint32_t ial = le32_to_cpu(eahd->impAttrLocation); + + gmb(); memmove(&ea[offset - ial + size], &ea[ial], offset - ial); offset -= ial; @@ -125,6 +129,8 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size, iinfo->i_lenEAttr) { uint32_t aal = le32_to_cpu(eahd->appAttrLocation); + + gmb(); memmove(&ea[offset - aal + size], &ea[aal], offset - aal); offset -= aal;