0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 85aac526af8612c21b3117dadc8ef5944985b476 Mon Sep 17 00:00:00 2001
  2. From: Jouni Malinen <jouni@codeaurora.org>
  3. Date: Thu, 4 Jun 2020 21:24:04 +0300
  4. Subject: [PATCH 3/3] WPS UPnP: Handle HTTP initiation failures for events more
  5. properly
  6. While it is appropriate to try to retransmit the event to another
  7. callback URL on a failure to initiate the HTTP client connection, there
  8. is no point in trying the exact same operation multiple times in a row.
  9. Replve the event_retry() calls with event_addr_failure() for these cases
  10. to avoid busy loops trying to repeat the same failing operation.
  11. These potential busy loops would go through eloop callbacks, so the
  12. process is not completely stuck on handling them, but unnecessary CPU
  13. would be used to process the continues retries that will keep failing
  14. for the same reason.
  15. Upstream-Status: Backport
  16. CVE: CVE-2020-12695 patch #2
  17. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
  18. Signed-off-by: Armin Kuster <akuster@mvista.com>
  19. ---
  20. src/wps/wps_upnp_event.c | 4 ++--
  21. 1 file changed, 2 insertions(+), 2 deletions(-)
  22. diff --git a/src/wps/wps_upnp_event.c b/src/wps/wps_upnp_event.c
  23. index 08a23612f338..c0d9e41d9a38 100644
  24. --- a/src/wps/wps_upnp_event.c
  25. +++ b/src/wps/wps_upnp_event.c
  26. @@ -294,7 +294,7 @@ static int event_send_start(struct subscription *s)
  27. buf = event_build_message(e);
  28. if (buf == NULL) {
  29. - event_retry(e, 0);
  30. + event_addr_failure(e);
  31. return -1;
  32. }
  33. @@ -302,7 +302,7 @@ static int event_send_start(struct subscription *s)
  34. event_http_cb, e);
  35. if (e->http_event == NULL) {
  36. wpabuf_free(buf);
  37. - event_retry(e, 0);
  38. + event_addr_failure(e);
  39. return -1;
  40. }
  41. --
  42. 2.20.1