[CVE-2009-5155] Diagnose ERE '()|\1' 43/254743/2 accepted/tizen_6.5_base accepted/tizen_6.5_base_tool accepted/tizen_7.0_base accepted/tizen_7.0_base_hotfix accepted/tizen_7.0_base_tool accepted/tizen_7.0_base_tool_hotfix tizen_6.5_base tizen_7.0_base tizen_7.0_base_hotfix accepted/tizen/6.5/base/20230714.002808 accepted/tizen/6.5/base/tool/20211027.105707 accepted/tizen/6.5/base/tool/20211027.121842 accepted/tizen/7.0/base/20230714.003216 accepted/tizen/7.0/base/hotfix/20230714.004025 accepted/tizen/7.0/base/tool/20221028.120752 accepted/tizen/7.0/base/tool/hotfix/20221115.084825 accepted/tizen/base/tool/20210321.225331 submit/tizen_6.5_base/20211026.180902 submit/tizen_6.5_base/20211027.183102 submit/tizen_6.5_base/20211027.201201 submit/tizen_7.0_base/20221028.201301 submit/tizen_7.0_base_hotfix/20221115.161701 submit/tizen_base/20210317.073914 tizen_6.5.m2_release tizen_7.0_m2_release
authorJinWang An <jinwang.an@samsung.com>
Tue, 9 Mar 2021 05:53:57 +0000 (14:53 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 17 Mar 2021 07:38:05 +0000 (16:38 +0900)
commitcd11978be965bd754e9c5fb2875238ee2b6fb896
tree938413b835ce4bc7353170053ea636ea64f82218
parentc24e431bf6532f6a0997a6a0ab6955fa61170978
[CVE-2009-5155] Diagnose ERE '()|\1'

Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
* lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
track of the set of previously-completed subexpressions available
before the first alternative, and restore this set just before
parsing each subsequent alternative.  This lets us diagnose the
invalid back-reference in the ERE '()|\1'.

Change-Id: I18a2ec367b04a69d8429e92a1b4784b6d7692832
Signed-off-by: JinWang An <jinwang.an@samsung.com>
lib/regcomp.c