Bug #8568

fnmatch, glob: fix exponential CPU use with repeated '*' operators

Added by Yuri Pankov 15 days ago. Updated 8 days ago.

Status:ClosedStart date:2017-08-08
Priority:NormalDue date:
Assignee:Yuri Pankov% Done:

100%

Category:lib - userland libraries
Target version:-
Difficulty:Bite-size Tags:

Description

OpenBSD, where our "new" glob(3C) code comes from, has a fix for the issues described in https://research.swtch.com/glob, pull it along with several other useful changes they did since we borrowed the code.

FreeBSD has the fix for the same issue for fnmatch(3C).

History

#1 Updated by Yuri Pankov 9 days ago

  • Description updated (diff)
  • Subject changed from glob(3C): fix exponential CPU use with repeated '*' operators to fnmatch, glob: fix exponential CPU use with repeated '*' operators

#2 Updated by Electric Monk 8 days ago

  • % Done changed from 10 to 100
  • Status changed from In Progress to Closed

git commit 79d022da827bda94f470706ea9a9a8d6dbab9d07

commit  79d022da827bda94f470706ea9a9a8d6dbab9d07
Author: Yuri Pankov <yuri.pankov@nexenta.com>
Date:   2017-08-14T17:44:45.000Z

    8568 fnmatch, glob: fix exponential CPU use with repeated '*' operators
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom