[wp-trac] [WordPress Trac] #42319: Endless loop in class-wp-hook.php due to null array

WordPress Trac noreply at wordpress.org
Tue Oct 24 07:34:25 UTC 2017


#42319: Endless loop in class-wp-hook.php due to null array
--------------------------+-----------------------------
 Reporter:  santrix       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.8.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 This code in class-wp-hook.php is a major issue

 {{{
 } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 }}}

 I work for a large host and several plugins can cause this to trap itself
 in an endless loop, creating potentially massive error_log files. The
 solution offered by frettled in a bug report against 4.7 seems reasonable,
 and does prevent it.

 {{{
 } while ( ! is_null( $this->iterations[ $nesting_level ] ) && false !==
 next( $this->iterations[ $nesting_level ] ) );
 }}}

 I might add that in configurations of Apache 2.4 where Mod Security is
 deployed, this kind of thing will also cause a memory leak leading to
 rapid destabilisation of a server (tested using fcgi, lsapi, suphp, cgi).

 This type of thing needs to be fixed sooner than later throughout the
 core. I don't understand why this wasn't addressed after it was reported
 in 4.7

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42319>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list