0269-net-mpls-prevent-speculative-execution.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Elena Reshetova <[email protected]>
  3. Date: Mon, 4 Sep 2017 13:11:55 +0300
  4. Subject: [PATCH] net: mpls: 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 98a9550398f87c5430d5e893104e21caa1e2e8d3)
  16. Signed-off-by: Fabian Grünbichler <[email protected]>
  17. ---
  18. net/mpls/af_mpls.c | 2 ++
  19. 1 file changed, 2 insertions(+)
  20. diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
  21. index ea4f481839dd..08dfb99e19f2 100644
  22. --- a/net/mpls/af_mpls.c
  23. +++ b/net/mpls/af_mpls.c
  24. @@ -50,6 +50,8 @@ static struct mpls_route *mpls_route_input_rcu(struct net *net, unsigned index)
  25. if (index < net->mpls.platform_labels) {
  26. struct mpls_route __rcu **platform_label =
  27. rcu_dereference(net->mpls.platform_label);
  28. +
  29. + gmb();
  30. rt = rcu_dereference(platform_label[index]);
  31. }
  32. return rt;
  33. --
  34. 2.14.2