1
0

0270-udf-prevent-speculative-execution.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Elena Reshetova <[email protected]>
  3. Date: Mon, 4 Sep 2017 13:11:56 +0300
  4. Subject: [PATCH] udf: prevent speculative execution
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. CVE-2017-5753
  9. CVE-2017-5715
  10. Real commit text tbd
  11. Signed-off-by: Elena Reshetova <[email protected]>
  12. Signed-off-by: Tim Chen <[email protected]>
  13. Signed-off-by: Andy Whitcroft <[email protected]>
  14. Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
  15. (cherry picked from commit f575840dd363aa80a14faacddf90b95db1185e2c)
  16. Signed-off-by: Fabian Grünbichler <[email protected]>
  17. ---
  18. fs/udf/misc.c | 6 ++++++
  19. 1 file changed, 6 insertions(+)
  20. diff --git a/fs/udf/misc.c b/fs/udf/misc.c
  21. index 3949c4bec3a3..4bd10b2e8540 100644
  22. --- a/fs/udf/misc.c
  23. +++ b/fs/udf/misc.c
  24. @@ -104,6 +104,8 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size,
  25. iinfo->i_lenEAttr) {
  26. uint32_t aal =
  27. le32_to_cpu(eahd->appAttrLocation);
  28. +
  29. + gmb();
  30. memmove(&ea[offset - aal + size],
  31. &ea[aal], offset - aal);
  32. offset -= aal;
  33. @@ -114,6 +116,8 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size,
  34. iinfo->i_lenEAttr) {
  35. uint32_t ial =
  36. le32_to_cpu(eahd->impAttrLocation);
  37. +
  38. + gmb();
  39. memmove(&ea[offset - ial + size],
  40. &ea[ial], offset - ial);
  41. offset -= ial;
  42. @@ -125,6 +129,8 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size,
  43. iinfo->i_lenEAttr) {
  44. uint32_t aal =
  45. le32_to_cpu(eahd->appAttrLocation);
  46. +
  47. + gmb();
  48. memmove(&ea[offset - aal + size],
  49. &ea[aal], offset - aal);
  50. offset -= aal;
  51. --
  52. 2.14.2