WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#42319 closed defect (bug) (duplicate)

Endless loop in class-wp-hook.php due to null array

Reported by: santrix Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8.2
Component: Plugins Keywords: has-patch
Focuses: Cc:

Description

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

Attachments (1)

42319.patch (1.0 KB) - added by umangvaghela123 4 years ago.

Download all attachments as: .zip

Change History (4)

#1 @umangvaghela123
4 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
4 years ago

  • Component changed from General to Plugins

#3 @dd32
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #39338.

Note: See TracTickets for help on using tickets.