Considering this bug is described as a potential DOS attack, I think it merits backports to pike and queens. Brian, your patch is a clean cherry-pick to queens and has only an apparently trivial test case conflict in pike, so I've taken a stab at just chucking those up. This is not meant to indicate that I know what I'm doing, so please take this with a grain of salt. :)
Considering this bug is described as a potential DOS attack, I think it merits backports to pike and queens. Brian, your patch is a clean cherry-pick to queens and has only an apparently trivial test case conflict in pike, so I've taken a stab at just chucking those up. This is not meant to indicate that I know what I'm doing, so please take this with a grain of salt. :)