diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-01-16 20:27:28 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-01-16 20:27:28 +0000 |
commit | 2fd57282f0262ca084e05b0f2c63fbada395d02b (patch) | |
tree | 4e0f23cea9ce9fd972e70ebc5214bf36fed465cc /sci-mathematics/spin/files | |
parent | c3bc61051d7f12b4c682efa7a5460bbc8815649e (diff) |
gentoo resync : 16.01.2021
Diffstat (limited to 'sci-mathematics/spin/files')
-rw-r--r-- | sci-mathematics/spin/files/spin-6.5.2-nesting_limit.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/sci-mathematics/spin/files/spin-6.5.2-nesting_limit.patch b/sci-mathematics/spin/files/spin-6.5.2-nesting_limit.patch new file mode 100644 index 000000000000..c73152e8485c --- /dev/null +++ b/sci-mathematics/spin/files/spin-6.5.2-nesting_limit.patch @@ -0,0 +1,55 @@ +Backported upstream changes to address CVE-2021-46168. + +From 62cf91c944ea457c218528e9021443a0cbe05758 Mon Sep 17 00:00:00 2001 +From: nimble-code <gerard.holzmann@gmail.com> +Date: Sun, 2 Jan 2022 11:26:40 -0800 +Subject: [PATCH] fix + +--- a/sched.c ++++ b/sched.c +@@ -18,7 +18,7 @@ extern int lineno, nr_errs, dumptab, xspin, jumpsteps, columns; + extern int u_sync, Elcnt, interactive, TstOnly, cutoff; + extern short has_enabled, has_priority, has_code, replay; + extern int limited_vis, product, nclaims, old_priority_rules; +-extern int old_scope_rules, scope_seq[128], scope_level, has_stdin; ++extern int old_scope_rules, scope_seq[256], scope_level, has_stdin; + + extern int pc_highest(Lextok *n); + extern void putpostlude(void); +--- a/spinlex.c ++++ b/spinlex.c +@@ -51,7 +51,7 @@ extern int implied_semis, ltl_mode, in_seq, par_cnt; + + short has_stack = 0; + int lineno = 1; +-int scope_seq[128], scope_level = 0; ++int scope_seq[256], scope_level = 0; + char CurScope[MAXSCOPESZ]; + char yytext[2048]; + FILE *yyin, *yyout; +From 9ecb1af6d174532f3a77acae3a1d424fe7345a3e Mon Sep 17 00:00:00 2001 +From: nimble-code <gerard.holzmann@gmail.com> +Date: Sat, 15 Jan 2022 10:39:38 -0800 +Subject: [PATCH] nesting limit + +--- a/spinlex.c ++++ b/spinlex.c +@@ -1704,8 +1704,16 @@ lex(void) + case '|': c = follow('|', OR, '|'); break; + case ';': c = SEMI; break; + case '.': c = follow('.', DOTDOT, '.'); break; +- case '{': scope_seq[scope_level++]++; set_cur_scope(); break; +- case '}': scope_level--; set_cur_scope(); break; ++ case '{': ++ assert(scope_level < sizeof(scope_seq)-1); ++ scope_seq[scope_level++]++; ++ set_cur_scope(); ++ break; ++ case '}': ++ assert(scope_level > 0); ++ scope_level--; ++ set_cur_scope(); ++ break; + default : break; + } + ValToken(0, c) |